ota2 fails if bytes received out of order

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiMc_1688136
Level 5
Level 5
10 sign-ins 50 questions asked 10 solutions authored

I am using AWS IoT OTA jobs with the AWS OTA library (MQTT based) that sits on top of the WICED OTA2 image library calls.

On occasion i have seen the OTA jobs fail almost immediately and I noticed a trend while checking debug logs. If the first two blocks of the image is received, then the image typically complete fine but if I receive block 2 or 3 first then the update will fail immediately. The AWS OTA system is design to receive files in any order and I think the OTA2 library requires at least the header to be received first.

Looking at the wiced_ota2_image.c, in wiced_ota2_image_update_staged_header, it appears the (total_bytes_received > ota2_header.image_size) line could be a source of failure of the header has not been received (image_size is invalid).

Has anyone encountered an issue like this while integrating OTA into their application?

0 Likes
1 Solution
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Yes. OTA requires the image to be delivered in correct order.

View solution in original post

0 Likes
1 Reply
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Yes. OTA requires the image to be delivered in correct order.

0 Likes