Skip to content

LoRaWAN FUOTA - Fragment size calculation

0

Hi, Is it necessary to calculate the fragment size for LoRaWAN FUOTA with respect to the MCU flash size to overcome the memory error? How to calculate it ? Thanks

asked 2 years ago454 views
1 Answer
0

Hi. The fragment size you should use depends on your device: the size of the image, the number of fragments, and the fragment redundancy you will support. And what size payload you can carry in your messages (based on RF region and data rate). Do you know what's implemented in your device? For device firmwares based on LoRaMAC-node, the fragment settings are defined here: https://github.com/Lora-net/LoRaMac-node/blob/dcbcfb329b4a343ab007bc19ac43a8dc952b3354/src/apps/LoRaMac/common/LmHandler/packages/FragDecoder.h#L38-L57

And these settings are checked when AWS IoT Core for LoRaWAN tries to setup the fragmentation session: https://github.com/Lora-net/LoRaMac-node/blob/dcbcfb329b4a343ab007bc19ac43a8dc952b3354/src/apps/LoRaMac/common/LmHandler/packages/LmhpFragmentation.c#L355-L369

So if you suffer a "Not enough memory" error, it means AWS IoT Core is proposing a fragment size or number of fragments that exceeds what your device can handle. Hence you need to create the FUOTA task with a smaller fragment size, and/or change the settings on your device.

A bigger (maximum) fragment size will mean a quicker file transfer. But also more memory consumed because the redundancy setting will reserve extra memory for lost fragments/packets.

AWS
EXPERT
answered 2 years ago
AWS
EXPERT
reviewed a year ago
  • By reducing the fragment size "NotEnoughMemory" error is being resolved but during the end of the fuota session my end node is facing "Memory error" at the device status at the AWS console. How to overcome this issue?

  • Hi. So this will be because of what your device sends in the FragSessionStatusAns message. One possible cause is the number of lost fragments exceeded the redundancy setting. Do you have access to the device source code to see its implementation for FragSessionStatusAns?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.