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

nRF51822 Dfu from own ble application

When starting with nRFgo Studio "Erase all", "Program SoftDevice" & "Program Bootloader" to have a almost virgin base without an application, I succeed perform an over the air update and got a running application afterwards.

But from this point, when e.g. version 1.0 of my application is currently runnung and I want to update it over the air to version 1.1, it currently won't work.

Seems that I have to append my own application with DFU service, isn't it? Is there an example available which provides such functionality (preferably compiles with gcc)? How to extend the sdk's nrf6310/s110/ble_app_hrs example for that ability?

Well, I think the application should not do the update job fully itself. Rather should the application e.g. do maybe some DFU initialization and than transfer the control to the bootloader which performs the main job of the update.

BTW: When using nRF Master Control Panel (on Android), I sometimes see the [DFU] button even when my own application is running. But I think that's a bug in the Android app, because the button is not working properly. The iPhone app "nRF Loader" does not see a DFU target in that case.

Related