{{announcement.body}}
{{announcement.title}}

# Formula to Convert the RSSI Value of the BLE (Bluetooth Low Energy) Beacons to Meters/Feet

DZone 's Guide to

# Formula to Convert the RSSI Value of the BLE (Bluetooth Low Energy) Beacons to Meters/Feet

### Easy way to find the distance between two devices using bluetooth technology.

· Open Source Zone ·
Free Resource

Comment (0)

Save
{{ articles[0].views | formatCount}} Views

Due to the pandemic situation because of coronavirus (Covid-19), many developers are working on Bluetooth, NFC, Geolocation, Ultrasound, GPS/GPRS, etc. technologies to implement social distance approach or showing the affected area etc.

How to manage social distancing using Bluetooth technology?

You should have basic knowledge about below parameters, which are in use with bluetooth technology.

For Bluetooth, it is the strength of the beacon’s signal as seen on the receiving device, e.g. a smartphone. The signal strength depends on distance and Broadcasting Power value. Bluetooth works with broadcasting signals and that broadcasting power value is around 2–4 dBm — and due to that, the signal RSSI strength will be around -26 (a few inches) to -100 (40–50 m distance).

To calculate Bluetooth Proximity between two unpaired/paired devices and the beacon using another value defined by the iBeacon standard; i.e Measured Power

Due to external factors influencing radio waves — such as absorption, interference, or diffraction — RSSI tends to fluctuate. The further away the device is from the beacon, the more unstable the RSSI becomes.

## Measured Power

Measured Power is a factory-calibrated, read-only constant which indicates what’s the expected RSSI at a distance of 1 meter to the beacon. Combined with RSSI, it allows to estimate the distance between the device and the beacon.

However, you can change it in the raw chips using Arduino etc if you have access to the AT-commands of the BLE chip. There is another factor which also affect the continuous signal, i.e. Advertising Interval (Have a look at it below)

The shorter the interval, the more stable the signal. Keep in mind that adjusting Advertising Interval will impact battery life in a long way.

This was the basic about you should know before implementing anything with BLE

Now Let’s talk about the formula and conversion.

## Formula

Keep four parameters in your mind

1. Distance
2. Measured Power
4. N (Constant depends on the Environmental factor. Range 2–4, low to-high strength as explained above)

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

BLE uses Measured Power is also known as the 1 Meter RSSI. So consider value of Measured Power = -69

RSSI = Obtained RSSI value from the devices (For example, you obtained -80)

N = 2 (Consider Low strength)

Put the values to above formula to calculate the distance:

Distance for RSSI -80 = 10 ^ ((-69 - (-80))/(10 * 2)) = 3.54 meters

• Distance for RSSI -75 = 10 ^ ((-69 - (-75))/(10 * 2)) = 1.995 meters ≅ 2 meters
• Distance for RSSI -69 = 10 ^ ((-69 - (-69))/(10 * 2)) = 1 meter

If you want to calculate your distance, just copy below expression, change your RSSI value (Highlighted as bold fonts) and paste to google search engine.

10 ^ ((-69 - (<RSSI_VALUE>))/(10 * 2))

Note : Please note that, this calculated distance is approximated.

## Formula to calculate Meters to Feet:

ft = m * 3.2808

If you are looking for the example to alert people when some device comes near by you, or in other language, If you want to implement social distancing concept using BLE technology, You can use this forked project on GITHUB. You can also contribute to make it work with high accuracy.

If you find a way, about how to calculate exact distance with BLE technology then please comment below or you can contribute on Github, Your help will be appreciated.

Topics:
ble solutions, bluetooth, covid-19, tutorial

Comment (0)

Save
{{ articles[0].views | formatCount}} Views

Opinions expressed by DZone contributors are their own.