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

How to recognize that the DFU process is running

Hello,

I would like to signalize that the DFU process is running. I mean when I start to upload the application into the CPU, then a LED (for example) is ON, after uploading the LED is OFF. When the process is brokem the LED must be OFF.

Please, could you help me with finding the right place in the source code for implementation controlling the LED?

Thank you very much.

  • Hi Jiri,

    Could you tell which SDK you used ?

    Following information applied for SDK v12 and up.

    Currently, after the DFU bootloader advertise and get connected. We will switch the LEDs when there is BLE_GAP_EVT_CONNECTED event. Please have a look at ble_evt_handler() inside nrf_ble_dfu.c

    If you want to have more indication, especially when the image is sent, not only when the bootloader is connected, I think you can add the code to turn on the LED after dfu_handle_prevalidate() success in dfu_handle_signed_command() inside dfu_req_handling.c

    This is the point when we validated the init packet is correct and wait for the actual image to be sent.

Related