gpt4 book ai didi

ios - iBeacons : how to get broadcasted beacon power (txPower)

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:05:19 25 4
gpt4 key购买 nike

iBeacons 似乎广播它们的 txPower 参数(报告 1 米距离的 RSSI 功率),用于计算 beacon.accuracybeacon.proximity 属性(iBeacon 的详细信息可以找到广告包 here )。

但是,CLBeacon 类似乎没有 txPower 的属性。有没有一种方法可以使用 Core Location 框架获得 txPower,或者我需要使用 Core Bluetooth?我需要这个的原因是我想试验自定义信标精度/接近度计算,以实现非常快速的信标即时范围发现。在这种情况下,根据 accuracy 反向计算 txPower 是没有帮助的。

最佳答案

很遗憾,您无法使用 CoreLocationCoreBluetooth 以编程方式获取此值。 Apple 使用 CoreBluetooth 阻止对所有 iBeacon 数据的访问(请参阅我对此 here 的分割。)与 CoreLocation 类似,它根本不会在 CLBeacon 类,如您所见。

既然你说你不能进行逆向计算,那么我能想到的唯一其他方法是:

  1. 使用 Android、OSX Mavericks 或 Linux 设备,这些设备对读取此字段没有此类限制。
  2. 在您的 iOS 应用程序中为您的所有 iBeacon 创建一个查找表(具有唯一的 UUID/主要/次要值与它们的 txPower 值)

上面的选项 2 显然要求您为所有被测 iBeacon 分配唯一标识符。

关于ios - iBeacons : how to get broadcasted beacon power (txPower),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24001702/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com