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

SDK14 Secure Buttonless DFU with Bonding

Hello,

I am currently trying to implement Secure Buttonless DFU in my application using the nRF52832, s132 v5.0.0, and SDK14; but I am having some issues that I am hoping someone can help me resolve.

The issue I am seeing is that the call tonrf_dfu_set_peer_data_init() returns a 1 and not a 0 which is causing VERIFY_SUCCESS to fail. In nrf_svci_async_function.h, it states that the return value is

Instance of the async SVCI interface and convenience functions for using it.

I can't seem to figure out why nrf_dfu_set_peer_data_init() is returning a 1. If the function doesn't return an error code, should there really be a call to VERIFY_SUCCESS?

Additionally, and I don't know if this error is related to the above issue, when I comment out the VERIFY_SUCCESS function mentioned above, my application starts up and I am able to connect to my device and interact with it. However when I try to enter the bootloader from the app, I can make it all the way to sd_ble_gatts_sys_attr_get inside of retrieve_peer_data, but the function returns NRF_ERROR_NOT_FOUND, which prevents the application from switching to the bootloader. Is this issue related to the one above or is this a separate issue?

If I use the bootloader without bonding then everything works as expected and I am able to successfully switch to the bootloader from the application.

To test transitioning to the bootloader I am using the nRFConnect app for Android, connecting to my device, subscribing to indications on the Secure Buttonless DFU characteristic, and finally writing 0x01 to the Secure Buttonless DFU characteristic.

Any help anyone can provide in helping me get my bootloader working with bonding would be greatly appreciated.

Thanks!

-Cory

Related