-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Panic: can't encode protobuf reason='unterminated string' #6055
Comments
The version string looks too large >>> len('2.5.22.9b46cb4ef086')
19
What is the output of this command? |
@esev, that's a pretty good guess. I'm wondering if I can force the version string. It was generated automatically. |
I think the version string gets generated here: Line 33 in 9b46cb4
And here: firmware/bin/platformio-custom.py Line 117 in 9b46cb4
|
Thank you! I will truncate it in both places to test it and I will update here once I have results! |
Bingo! I works! Truncating it just in diff --git a/bin/platformio-custom.py b/bin/platformio-custom.py
index 09e8e6d839a3..7d22bdb15c06 100644
--- a/bin/platformio-custom.py
+++ b/bin/platformio-custom.py
@@ -114,7 +114,7 @@ for pref in userPrefs:
# General options that are passed to the C and C++ compilers
flags = [
- "-DAPP_VERSION=" + verObj["long"],
+ "-DAPP_VERSION=" + verObj["long"][:17],
"-DAPP_VERSION_SHORT=" + verObj["short"],
"-DAPP_ENV=" + env.get("PIOENV"),
] + pref_flags But truncating it to 18 wasn't enough. Maybe it keeps the '\n'? Not sure |
I think nanopb is looking for a null terminated C-style string. 17 bytes plus the null terminator at the end could make sense. >>> len(b'2.5.22.9b46cb4ef0\0')
18 What you have looks good to me. |
Makes sense. Thanks a lot, @esev! |
Category
BLE
Hardware
DIY
Firmware Version
2.5.22.9b46cb4ef086
Description
I'm experiment with some DIY devices but I'm having problems in the communication between the device and the Android app via bluetooth. The information I'm providing here was obtained using the
meshtastic-diy-v1_1
environment with an ESP32 devkit, a RA-02 radio and an OLED display. But I faced the same issue with a custom variant using and ESP32-C3 too.The radio and the OLED display work fine and I can configure the device and set its region without any problems using the CLI tool. The device sees other device and its seen by them.
When using the Android App, the device shows in the screen the paring code and I can pair with the device without any problem. After that, when I connect to device I get no error but the text box for the device name is empty. If I try to change its name or its region nothing happens.
In a similar way, I can got to the "Radio Configuration" screen in the App, but if I click to any of the settings the only things I get is a popup window with a "Close" button, nothing else.
Check the device serial with the CLI tool, I notice the following error message at the exact moment I connect to the device via bluetooth:
I'm compiling and uploading the
master
branch from the firmware repository with the following commands:And I'm ensuring I have all the proper submodules with:
Bellow I'm adding the full serial console output.
Relevant log output
The text was updated successfully, but these errors were encountered: