Can I make iPhone/iPad broadcast as Eddystone Beacon?

蓝咒 提交于 2019-12-03 07:10:51

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.

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