Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding distance from RSSI value of Bluetooth Low Energy enabled device

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.

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?

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

 - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral       *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI 
like image 993
puneet kathuria Avatar asked Dec 04 '12 14:12

puneet kathuria


People also ask

How do you calculate distance from RSSI?

You can calculate the distance information from RSSI value with this formula: Distance = 10^((Measured Power - Instant RSSI)/10*N). N is the constant for the environmental factor.

How do you calculate BLE distance?

Distance = 10 ^ ((Measured Power -RSSI)/(10 * N))

How can I find the distance between two Bluetooth devices?

Beacon technology generally estimates the distance between devices using the received signal strength (RSSI). Localization of Bluetooth devices is done by combining the distance estimate to several beacons, mounted at fixed and known locations, using triangulation with at least 3 anchors.

How RSSI is measured in BLE?

As part of the broadcast message decoding, the BLE software stacks return the Received Signal Strength Indicator (RSSI) value. This value can be used to approximate distance and when measurements from multiple devices are combined, the device position can be estimated with accuracy of 1 to 4 meters (3 to 12 feet).


1 Answers

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.

like image 159
henrik Avatar answered Sep 30 '22 19:09

henrik