I'm trying to implement OTA DFU in our custom App with our nRF52832 acting as the device to be upgraded. Everything seems to work OK in that:
1. New image uploads to the device
2. App resets the device to transfer new image into correct area
3. App does a check to ensure the new image is OK, then confirms this with the device
4. App forces another software reset on the device
At this point, the device should start advertising again. But for some reason it stays connected to the client. I'm trying to work out how to prevent this happening, primarily as my App is only scanning for devices and grabbing the scan response data to update its info. It only needs to connect when its going to do an OTA DFU. But because it remains connected after the OTA DFU, things get all locked up.
Not sure if this needs to be driven from the client or the server side. Client is an iOS device running our custom App. I am also using the CTS on the server, so client and server are paired at some point. I believe this is a requirement by Apple for devices to access CTS on an iOS device.
Any ideas how I can ensure that the client doesn't automatically reconnect to the server after the final reset at the completion of the OTA DFU?
Cheers,
Mike