LWM2M Firmware Package URI #61024
-
What does Zephyr with the Firmware Package URI? In the source code it looks like it does a lot. But does it also write it to the flash for the FOTA? Please explain what it exactly does for you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Thomas, It implements the mechanism (state machine and download) for this OTA pull method. It comes to you to write each block received into the memory (second partition) to update the firmware. According to LwM2M specifications, you shall set URI (ID 1) and execute update (ID2) once downloaded (means once fully written in memory and ask bootloader to switch and reboot) Only CoAP download is supported as suggested in specifications to avoid increasing fw size with TCP stack for HTTP. |
Beta Was this translation helpful? Give feedback.
Download is done by block. In the code sample provided, you have to write each block ( received in static int firmware_block_received_cb(uint16_t obj_inst_id,...) into the memory.
So each new block fw received could be written in memory using flash API or
DFU API (https://docs.zephyrproject.org/latest/services/device_mgmt/dfu.html)