No call to didDiscoverServices, requiring reboot of iOS device
Hi all, I have an nRF51822-based custom peripheral advertising one service. In general, I am able to successfully use CoreBluetooth to selectively scan, connect, retrieve services, retrieve characteristics, subscribe to a notification, receive notify data, and handle automatic re-connection -- working reliably, all without issues. However, after using the device with multiple reconnects and multiple restarts of my app, I am sometimes able to enter a strange state. In this state, I can successfully selectively scan and connect. However, the CBPeripheral's services field is nil (as usual), but my call to discoverServices is never returned with a didDiscoverServices. I am able to successfully readRSSI during this time, and the device remains connected until I terminate the connection. After 10 seconds, my watchdog timer kicks in and re-initiates the scan and connection, but I can change the watchdog time and/or let this loop for hours, and the didDiscoverServices will *never* call back. The only "solution" is to power-off and power-on my iOS device (tested on iOS 7.0.3 on iPhone 5S, iPad, and iPad mini). Hard-killing my app has no effect. Turning Bluetooth off and on in Settings has no effect. Power-cycling my peripheral has no effect. Having multiple or only a single powered-on peripheral has no effect. The only fix is to power-cycle the entire iOS device. Unfortunately, I do not have a reliable procedure to replicate this state, but it happens for our developers a few times per day. Has anyone experienced a similar issue and can suggest how to debug further? Many thanks in advance. Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Mike Robbins