# Using the RSSI value from BLE HM-10 to measure distance

Hi ,

I'm currently working measuring the distance in 1dimention from the RSSI value I obtain from the HM10 BLE module ( Basically converting from RSSI to meters ).

After some research , I found out that this equation is the way to go :

d = 10 ^ ((txPower-Rssi) / 10n) , where n ranges from 2 to 4

I tried finding out the value of Tx and based on data in receiving the measured power is C5 which is 197 in decimal .

I looked into the data sheet for the HM-10 module to find out what value C5 means but I didn't find anything

I also looked at the operating power for the BLE module and it was 0 dBm which is 1mW

so the main 3 questions for anyone who used the RSSI to measure distance or has an idea how to do this are :

1. what is the txPower in this case ? is 1mW ? or is it mapping 0.01-5mw(which is the possible operating power for the ble) to 0-255 ? or is it something else ?

2. what is the value of n for this module ?

3. is there another equation that would result in a better result ?

an answer for any question would really help I already have an idea on how to do Trilateration but I just want to get the main conversion done first

Do not cross post.

1. dist = random(1,255);

Well some beacons Do not send a standard iBeacon advertisement (an “AD structure”) and thus you won’t see a record with the reference info (“txPower” or “measuredPower” calibration). So you need to build a reference for devices you know/have.

d = 10 ^ ((txPower-Rssi) / 10n) , where n ranges from 2 to 4

See the formula (4) page 4?

The distance estimation model proposed by Texas Instruments for the Chipcon CC2420 radio is given as:

RSSI = −(10 × n)log10(d) − A

where A is the RSSI value measured when the separation distance between the receiver and the transmitter is one meter.

So this is basically the formula you have taken as being good for you, just rewritten to show the distance as a function of the other elements.

But…

1/ I am not sure you have that Texas Instruments chip, so you might want to question the formula

2/ the article conclusion was as follow

According to the observations that the processed RSSI does not fit the value given by the reference curve, RSSI is rendered unreliable as the only input to determine the location of a mobile node in an indoor environment.

Also you might want to read about the work from former startup WiFiSLAM or why in android or iOS beacon implementation they just give a pretty wide range indication of distance (Immediate, near, far, away)