查找蓝牙低功耗设备的RSSI值的距离

时间:2021-01-12 13:13:34

I am working on Bluetooth low energy concept project. I am getting the RSSI value between 1 and 100. As I move the tag the RSSI value increase as the peripheral moves away from the iPhone and decreases as it moves closer.

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

Can anybody help me to get exact distance between the iPhone and the Bluetooth tag based on the RSSI value? Are there any available formulas?

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

I am getting the RSSI value of the device with the help of this bluetooth Low energy delegate method:

我借助这种蓝牙低能量委托方法获得设备的RSSI值:

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

3 个解决方案

#1


32  

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.

在视线范围内(没有障碍导致RSSI发生变化),-6dB似乎是距离的两倍。

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

如果你在1m距离读取RSSI -40dB然后2m给出-46dB,4m给出-52dB,8m给出-58dB,16m给出-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.

使用2-3个或更多设备进行三角测量可以获得更准确的定位结果。您可以完全从广告包中获取此信息,但您必须禁用扫描 - >启用扫描或告诉iOS CoreBluetooth报告所有adv软件包。

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.

在前台模式下,你可以这样做,但在后台模式下,你无法获得所有的adv包。您必须连接并读取RSSI才能在后台执行此操作。

#2


26  

There are quite a number of RSSI-based localization techniques like triangulation and fingerprinting. None of them are perfect. RSSI is affected by many factors like obstacles, multipath fading, antenna polarization and cross-body shielding.

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

The theoretical relationship between RSSI and distance is something like this:

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

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

where d is the distance and A is the offset which is the measured RSSI 1 meter point away from the BLE device.

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

Simply google for RSSI[dbm] = −(10n log10(d) − A) and you will find some sources about it.

只需谷歌RSSI [dbm] = - (10n log10(d) - A),你会发现一些相关的来源。

#3


9  

Finding distance from RSSI is bit tricky and it depends on lots of factors, even test environment and antenna orientation etc. Following paper is having some study regarding the same http://www.s2is.org/Issues/v1/n2/papers/paper14.pdf

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

#1


32  

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.

在视线范围内(没有障碍导致RSSI发生变化),-6dB似乎是距离的两倍。

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

如果你在1m距离读取RSSI -40dB然后2m给出-46dB,4m给出-52dB,8m给出-58dB,16m给出-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.

使用2-3个或更多设备进行三角测量可以获得更准确的定位结果。您可以完全从广告包中获取此信息,但您必须禁用扫描 - >启用扫描或告诉iOS CoreBluetooth报告所有adv软件包。

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.

在前台模式下,你可以这样做,但在后台模式下,你无法获得所有的adv包。您必须连接并读取RSSI才能在后台执行此操作。

#2


26  

There are quite a number of RSSI-based localization techniques like triangulation and fingerprinting. None of them are perfect. RSSI is affected by many factors like obstacles, multipath fading, antenna polarization and cross-body shielding.

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

The theoretical relationship between RSSI and distance is something like this:

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

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

where d is the distance and A is the offset which is the measured RSSI 1 meter point away from the BLE device.

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

Simply google for RSSI[dbm] = −(10n log10(d) − A) and you will find some sources about it.

只需谷歌RSSI [dbm] = - (10n log10(d) - A),你会发现一些相关的来源。

#3


9  

Finding distance from RSSI is bit tricky and it depends on lots of factors, even test environment and antenna orientation etc. Following paper is having some study regarding the same http://www.s2is.org/Issues/v1/n2/papers/paper14.pdf

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