Page 1 of 1

Is it possible that interrrupting an async wifi scan, in Arduino, by turning off wifi could lock out all future scans?

Posted: Mon Oct 21, 2024 6:36 am
by SeventhSeeker
I think this might be what's going on, but I'm not sure enough to register an issue on GitHub.

As far as I can tell, WIFI_SCANNING_BIT is only cleared on a timeout or on a successful scan, but the timeout is handled by a layer below the Arduino stuff.

So when you turn off WiFi, I suspect, but I'm not sure(Rather complicated code and I don't have a minimal reproduction), that it cancels the scan at the low level, so it never completes, and we never get the _scanDone callback.

Which then means you can't start a new scan without rebooting because the WIFI_SCANNING_BIT is still set?

Am I on the right track here?