| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Experimental: Buttonless DFU Template Application
This example requires one of the following SoftDevices: S130, S132, S332

Important: Before you run this example, make sure to program a SoftDevice.

The Buttonless DFU Template Application is an example that includes the functionality of doing buttonless DFU using the hardware delivered in the nRF5 Development Kit.

The application includes the three services in the Heart Rate profile:

- Buttonless DFU Service

When the application starts, the Board Support Package is initialized. Next, the buttonless DFU service is initialized.

When notification of DFU control point characteristic is enabled, and the value 0x01 is written to it, the device will disconnect, send the event BLE_DFU_EVT_ENTERING_BOOTLOADER, and enter the bootloader.

Note
  It is recommended to have security enabled on the DFU characteristic.
  This application is not power optimized!
  The application will stop advertising after 3 minutes and go to system-off mode. Push the button 1 to restart advertising.

# Setup

You can find the source code and the project file of the example in the following folder: `<InstallFolder>\examples\ble_peripheral\experimental_ble_app_buttonless_dfu`

Button assignments: BSP BLE Button Assignments

# Testing

Test the Buttonless DFU Template Application with the nRF Toolbox app, which is available on both iOS (App Store) and Android (Google Play).

You can also test the application with the Master Control Panel by performing the following steps:

1. Compile and program BLE Secure DFU Bootloader.
2. Compile the Buttonless DFU Template Application.
3. Transfer the application over BLE as described in BLE Secure DFU Bootloader.
4. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
5. Connect to the device from Master Control Panel (the device will be advertising as 'Nordic_Buttonless'), then perform service discovery. Observe that the BSP_INDICATE_CONNECTED state is indicated.
6. Click the 'Enable services' button on the Master Control Panel.
7. Write 0x01 to the control point and observe that the device enters bootloader mode.