9 years, 3 months ago.

Enabling DFU Service on HeartRate Example

How do you enable the DFU service? The docs seem to suggest that the 'ble.init()' call should do this, however, when trying to do FOTA with an nrf51822 and the Heart Rate example, the nrf app for ios says "No DFU service activated". Despite the code having the init call.

What do i need to do, to enable this service?

Thanks.

Question relating to:

High level Bluetooth Low Energy API and radio abstraction layer

1 Answer

9 years, 3 months ago.

The DFU service is enabled by default when building for the FOTA version of the platform. Else you can also explicitly create an instance of it in your application. There is a lot of documentation around the FOTA process at https://developer.mbed.org/teams/Bluetooth-Low-Energy/wiki/Firmware-Over-the-Air-FOTA-Updates

Driving FOTA is a two stage process: https://developer.mbed.org/teams/Bluetooth-Low-Energy/wiki/Firmware-Over-the-Air-FOTA-Updates#driving-fota Your Nordic app won't respond to a FOTA-able target directly.

But then why does the Nordic app work with all other DFU enabled apps? How do I drive a FOTA update when using the HeartRate example, if I can't use the app?

posted by George Edwards 31 Aug 2015

The Nordic Master Control Panel can be used to drive FOTA in a two stage process. In the first stage, the app on the BLE device is triggered to enter DFU mode (i.e. to switch to the bootloader). In the second stage, the MasterControlPanel does the normal FOTA.

The application on the BLE device can be triggered into DFU mode in other ways; you could, for instance, use a button to make it enter DFU mode. If DFU mode is active, then the Nordic MCP can do FOTA directly.

posted by Rohit Grover 01 Sep 2015

OK, and how do you enable the DFU mode? - ideally in code?

posted by George Edwards 01 Sep 2015

bootloader_start()

refer to how the DFUService does it.

posted by Rohit Grover 01 Sep 2015