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

Buttonless DFU not starting unless reconnect

Hi,

I am trying to implement buttonless DFU by following the ble_app_hrs example provided in the SDK and modifying the bootloader (nRF51_SDK_10.0.0\examples\ble_peripheral\ble_app_hrs\pca10028\s110_with_dfu and nRF51_SDK_10.0.0\examples\dfu\bootloader\pca10028\dual_bank_ble_s110).

I have successfully added the DFU service to my application, created a .zip archive using methods in this post and finally programming the bootloader with the correct bits set using suggestions from this post.

When connecting to my device using the nRF Master Control panel app on Android, the DFU button is present and I am able to enter the DFU mode and select the .zip file with the new firmware.

Once entering the upload mode I see the messages: Initializing... Starting DFU... Starting Bootloader... and finally Connecting... in the nRF Master Control Panel.

Here the application get stuck, and the upload never start.

However, if I now (in the nRF control panel app) go back to the "Scanner" tab and re-scan I can reconnect to my device and press the DFU button again. This time the DFU works. The new firmware is uploaded and and my application starts as expected.

Does anyone have a clue why the DFU gets stuck the first time? Did I perhaps forget to set some flags, or need to modify the bootloader? I would of course like my app to upload directly without having to reconnect.

Thanks for any suggestions /Fredrik

Related