Timeout Detection during an OTA

Hi,

I want my client side to detect an time out during an OTA update.
Currently, during a OTA timeout job, I see an abrupt end in the file transfer and OTA agent receives the job document which it could not parse.
I’m wonder if there is a way for my client device to understand timeout and log the same.

Cheeers,
SS

Hi Surender,

Can you describe how you application is structured and how it makes use of OTA? Is it based on some existing OTA examples?


@tianmc1
I’m using the standard OTA agent example. As you could see, I receive a new job document when I cancel a job or timeout happens. I just want to handle them and log gracefully.

@tianmc1 , Whenever a OTA job times out or cancelled from the AWS IoT Core,

I get a new job document with a following format :

{“clientToken”:“1:THINGNAMEABV”,“timestamp”:1646177178}

Is there a better way to distinguish events between a manual cancellation and time out for an ongoing OTA job?

Thanks,
Surender

@tianmc1 Could you please update on this?

Hello @Surender,

When job execution is complete, AWS IoT Jobs service publishes a message on the $aws/things/MyThing/jobs/notify

{
“timestamp”:1476290692776,
“jobs”:{}
}

Please refer - Jobs workflow - AWS IoT Core

Using AWS CLI you should be able to get the details as well, see Get OTA failure codes with the AWS CLI - FreeRTOS

What actions you want to do on device side based on if it is cancelled or timeout ? The restarting of same job or even with new configuration should be done in the AWS IoT service.