1 Answer
- Newest
- Most votes
- Most comments
0
Hi Roland.
this should be in total 28 blocks where the last block only contain 1152 bytes
Is this just a typo and you meant 38? I think so.
Block size 3490 (also resulting in 38 blocks) works fine
It should be 37 blocks (129024 / 3490 = 36.97). It will change from 38 to 37 when you reach 3488. So I'm wondering if you have a small error in your block size and offset calculation?
Are you using the AWS OTA library (https://github.com/aws/ota-for-aws-iot-embedded-sdk) or your own implementation? Are you using bitmaps?
Relevant content
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Hi Greg, the 28 is indeed 38 (my bad), the block size of 3490 works fine and indeed it is 37 blocks.
The problem is when I use block size 3456 => 37.3333 blocks. The last block request returns an error and I do not use bitmaps. We cannot use the OTA library the os on our embedded devices does not support that,
OK thanks. So I think it's significant that it starts working when you increase the block size such that the number of blocks reduces from 38 to 37 (when you increase block size to 3490). Have you investigated your code with that in mind?
Just to be clear on this point, the OTA library I linked to is free of any OS dependencies.
Yes I have investigated it with several different block sizes. And found that when the last block is < 0.5 * block size I get the error.