Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Trouble with background reconnection after reset (iOS)

Hello,

I'm experiencing some problems reconnecting an iOS device (possibly same thing on Android) to my peripheral in the background. This happens most of the times after a peripheral reset. With background I mean my app is closed (running in the background, not killed).

My peripheral advertises fine as usual and the phone can always connect to my peripheral if it actively scans for my device. The problem happens when the reconnection is handled by iOS in the background. Sometimes it just can't connect, probably because it can't see the advertisement packets.

One possible cause for this might be that iOS caches the advertising intervals after connection, and on disconnection it only starts scanning in those intervals to save power. Then on peripheral reset, the peripheral starts advertising in the same intervals but phased out, therefore the scan intervals and the advertising intervals would miss each other. That's just a theory.

Does anyone have an idea about what my problem is? And what can be done to solve it, either on the firmware side or on the app side?

Thanks for your help!

Related