Using CoreBluetooth with iBeacons
I’ve been doing quite a bit of research on iBeacons and CoreBluetooth on iOS devices. Your posts and research have been great. I’ve learned quite a bit. Unfortunately, i’m running into a dead end as it pertains to what I actually want to do.
…and it points out that you can’t really do much with CoreBluetooth without the proximityUUID. That said, what if I actually DO have it?
What i want to do is place iBeacons around a given location. I’ll use the
didEnterRegion CLLocationManager delegate method to know when we’ve entered the region. I want to use that to trigger some CoreBluetooth monitoring of the beacons so it can be done in the background. I only need the RSSI and a unique identifier (I can do without the Major and Minor for now), which i’ve been able to get in the foreground, but not in the background.
I was under the impression that I should still be able to get this basic data in the background if my app had ‘bluetooth-central’ (now “App Communicates using CoreBluetooth”) set.
Can you shed any light on what I’m trying to do? At present, it doesn’t seem like anyone else has tried this and I’d love to get it going and share it, as it seems like a viable work-around if I can get past this barrier.
- Recording from Built-In Mic when Playing through Bluetooth in iOS
- Finding generic Bluetooth devices within reach
- How to get the status of bluetooth (ON/OFF) in iphone programmatically
- NSPredicate in showBluetoothAccessoryPickerWithNameFilter
- iOS 7 Core Bluetooth Peripheral running in background
- Sending image file over Bluetooth 4.0 LE
2 Solutions Collect From Internet About “Using CoreBluetooth with iBeacons”
As mentioned in the blog post, you cannot get any of the iBeacon identifiers out of the CoreBluetooth APIs because iOS does not provide access to the raw advertising data that encapsulates these identifiers.
You may be able to do correlations. If only one BluetoothLE device is visible, and you just saw an iBeacon using CoreLocation APIs, you can continue to track the beacon with CoreBluetooth, reading the RSSI as you suggest.
The trouble comes when multiple BluetoothLE devices are visible. Without access to the iBeacon identifiers in CoreBluetooth, how will you know which device you are seeing in CoreBluetooth lines up with which of the iBeacons you see with CoreLocation? Unfortunately, I do not think there is any way to match them up.
As suggested, is not possible but almost every big manufacturer like Kontakt.io or Estimote uses a special UUID Service for identifier, battery and other things.
You can write your own framework that recognize this kind of iBeacon using CoreBluetooth, keep in your mind that Service UUID data is not the major, minor, uuid etc.. but just an identifier of a device, you should definitely create a database or plist with matching between id of Service data and UUID, major and minor of iBeacon.
In this way you are able to take every packet from iBeacon and do your stuff with it.
- Xcode 8 Image Completion
- iOS Custom Status Bar Background Color not displaying
- Xcode 6 Standard architectures exclude armv7s
- How to compare UIColors?
- UIButton's Selected State not working in iOS7
- Most common array elements
- Grouping a Core Data data result?
- How do I make a semi-transparent view layer above a current view?
- Changing value of a NSNumber
- Cocoapods pod stable build setting
- Swift: how to use PREPROCESSOR Flags (like `#if DEBUG`) to implement API keys?
- How do I use basic auth with RestKit's getObject?
- Why status bar font size changes on iphone 6?
- How to replace nth character of a string with another
- AVPlayer Video SeekToTime