Skip to content

Distance approximation through WiFi

Ashwin Rajesh edited this page Sep 11, 2025 · 1 revision

We can approximate the distance between station and an access point using the RSSI value that has been recorded.

Firstly, we must know the RSSI value between two connections at a distance of exactly 1m. We'll call this txPower.

Next, We simply plug txPower and our current RSSI values into this formula:

distance = 10^(txPower - RSSI)/(10N)

N is simply accounts for environmental factors. We can assume this value as 2.

Requirements

Turn on your mobile phone hotspot and get the rssi value of it from your esp32

plug in the RSSI value into the formula and try to obtain a distance value.

Bonus: try using another esp32 set up in Access Point mode instead of your mobile hotspot

Clone this wiki locally