Bluetooth & BLE DISCUSSION

Estimating distance from BLE beacon RSSI: why do my readings jump around so much?

Started by fonseca BLE RSSI distancebeacon rangingpath loss exponentindoor positioningRSSI filtering
5 replies 248 views 6 participants
Latest activity · 30 Sep 2026

Estimating distance from BLE beacon RSSI: why do my readings jump around so much?

fonseca Bluetooth & BLE Forum
#1

I am building an indoor presence system with ESP32 scanners and small BLE beacons. I convert RSSI to distance with a formula from a tutorial, but a beacon lying still 3 m away reports anything from 1.5 m to 9 m, and the value changes when somebody walks past.

Is the formula wrong, or is RSSI simply not good enough for distance? What accuracy is realistic, and how do people get usable position data out of beacons?

Community replies 5

Re: Estimating distance from BLE beacon RSSI: why do my readings jump around so much?

#2

The usual formula is the log-distance path loss model: d = 10^((P_ref - RSSI) / (10 × n)), where P_ref is the RSSI measured at 1 m (the calibrated power value that beacon formats such as iBeacon carry in the advertisement) and n is the path loss exponent, 2 in free space and typically somewhere between 2.5 and 4 indoors.

Example: P_ref = -59 dBm and RSSI = -75 dBm. With n = 2 the result is 10^(16/20) = 6.3 m; with n = 3 it is 10^(16/30) = 3.4 m. The same reading gives two very different distances depending on a number you can only estimate for a given room.

Re: Estimating distance from BLE beacon RSSI: why do my readings jump around so much?

#3

The formula is fine; the input is the problem. Because the relationship is logarithmic, with n = 2 every 6 dB of error doubles or halves the distance, and indoor RSSI easily moves by 6 to 10 dB with nothing changing. Reflections from walls and furniture add and cancel at the receiver (multipath fading), so moving the beacon a few centimetres can change the level noticeably. A human body between the two devices absorbs 2.4 GHz strongly, which is what you see when somebody walks past.

Advertising also hops across three channels, 37, 38 and 39 at 2402, 2426 and 2480 MHz, and each one fades differently, so consecutive packets can disagree even in a still room.

Re: Estimating distance from BLE beacon RSSI: why do my readings jump around so much?

#4

Filter before you convert. Collect RSSI for a second or two per beacon, discard outliers and take the median, or run a simple exponential filter such as avg = 0.8 × avg + 0.2 × rssi. Filtering the RSSI in dB and converting once works better than averaging computed distances, because the distance error is skewed toward large values.

Calibrate P_ref yourself with your own scanner hardware at 1 m, in the orientation the beacon will be used. Antenna patterns of small boards are far from uniform, and the value stored in the beacon was measured with a different receiver.

Re: Estimating distance from BLE beacon RSSI: why do my readings jump around so much?

#5

A realistic expectation is proximity, not metres. Classifying a beacon as immediate, near or far, or deciding which scanner hears it strongest, is reliable. That is enough for room-level presence: put one scanner per room and assign the beacon to the room with the highest filtered RSSI, with some hysteresis so it does not flip at doorways.

Trilateration from three RSSI distances looks good on paper, but the errors are usually larger than the room. Fingerprinting, where you record the RSSI pattern at known spots and match against it, performs better if you can afford the survey.

Re: Estimating distance from BLE beacon RSSI: why do my readings jump around so much?

#6

If you need real ranging, look at features designed for it rather than RSSI. Bluetooth 5.1 added direction finding (angle of arrival and angle of departure, using antenna arrays), and Bluetooth 6.0 added Channel Sounding, which measures distance from phase and round-trip timing between two devices. Both need chips and stacks that support them on both ends. Ultra-wideband modules are the other common choice when accuracy of a few tens of centimetres is required.

TEP COMMUNITY