iBeacons:如何广播信标功率(txPower) [英] iBeacons: how to get broadcasted beacon power (txPower)

查看:332
本文介绍了iBeacons:如何广播信标功率(txPower)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iBeacon似乎广播了他们的txPower参数(报告1米距离处的RSSI功率),该参数用于计算 beacon.accuracy beacon.proximity 属性(有关iBeacon广告包的详细信息,可在此处)。

iBeacons seem to broadcast their txPower parameter (report RSSI power at 1 meter distance) which is used in calculating beacon.accuracy and beacon.proximity properties (details on iBeacon advertisements packet can be found here).

但是, CLBeacon 类似乎没有txPower的属性。有没有办法可以使用Core Location框架获取txPower,还是需要使用Core Bluetooth?我需要这个的原因是,我想尝试使用自定义信标准确性/接近度计算来快速发现信标即时范围。在这种情况下,从准确性逆向计算txPower是没有帮助的。

However, CLBeacon class does not seem to have a property for txPower. Is there a way I can get txPower using Core Location framework, or need I to go down to Core Bluetooth? The reason I need this, is I want to experiment with custom beacon accuracy/proximity calculation for very quick beacon immediate range discovery. In this circumstances reverse calculating txPower from accuracy is no helper.

推荐答案

不幸的是,您无法通过 CoreLocation CoreBluetooth 以编程方式获得此值。苹果使用 CoreBluetooth 阻止访问所有iBeacon数据(请参阅我对此此处。)与 CoreLocation 类似,它根本不会显示在 CLBeacon 类。

Unfortunately you can not get this value programmatically with either CoreLocation or CoreBluetooth. Apple blocks access to all iBeacon data with CoreBluetooth (See my breakdown of this here.) Similarly with CoreLocation it is simply not exposed in the CLBeacon class as you have seen.

由于您说无法进行反向计算,因此我想到的唯一其他方法是:

Since you say you can't to do a reverse-calculation, then the only other ways I can think of to do this are:


  1. 使用未提供此类限制的Android,OSX Mavericks或Linux设备

  2. 在iOS应用中对所有iBeacon进行查找表(具有唯一的UUID /主要/次要值与其txPower值)

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

Option 2 above obviously requires that you assign unique identifiers to all your iBeacons under test.

这篇关于iBeacons:如何广播信标功率(txPower)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆