33

我正在研究低功耗蓝牙概念项目。我得到的 RSSI 值介于 1 到 100 之间。当我移动标签时,RSSI 值会随着外围设备远离 iPhone 而增加,而随着它靠近而减小。

任何人都可以帮助我根据 RSSI 值获得 iPhone 和蓝牙标签之间的确切距离吗?有没有可用的公式?

借助这种蓝牙低功耗委托方法,我得到了设备的 RSSI 值:

 - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral   
   *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI
4

4 回答 4

34

I answered this in another thread, repeating it here.

In line-of-sight (no obstacles causing change in RSSI), -6dB seems to be double the distance.

If you at 1m distance read RSSI -40dB then 2m gives -46dB, 4m gives -52dB, 8m gives -58dB, 16m gives -64dB.

You can not get an exact position, only a circular maximum distance.

Using triangulation with 2-3 or more devices you get a much more accurate positioning result. You can get this purely from Advertisement packages but you must either Disable scan -> Enable scan or tell iOS CoreBluetooth to report all adv packages.

In foreground mode you can do this but in background mode you can't get all adv packages. You must connect and read RSSI to do it in the background.

于 2012-12-05T13:11:31.623 回答
28

有很多基于 RSSI 的定位技术,例如三角测量和指纹识别。它们都不是完美的。RSSI 受障碍物、多径衰落、天线极化和交叉体屏蔽等许多因素的影响。

RSSI和距离之间的理论关系是这样的:

RSSI[dbm] = −(10n log10(d) − A) 

其中d是距离,A是偏移量,它是距离 BLE 设备 1 米处测得的 RSSI。

只需谷歌搜索RSSI[dbm] = −(10n log10(d) − A),您就会找到一些有关它的资源。

于 2013-03-01T04:01:12.200 回答
10

找到与 RSSI 的距离有点棘手,它取决于很多因素,甚至测试环境和天线方向等。下面的论文正在对相同的 http://www.s2is.org/Issues/v1/n2/papers/进行一些研究论文14.pdf

于 2012-12-07T04:25:09.450 回答
1

在迅速的 4.2

func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {
if let power = advertisementData[CBAdvertisementDataTxPowerLevelKey] as? Double{
   print("Distance is ", pow(10, ((power - Double(truncating: RSSI))/20)))
   }
}

更详细的答案在这里

于 2019-01-25T08:20:53.607 回答