STA is connecting, scan are not allowed! - even when STA is connected

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

STA is connecting, scan are not allowed! - even when STA is connected

Postby jcsbanks » Thu Jan 10, 2019 12:04 am

"STA is connecting, scan are not allowed!"

I would like to be able to do a scan without disconnecting an existing STA connection (which has an IP address) and doesn't appear to be logging any events to suggest there is a problem.

The occurrence seems random.

I cannot find good solutions on searching.

Looking for the string, it is in libnet80211.a so I cannot play with the source code to try to get it to return a useful event.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: STA is connecting, scan are not allowed! - even when STA is connected

Postby jcsbanks » Fri Jan 11, 2019 7:20 pm

Any ideas on this welcomed. I just cannot find a way of detecting when this has occurred, no WiFi event is triggered, so I cannot disconnect and try again.

I can disconnect and a scan always works, but then I have disconnected most of the time without good reason.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: STA is connecting, scan are not allowed! - even when STA is connected

Postby jcsbanks » Sun Jan 13, 2019 1:51 pm

Best solution I have found so far is to do esp_wifi_disconnect() before doing a scan, and esp_wifi_connect() after. A scanning event bit prevents attempted reconnections during the scan.

Javascript code in the served page starts reloading the page after a 3s delay if the IP address was not 192.168.4.1 so that if the page was served through the ESP32's STA IP address it can receive the scan results.

Any better ideas are welcomed.

User avatar
hassan789
Posts: 156
Joined: Thu Jun 29, 2017 2:15 am

Re: STA is connecting, scan are not allowed! - even when STA is connected

Postby hassan789 » Mon Jan 14, 2019 3:28 am

The issue is likely related to this issue:
https://github.com/espressif/esp-idf/issues/2125

If that is the case, there is no fix (as I understand it).

Who is online

Users browsing this forum: Gaston1980, Google [Bot] and 158 guests