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

Enabling authentication before connecting to DFU service from nRF master control panel/toolbox app?

On the dfu bootloader example given on nrf51 SDK 8.1.0, how can I enable the pairing before connecting to it using the nRF toolbox Android app?

  • You can modify the permissions of the characteristics that make out the DFU service to require pairing. This will trigger the appropriate security procedures, which you need to add handling to. See this message sequence chart.

    I'm not sure about the nRF toolbox android app. It depends on whether the android BLE API will automatically perform the required security procedures (which I assume it will).

  • It is not possible to do pairing while in DFU mode in the current SDK bootloader example because it does not implement handling of pairing requests (Device manager). Support for pairing/bonding can be implemented as @shibshab mentioned, but it would likely require you to allocate more flash space for the bootloader.

    Instead of implementing this in the bootlaoder, I think it's better to use the bond sharing in your application. You can then change the security requirements in you application to make pairing a requirement to perform butonless DFU.

Related