Page 1 of 1
Network scan is blocking
Posted: Mon Apr 01, 2019 9:15 am
by pythoncoder
In my tests on an SF6W a station interface scan (which returns 7 networks here) blocks for ~597ms. This is even worse on the ESP32 where it blocks for 2.5s. It would be good if there were a nonblocking alternative. Or a fast way to check the status of a given SSID.
Re: Network scan is blocking
Posted: Wed Apr 03, 2019 8:07 am
by Damien
Now that the code is available you can see how scan works. You'll notice it's just doing a busy wait at the end of the scan() method. So in principle it's pretty easy to make it non-blocking, it's just a matter of defining how the user-facing Python API looks.
You can also specify a specific (B)SSID for the scan, but from my tests it doesn't make it much faster.