Bluetooth peripheral from another app knocking iBeacon down

Originator:george
Number:rdar://15537615 Date Originated:22-Nov-2013 05:24 PM
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification:Crash/Hang Reproducible:Always
 
George Villasboas22-Nov-2013 05:28 PM

Vídeo of the issue happening: http://www.youtube.com/watch?v=bKqQXGroO5Q&feature=youtu.be (private video)

George Villasboas22-Nov-2013 05:24 PM

Summary:
If you have an third party app that runs on background as a bluetooth peripheral service, turning an iDevice into an iBeacon will not be possible because it hangs the iBeacon advertisement after a couple of seconds.

I made a setup to prove this bug using very basic code showed on WWDC sessions about iBeacon, using 02 iPhones 5, one as a iBeacon and the other as an Ranger. On the device running as a iBeacon, I also installed an app that turns itself into a Bluetooth Peripheral on the background (in my case I used Knock to unlock).

When I turn the setup on without the Bluetooth Peripheral app running, every thing works as expected.

When I fire up the bluetooth peripheral app, the iBeacon device starts advertising for a couple of seconds and then stops.

There's a priority issue there, since iBeacons only run on foreground, it should have priority over any other bluetooth service.

I made a vídeo demonstrating the bug for further information and the source code used is also attached.

Steps to Reproduce:
1. Setup a device as a Beacon emitter and another as a ranger.
2. On the beacon device, open and authorise any app to run as a Bluetooth Peripheral Service.
3. Go back to the beacon device
4. Watch the ranging device stop sensing the beacon.

Expected Results:
Since iBeacons only work on foreground its expected to have priority over any other bluetooth service. But what happens is that the iBeacon advertisement is halted by the system.

Actual Results:
The third party bluetooth service app gets priority over the beacon broadcast, hanging it up.

Version:
Tested on iOS 7.0.3, 7.0.4 and 7.1 Beta 1 using different setups as emitters and rangers.

Notes:
The app used to simulate the Bluetooth Peripheral Service was "Knock (to Unlock)", available at: https://itunes.apple.com/us/app/knock-to-unlock/id692929970?mt=8

Configuration:
Occurs on any device (iPhone or iPad) running iOS 7.

Attachments:
'Sources.zip' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!