Hi,
Currently I am using TICC3220SF along with AWS-FreeRTOS example demo project downloaded from AWS.
While downloading OTA-JOB document, I am getting the same duplicate JOB document 2 or 3 times.
I understood that, this behaviour is because cloud is expecting Ack from the device (as enabled QOS1 for prvSubscribeToJobNotificationTopics),
Ack is missing due to network issue(testing under slower network).
Whenever this issue occurs, OTA task is getting aborted and reporting JSON parse error to the cloud.
Device side Error : “Superfluous report of current job”
Cloud side error : “error occurred during JOB Document parsing”
If I make device side code changes QOS1 to QOS0 I am able to resolve the issue.
I wanted to do work around to avoid the duplicate job and continue upgrading the OTA without aborting.
Please help me to resolve this.
Please find the following logs for more info:
[iot_thread] [INFO ][DEMO][73601] OTA Started
[iot_thread] Creating MQTT Client…
[iot_thread] Starting OTA Agent.
[OTA Task] [prvSubscribeToJobNotificationTopics] OK: $aws/things/Temp/jobs/$next/get/accepted
[OTA Task] [prvSubscribeToJobNotificationTopics] OK: $aws/things/Temp/jobs/notify-next
[OTA Task] [prvPAL_GetPlatformImageState] xFileInfo.Flags = 0250
[OTA Task] [prvPAL_GetPlatformImageState] eOTA_PAL_ImageState_Valid
[OTA Task] [prvPAL_GetPlatformImageState] xFileInfo.Flags = 0250
[OTA Task] [prvPAL_GetPlatformImageState] eOTA_PAL_ImageState_Valid
[OTA Task] [OTA_CheckForUpdate] Request #0
[OTA Task] [prvParseJobDoc] Job was accepted. Attempting to start transfer.
[OTA Task] [prvPAL_GetPlatformImageState] xFileInfo.Flags = 0250
[OTA Task] [prvPAL_GetPlatformImageState] eOTA_PAL_ImageState_Valid
[iot_thread] Error: Could not get a free buffer to copy callback data.
[iot_thread] OTA State: Ready Received: 3 Queued: 2 Processed: 0 Dropped: 1
[iot_thread] Error: Could not get a free buffer to copy callback data.
[OTA Task] [prvStartRequestTimer] starting timer
[iot_thread] OTA State: Active Received: 4 Queued: 2 Processed: 0 Dropped: 2
[Tmr Svc] [prvRequestTimer_Callback] timer callback.
[iot_thread] OTA State: Active Received: 4 Queued: 2 Processed: 0 Dropped: 2
[OTA Task] [prvPAL_CreateFileForRx] Receive file created. Token: 1952007250
[OTA Task] [prvOTA_Close] Context->0x200000a0
[OTA Task] [prvRollbackBundle] Bundle rollback succeeded
[iot_thread] OTA State: Active Received: 4 Queued: 2 Processed: 1 Dropped: 2
[OTA Task] [prvParseJobDoc] Superfluous report of current job.
[OTA Task] [prvParseJobDoc] Error 3 parsing job document.
[OTA Task] [prvParseJobDoc] Ignoring job without ID.
[OTA Task] [prvOTA_Close] Context->0x200000a0
[OTA Task] [prvPAL_SetPlatformImageState] Bundle rollback failed after abort (-10282).
[OTA Task] [prvUpdateJobStatus] Msg: {“status”:“FAILED”,“statusDetails”:{“reason”:“aborted: 0x24000000”}}
[iot_thread] OTA State: Active Received: 4 Queued: 2 Processed: 1 Dropped: 2
[OTA Task] [prvDefaultCustomJobCallback] Received Custom Job inside OTA Agent.
[OTA Task] [prvParseJobDoc] Ignoring job without ID.
[OTA Task] [prvPAL_SetPlatformImageState] Bundle rollback failed after abort (-10282).
[iot_thread] OTA State: Active Received: 5 Queued: 3 Processed: 3 Dropped: 2
[iot_thread] adiCheckforOtaUpdate() wait time expired
[OTA Task] [prvOTAUpdateTask] Received shutdown event.
[OTA Task] [prvOTA_Close] Context->0x200000a0
[iot_thread] [INFO ][DEMO][118793] OTA Completed
Regards,
Suresh