Question

Most of the time, the app we are coding works quite well with our BLE peripheral. Often for iPhone 5S users the device gets in a funk and whenever we scan for services, the didDiscoverServices: delegate method is never called. Rebooting the device or deleting all settings (General -> Reset -> Reset all settings) fixes the problem temporarily.

Once the device exhibits this problem, even other apps (eg. LightBlue) are affected; no peripherals are able to discover services until a reboot.

For context, our BLE peripheral does not currently support pairing.

What is causing this problem? Are there any ways to avoid causing the instability? Once it happens, is there a way that the app can recover from it automatically?

Some issues with similar symptoms: App doesn't Discover Services When Reconnecting and Not Scanning for Services in iPad Air

Update: Just FYI, I'm still working on this problem, but something we did caused it to happen way less (therefore it's not really a priority ATM). I don't know what caused the added stability yet.

Was it helpful?

Solution

It's probably an iOS bug

1) Enable bluetooth logging on your device https://developer.apple.com/bug-reporting/ios/bluetooth/

2) Use a packet sniffer to observe the connection between iOS and BLE peripheral

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top