My application uses BLE (Bluetooth 4) to connect to a physical peripheral device. My users and I repeatedly encountered an error when at some point the application stops connecting to the peripherals - you can see an indication of the detection of the BLE peripheral device and the establishment of the connection, but after a few seconds the connection will be deleted.
Everything returns to normal only after restarting iDevice.
Ive done a very long verification work and carefully studied this problem until I came to the conclusion that this should be a bug in iOS (tested with 7.1, but probably with 8.0).
My tests and conclusions:
- Occurs with every BLE supporting iDevice.
- It happens both with my own BLE peripherals and with other third-party BLE products, which, as you know, work fine in normal cases.
- It can sometimes work even for 50 starts, but then, in the end, it will fail.
- Network settings and factory reset did not help.
- Tested and happened with various applications: ##
- My own application.
- Clear the new Xcode project, which only scans for peripherals and tries to connect to the first and only detected peripheral device.
- Appendix BLE apple examples: Health thermometer (with corresponding changes since I do not have this particular peripheral device).
- Third-party applications, including generic LightBlue .
- Important Note. . Each of the above parameters worked fine for a while (several starts), at some point it suddenly stopped, and then worked again after rebooting the device.
- The connection procedure does not seem to work when trying to discover the services of peripheral devices, that is, it is detected and connected normally, but when the discovery of services is initiated, it stops responding (didDiscoverServices is not called).
- Of course, I tried many approaches found on the Internet, no luck.
Can anyone shed some light on this issue?
- Is this a known issue?
- Was this fixed in a recent iOS update?
- Will it be fixed?
You can imagine that my users have a negative impact on this problem, since the BLE connection is important for the product.
I will be grateful for your advice and suggestions on how to solve them.
Thanks!
Update:
Apple responded to my technical support request:
Bottom row (s):
- They said they fixed some BLE-related bugs in iOS 8 and urged us to check if this was all happening in iOS 8.
- They said start with this, and if not, try to diagnose the problem with the utility application that they provide.
So far this has not happened with iOS 8, but on the other hand I can see messages about other Bluetooth problems that are not necessarily related , but who knows.
Full answer:
I will answer your conclusion that you and your customers have discovered that after some point of use, iOS BLE does not support connection. You indicate that the problem has been identified with iOS 7.1. There was a question about iOS BLE that is being reported and fixed with iOS 8.0. To better determine if your problem has been resolved, of course, the easiest way would be to install iOS 8 and see if the problem can be replicated. However, letting you know that you can repeat the problem with your iOS 7.1, the first thing would be to get the profile of the Bluetooth server, install it on your own, replicate the problem, then get the BLE log file when the problem occurs. The profile will have an additional BLE server report registration data that can help report problems that the server encounters. We can see if the problem is the one previously reported. Something to keep in mind is that for the entire new bug report, Core Bluetooth technology requires that all problems be regressed with the current version of iOS - 8.0. Clients with iOS 7.x will no longer have iOS 7 updates - all software fixes and bug fixes will be with iOS 8. For this reason, only the issues reported in iOS 8 will be considered. You can get the BLE server profile from the web Apple Developer Bug Report site https://developer.apple.com/bug-reporting/ios/bluetooth/ , instructions for setting up a profile and journal entries on the web page. If you record a magazine using iOS 7.x, you can send it to me for review. However, this will be a somewhat academic exercise - to know whether iOS solves the problem, or if it persists, we will need to see if the problem occurs in iOS 8. Something needs to be kept in mind, as soon as you upgrade your device to iOS 8, you will not be able to recover its up to the previous version. I am happy to review my results. If, however, the problem persists in iOS 8, it is best to submit a bug report to get the basic Bluetooth technology attention to this issue. You can submit a bug report using the Apple Developer Error Report Web page. - http://bugreport.apple.com