Can I make iPhone/iPad broadcast as Eddystone Beacon?

Deadly 提交于 2019-12-04 13:03:05

问题


We can make iOS devices act as a iBeacon transmitter and We can locate nearby iBeacons if we know their Proximity UUID.

With Google's Proximity Beacon API, It's possible to configure and register real Beacon hardware, and we can locate them with Nearby Messaging API.

But is it possible to make iOS devices to broadcast as Eddystone Beacons ? And it needs to be discoverable by apps that scan Eddystone beacons.

Thanks in advance.


回答1:


Unfortunately, this is not possible. While iOS devices can advertise Bluetooth LE service advertisements(which are the advertisement type used by Eddystone) using CoreBluetooth APIs, you cannot attach the necessary data. This is because the CBAdvertisementDataServiceDataKey that associates service data to an advertisement is read-only on iOS. You can't set the data.

So while you want to make the iOS device advertise something like this to transmit Eddystone-UID:

0201060303aafe1516aafe00e72f234454f4911ba9ffa6000000000001

You end up advertising something like this:

0201060303aafe0316aafe

This leaves off the Eddystone-UID type code (00), the calibrated power (e7), the namespace identifier (2f234454f4911ba9ffa6) and the instance identifier (000000000001). As a result, it won't be recognized as an Eddystone-UID frame.



来源:https://stackoverflow.com/questions/35175035/can-i-make-iphone-ipad-broadcast-as-eddystone-beacon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!