IOT File stream last block request on return error: The cache block with block id [1] does not exist.

0

I suspect that this is a bug in AWS IOT:

When I create a IOT file stream of 129024 bytes and request blocks size of 3456. (this should be in total 28 blocks where the last block only contain 1152 bytes.) When requesting the last block I get an error back via the reject topic: { "o": "InvalidRequest", "m":"The cache block with block id [1] does not exist.", "c": "....." } Find more block sizes around 3456 causing the same error. Block size 3490 (also resulting in 38 blocks) works fine.

Has anyone else seen this behaviour?

demandé il y a un an268 vues
1 réponse
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?

profile pictureAWS
EXPERT
Greg_B
répondu il y a un an
  • 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?

    We cannot use the OTA library the os on our embedded devices does not support that,

    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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions