Search code examples
ioscore-locationibeaconcore-bluetoothbeacon

How estimote/kontakt identify a specific beacon?


I am using iBeacon on iOS, I am trying to identify each beacon in order to attach some information depending on each beacon, for example, I am trying to get the location from a MAC ADDRESS or even the beacon name.

I cannot use Core Location Library since it only gives me Proximity UUID with major and minor, I need something to tell me which beacon I scanned.

So, I switched to Core Bluetooth Library, but there I cannot retrieve the iBeacon advertising packet, the iOS hide it if the Scanned BLE is working on iBeacon protocol.

The question is, how Estimote for example, recognize their beacons? how can I get the advertising packets? I want to read each byte and get the information like I did in Android.


Solution

  • Unfortunatrly, you simply cannot do this with public APIs. CoreLocation only provides ProximityUUID, major and minor. CoreBluetooth blocks access to the raw bytes of any packet whose preamble matches the iBeacon prefix. Neither API will reveal the Bluetooth MAC.

    Beacon manfucaturers often build config apps that use a separate and proprietary Bluetooth GATT configuration service. The beacon can perform a two way connection with the phone using this proprietary service and exchange data fields, telling you all the identifiers including the Bluetooth MAC. Unfortunately, you probably cannot use such a private proprietary configuration service unless you get the specs from the manufacturer or reverse engineer it with a Bluetooth packet sniffer.