Using CoreBluetooth with iBeacons

后端 未结 2 1226
猫巷女王i
猫巷女王i 2021-02-06 14:04

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

相关标签:
2条回答
  • 2021-02-06 14:45

    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.

    0 讨论(0)
  • 2021-02-06 15:02

    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.

    0 讨论(0)
提交回复
热议问题