-
Notifications
You must be signed in to change notification settings - Fork 49
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] OTA Demo is constantly downloading and activating the same job #120
Comments
Hello @fjuliofontes, sorry to hear that you are having trouble with the example. Can you please check whether the job is marked as complete on the IoT core? The demo is supposed to send a completion notification to the IoT core. |
Hello @AniruddhaKanhere , |
Hi @fjuliofontes,
Thank you. |
Besides, could you elaborate your scenario a little bit? Thank you. |
Hi @ActoryOu , Thank you |
@fjuliofontes would you please enable all logs? I want to see why doesn't the job send a notification to IoT core. If it completed successfully and if the device rebooted, then the firmware should send an update to the MQTT broker informing the cloud of completion. You can enable MQTT logs here by defining all the following macros: #define CONFIG_CORE_MQTT_LOG_ERROR
#define CONFIG_CORE_MQTT_LOG_WARN
#define CONFIG_CORE_MQTT_LOG_INFO
#define CONFIG_CORE_MQTT_LOG_DEBUG |
@fjuliofontes, thank you for the logs! I am looking at them and will get back to you. One question though - did you generate a new image and upload that to the console? Sometimes if I find a bug and fix it and run the OTA demo, I forget to also update the image in the cloud which is to be downloaded - that causes a bad image to be downloaded. Thanks |
Hi! It seems I'm having the same issue. After completion & reboot, the PUBLISH packet to set the job to Succeeded is not accepted due to a "VersionMismatch":
After this, the code is again picking up the same Job and keeps updating endlessly. I think the cause is in this code: size_t messageBufferLength = Jobs_UpdateMsg( Succeeded,
"2",
1U,
messageBuffer,
UPDATE_JOB_MSG_LENGTH ); The hardcoded "2" is mismatching the version in AWS, which seems to be 15. Maybe a fix is to describe the job document version before updating to retrieve the correct version? |
@GillesHaverbeke, yes you are absolutely correct. If the job version reported is not correct, the IoT core will reject the update. |
OTA Demo seems to be always downloading the same job.
The text was updated successfully, but these errors were encountered: