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

Dual Bootloader -- DFU (BLE) + UART?

Wondering if there are any example/reference implementations of a bootloader for the nRF51822 that support Device Firmware Update over both UART and BLE? We've got the BLE stuff working well, but would like to make sure that we've got UART for those that might not have a compatible BLE SmartPhone.

Thanks!

  • Hi Hung, I modified the dfu_transport.h, dfu_transport_serial.c, dfu_transport_ble.c and bootloader.c to have two transport options for DFU. I use the GPRGRET register to communicate the transport mode to bootloader through app. The serial DFU works great but the BLE/OTA DFU fails. Whenever I start the DFU through nRFToolbox app, the device enters the bootloader successfully but the update fails at 0% showing "Error: REMOTE DFU OPERATION FAILED". I have not modified the above files beside just changing the names of the functions (dfu_transport_update_start and dfu_transport_close) and added a #define for new GPREGRET pattern. I use SDK11.0 and nrf52832. Can you help me out?

  • @Sourabh: You may need to make sure the memory buffer (hci_mem_pool) was configured correctly for each transport mode. They both have the file hci_mem_pool_internal.h inside ble_transport and hci_transport but the values configured inside are different.

    If you configured them correctly but still have the problem, you may want to capture a sniffer trace to check what exactly fail.

  • Hey Hung, is possible make what @Mike and @DarrenBeckwith are trying using the SDK13? using the example BLE secure bootloader I cant find wheres it calls the BLE transport layer to make the same with the dfu_transport_serial.c

    Thanks

  • @Arepa: The newer DFU bootloader made it even easier to have multiple transport layers when doing DFU. I haven't tried myself, but as I can see in the nrf_dfu_transport.c , all transport layers will be initialized via the use of dfu_trans section. So any transport layer that registered with DFU_TRANSPORT_REGISTER() will be used.

    What you can do is to simply include both nrf_ble_dfu.c and nrf_serial_dfu.c to test.

    Let me know if you face any trouble.

  • Hi Hung Bui, In nRF52832,  SDK13.0.0, I just want combine BLE DFU and serial DFU in one project, when I add nrf_ble_dfu.c into bootloader_secure_serial demo, and modify some configuration items in sdk_config.h to support ble DFU. However, in combined project , BLE DFU can success, but serial DFU can't. Could you help me solve the problem?

    thank you very much.

Related