iBeacons 似乎广播了他们的 txPower 参数(报告 1 米距离处的 RSSI 功率),该参数用于计算 beacon.accuracy
和 beacon.proximity
属性(详情在 iBeacon广告包可以找到here)。
但是,CLBeacon
类似乎没有 txPower 的属性。有没有办法可以使用 Core Location 框架获得 txPower,或者我需要进入 Core Bluetooth?我需要这个的原因是我想尝试自定义信标精度/接近度计算,以实现非常快速的信标即时范围发现。在这种情况下,从 accuracy
反向计算 txPower 是没有帮助的。
很遗憾,您无法使用 CoreLocation
或 CoreBluetooth
以编程方式获取此值。 Apple 使用 CoreBluetooth
阻止对所有 iBeacon 数据的访问(参见我对此的分割 here 。)与 CoreLocation
类似,它根本不会在 CLBeacon中公开code> 类,如你所见。
既然你说你不能做逆向计算,那么我能想到的唯一其他方法是:
上面的选项 2 显然要求您为所有正在测试的 iBeacon 分配唯一标识符。
关于ios - iBeacon : how to get broadcasted beacon power (txPower),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24001702/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) | Powered by Discuz! X3.4 |