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

Run a function after successful DFU

I've looked through the Devzone, but couldn't find an answer to my question.

We are looking to automate the OTA process. When our nRF52 device is charging, it advertises as being ready for DFU. We can then connect to the device with an Android phone and perform the application update with a zip package.

Since the device is still on the charger after the update is finished, it starts advertising again as if it's ready for DFU. Therefore I'd like to run a function at this point, so I can stop the advertising, and give a LED indication that the DFU is finished.

My question is, where to add a function that runs after the DFU is finished? Another approach with the same result is also fine of course.

Thanks in advance!

Related