Skip to content
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

Firmware update of scetch 009-esp32-esp8266-processOtaMQTT never ends. #243

Open
ChrSchultz opened this issue Dec 29, 2024 · 3 comments
Open

Comments

@ChrSchultz
Copy link
Contributor

ChrSchultz commented Dec 29, 2024

The scetch compiles well and my device download the OTA_update from thingsboard, but after rebooting the Serial out was.

connecting to AP...
connected 
connected to (demo.thingsboard.io with token ........
Firmware update...

but the loop never started new, if i put in loop() also tb.sendtelemetry(key,value); and I want to begin the loop as usual.

@MathewHDYT
Copy link
Contributor

Does it actually start the update again. Because "Firmware update", seems to be your own print and the Start_Firmware_Update returns true if sending data to the cloud was possible or not. Because it is non blocking, only once we receive the response from the cloud do we know that the device is actually up to date and therefore simply do not start the update process.

If it always repeats the update than this might be the problem: It starts the update if the version on the device is not the same as the one we are assigned on the cloud. Meaning if you upload a firmware that has version "0.5" embedded in the hardware but "0.6" assigned in the Cloud dashboard it will repeadetly download firmware (Good stress test, but not required because I've tested that for a few hours already).

@ChrSchultz
Copy link
Contributor Author

ChrSchultz commented Dec 29, 2024

OK, that works, but I want to get a response like "Firmware ist up to date" if the FW_STATE is "UPDATED"
I put in the code before the telemetry a Serial output and now I coud see that the Update didn*t start again.

@MathewHDYT
Copy link
Contributor

MathewHDYT commented Dec 29, 2024

You either do when enabling THINGSBOARD_ENABLE_DEBUG. This is mainly done, because if not enabled Thingsboard only print errors and nothing else to keep the amount of messages to a minimum.

Furthermore the state of the Firmware with UPDATED is even uploaded to the cloud automatically, so if you use the ThingsbBoard Dashboard you will see that the device has not only received and flashed but also restarted and booted the correct assigned firmware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants