LED array indication while dfu process in MCU boot

I am working on a project where my hardware includes an array of LEDs. I want to run an LED pattern on the array during the DFU process. I have tried to find a solution for this and found that there is an MCUboot indication LED macro available in Zephyr. However, I am unsure how to implement this on an array of LEDs.

  • Hi Abhijith,

    Thank you for your response.

    It's okay if you can't compare the nRF5 SDK and the nRF Connect SDK. thank you for your help with the MCUBOOT_INDICATION_LED configuration.

    Regarding the firmware packets, I have managed to implement a solution

    In case you don't want to modify sdk code, I used MCUmgr callbacks to implement something similar to what you describe:
    https://docs.zephyrproject.org/latest/services/device_mgmt/mcumgr_callbacks.html

    However, I would still like to know which driver file or BLE service file handles the downloading of packets from BLE. Additionally, it seems the MCUBOOT_INDICATION_LED is only for UART. Even after enabling it, the LED did not blink. I also tried printing logs in the main.c file of zephyr/boot to see where the code sets the LED, but none of those logs printed during a DFU over BLE. The only logs that printed were from the LED initialization function. It appears the indication LED may not be working for DFU over BLE.

  • hello Priyesh,

    Priyesh Shahi said:
    However, I would still like to know which driver file or BLE service file handles the downloading of packets from BLE. Additionally, it seems the MCUBOOT_INDICATION_LED is only for UART. Even after enabling it, the LED did not blink. I also tried printing logs in the main.c file of zephyr/boot to see where the code sets the LED, but none of those logs printed during a DFU over BLE. The only logs that printed were from the LED initialization function. It appears the indication LED may not be working for DFU over BLE.

    DFU over BLE is primarily managed by the Simple Management Protocol (SMP) service in the nRF Connect SDK. I recommend checking ncs\v2.x.x\zephyr\subsys\mgmt\mcumgr\transport\smp_bt.c, which handles the Bluetooth transport layer specific to SMP, and smp.c, which handles the core SMP.

    Yes, you are right that the MCUBOOT_INDICATION_LED feature is typically used for UART-based DFU and might not be directly tied to the BLE DFU process. I think you can achieve this by modifying the SMP callbacks

    Kind Regards,

    Abhijith

  • Thank you Abhijith,

    I will try with these files also.

Related