-->
Page 1 of 1

Fast WiFi RSSI scan

PostPosted: Fri Mar 01, 2019 3:38 am
by Derkades
I need to get the signal strength of a network with a specific SSID, for calculating the distance between one ESP and another. There may be multiple APs with that SSID, in that case I need the closest one. I need a latency of ~0.5s or less. I need it to work even with low signal strengths. I've tried:

Method 1: Connecting to the AP
Then using the WiFi.SSID() method. It's pretty fast, but connecting is very slow and fails at longer distances (even when there is still a signal). It also doesn't switch between the different APs.

Method 2: Scanning all networks
In a for loop I can all WiFi networks, and for all the networks with the SSID I am looking for I get the RSSI. I use the highest (closest to zero) one. It works well, but is very slow: ~2.2 seconds

Is there a better method?

Re: Fast WiFi RSSI scan

PostPosted: Tue Mar 26, 2019 11:38 am
by DIRR70
Hello Derkades,

there is no "faster" method. If you scan for available networks it takes its time. You can scan asynchronous in a loop to triangulate between different APs. But even your cell phone needs 2-3 seconds to do a scan and that is a normal interval in modern beacon fences to determine your position. Bluetooth beacons are a little faster than WiFi but not much. How fast do you need to detect a position change of a certain distance? You won't be able to track a car... ;)