iphone可以用作具有涡流格式的信标吗

iphone可以用作具有涡流格式的信标吗

本文介绍了iphone可以用作具有涡流格式的信标吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解到Nexus6和Nexus9只能用作涡流格式的信标.目前,我没有任何一部电话.我有一个iPhone,可以用aniphone广播涡流格式吗?

I read that Nexus6 and Nexus9 can only act as beacon in eddystone format.Currently I do not have either of the phones. I have an iphone, can we use aniphone to broadcast eddystone format?

推荐答案

不幸的是,这是不可能的. Apple限制了其CoreBluetooth API可以发送的广告类型.虽然您可以使用与Eddystone相同的GATT服务UUID广播广告,但是您无法附加必要的数据.这是因为将服务数据与广告关联的CBAdvertisementDataServiceDataKey在iOS上是只读的.您无法设置数据.

Unfortunately, this is not possible. Apple restricts the type of advertisements that can be sent out by its CoreBluetooth APIs. While you can broadcast an advertisement with the same GATT Service UUID as required for Eddystone, 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.

因此,当您要使iOS设备发布这样的广告时:

So while you want to make the iOS device advertise something like this:

0201060303aafe1516aafe00e72f234454f4911ba9ffa6000000000001

您最终会发布这样的广告:

You end up advertising something like this:

0201060303aafe0316aafe

这将省略Eddystone-UID类型代码(00),校准功率(e7),名称空间标识符(2f234454f4911ba9ffa6)和实例标识符(000000000001).结果,它不会被识别为Eddystone-UID框架.

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.

这篇关于iphone可以用作具有涡流格式的信标吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 00:22