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

Mesh DFU Recovery

If the Mesh DFU process fails (maybe a packet gets dropped or something), what happens? Will the device get stuck in an unknown state? What does the recovery process look like?

Also is the DFU process atomic (as in, it completely succeeds or completely fails)?

  • Hello,

     

    If the Mesh DFU process fails (maybe a packet gets dropped or something), what happens? Will the device get stuck in an unknown state? What does the recovery process look like?

    There is a timeout that handles this. By default, it is set really long (10minutes), but you can change this. 

    There are to timeouts:

    1: Timeout from the first DFU packet: If the time between the first packet and the transfer complete exeeds TIMER_START_TIMEOUT_US (from nrf_mesh_dfu.c) then the DFU will be aborted.

    2: Timeout from the last DFU packet: If the time between two DFU packets exceeds TIMER_DATA_TIMEOUT_US (from nrf_mesh_dfu.c) then the DFU will be aborted.

    By default both of these defines are 600 000 000 µs = 10 minutes, but you can change them. (Obviously, with the current settings, the TIMER_DATA_TIMEOUT_US would be redundant).

    Also is the DFU process atomic (as in, it completely succeeds or completely fails)?

    Yes. If the DFU times out, or the keys and application version/ID doesn't match, the entire image is removed.

     

     Best regards,

    Edvin

Related