When downloading DFU artifact sometimes more bytes are written than are received. This happens due to some CoAP block (with artifact chunks) are received more times, probably due to packet retransmission or so.
Expected Behavior
When only X bytes are received, then only X bytes need to be written to flash. Otherwise written flash image is corrupted and bootloader will detect that or writing to flash will fail due to exceeding flash partition.
Steps To Reproduce
Not sure now.
Logs, console output, or any kind of debug information
Zephyr Commit hash
v3.3.0
Golioth SDK Commit Hash
v0.6.0
Hardware Target
STM32L5
Current Behavior
When downloading DFU artifact sometimes more bytes are written than are received. This happens due to some CoAP block (with artifact chunks) are received more times, probably due to packet retransmission or so.
Expected Behavior
When only X bytes are received, then only X bytes need to be written to flash. Otherwise written flash image is corrupted and bootloader will detect that or writing to flash will fail due to exceeding flash partition.
Steps To Reproduce
Not sure now.
Logs, console output, or any kind of debug information
Logs 1:
https://gist.github.com/sense-Jo/6fead5e951da7447d637e39fe67bb914 ``` [00:00:22.407,000]