This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Failure in BLE DFU: Does it retry or stop the DFU process altogether?

Hello,

I'm working on a bootloader based on the examples in SDK 13.1. As we have expanded its functionality, I'm now wondering what happens when one of the steps in the DFU process fails.

If let's say, one of the commands responds with an error code different than NRF_DFU_RES_CODE_SUCCESS, will the NRF Connect/Toolbox app try to send the same command again? Or will it say that the DFU process failed and it should be restarted?

I don't know how to force the DFU process to fail on "normal" conditions, so I don't know how to test that. I know I can provide corrupted init packets but that's not the error I want to test.

Thanks for your help!

  • Hi Andy,

    As explained here, if there is something already transferred, the DFU master will continue from the last block if not all of the image is transferred.

    The information about last block transferred and offset is stored in flash in bootloader setting.

    If you want to start from the beginning, you can simply send the init packet again and the bootloader will erase the previous stored progress in bootloader setting.

    You can test this by say, try to disconnect the phone or power reset the device in the middle of the DFU updating.

Related