Hello,
I'm testing the bootloader with SDK v.15 and I found a state when DFU won't resume (on BLE transport).
I crashed nRF Connect randomly, in that case, between the first and second object. Here is the log:
<debug> app: Shutting down transports (found: 1) // BLE disconnected from remote
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (data) // Second block creation
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x00051000, len=1 pages), queue usage: 0
<debug> nrf_dfu_req_handler: Creating object with size: 4096. Offset: 0x00001000, CRC: 0x1B4AC781
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_flash: Flash erase success: addr=0x00051000, pending 0
<debug> nrf_dfu_ble: Advertising...
Then, it won't resume, even after reset, here is the log pointing out the error:
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (command)
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x2000A7C0, len=440 bytes), queue usage: 1
<debug> nrf_dfu_req_handler: Writing valid init command to flash.
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_ble: Set receipt notif
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_RECEIPT_NOTIF_SET
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (data)
<debug> nrf_dfu_req_handler: crc = 0x1B4AC781, offset = 0x1000, max_size = 0x1000
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)
<error> nrf_dfu_req_handler: Invalid data. expected: 4096, got: 0
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x8
<warning> nrf_dfu_ble: DFU request 4 failed with error: 0x8
The issue is that s_dfu_settings.progress.firmware_image_offset equals s_dfu_settings.progress.firmware_image_offset_last.
Do you have any idea how to fix that issue?
That issue looks critical as I simply can't resume the DFU if I try to send the same package. Here is a screenshot of nRF Connect:
Let me know if you have more question.
Best