Question

I got the bluetooth low energy Heart Rate Monitor working using corebluetooth.framework on IOS 5.0. But some times I get the following problems.

1) Sometimes when I start the scan (with scanForPeripheralsWithServices method), It can not discover any BLE(Bluetooth Low Energy) devices until I turn off and turn on the Iphone Bluetooth manually. Occasionaly I had to reboot the phone also if the bluetooth turn off and turn on did not work.

2) Sometimes When I try to connect to the device for which I have stored the UUID previously, I was able to connect to the device, i.e, didConnectPeripheral delegate method was called but It never discovers any services even though I call [peripheral discoverServices:nil] i.e, I am not getting any data from the device in the delegate method didDiscoverServices. For this also I had to reboot the phone.

Was it helpful?

Solution

Try checking the archives here: http://lists.apple.com/archives/bluetooth-dev

and if you don't find it, send the question there. Many Apple Bluetooth engineers answer questions on that mailing list.

OTHER TIPS

1) It has something to do with the pairing routine on bluetooth low energy and the iPhone. The iPhone changes its ID every interval, I don't know how often, but it does. Have you tried just resetting/rebooting the slave device? This often works for me. The slave device also has a limited broadcast period, e.g 20-30 seconds.

2) Again, check that you have reset the slave. I don't know if you have built the device your self or bought a heart rate belt, but this is most often the solution. Oh and by the way, I had an issue where the didDiscoverServices actually jumped over an if-sentence, where I checked for a specific service. This did not fix it self until I rebooted the phone. Really weird behaviour, but I haven't found any other solution to this yet.

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