-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Cannot turn off WIFi #4700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can confirm that printDiag behaves as expected if called after SYSTEM_EVENT_WIFI_READY. Long term solution is to use totally event-driven methodology. Short term is to change documentation / examples to require inefficient arbitrary delay( ? ) before any WiFi call to allow for SYSTEM_EVENT_WIFI_READY to have occurred. Similarly, getMode() returns expected value after SYSTEM_EVENT_WIFI_READY , however SSID() still reports empty string even though printDiag clearly shows a value. Does SSID() only work inSTA mode ? case SYSTEM_EVENT_WIFI_READY:
Serial.printf("WIFI READY!\n");
WiFi.printDiag(Serial); // guru meditation
Serial.printf("INITIAL MODE=%d\n",WiFi.getMode()); // always reports 0
Serial.printf("STORED SSID=%s\n",WiFi.SSID().c_str()); // not true
break; shows:
but no change to inability to tun off |
I can confirm that experience each of these same issues (Tested on a custom WROOM32 device usind DOWD-Q6 chip. |
A quick test seems to show that it is actually turning the radio off - I used the sketch above and moved the actions into |
AHA seems like this is the SAME unresolved, unfixed bug that been around since Apr 2020 (see #3707). I feel sorry for the poor guy who reported THAT one and STILL hasn't got a fix... |
Finally I see ALL the issues I have here are the result of failure to address earlier issues... I just found this one re the blank SSID() #1743. So even though "officially" I ought to close this as I now know the reasons for (and have answers to, or workarounds for) all of the issues raised...I'm going to leave it open so that hopefully other users can see just how poorly this firmware is supported and how little attention and actual "support" is given to users who devite their own free time and tear their hair out to a) find problems b) suggest good, working fixes, only to have them completely ignored :( I'm also going to remember this number #4700 and every few weeks I'm going to come back in here and raise another issue, referencing this one #4700 to see if anything has been done yet about any of them. The more people who do that, the more likely it is that we will either: get them fixed AT LAST or at least hear some kind of cogent argument why "the team" continues to fail / refuse to fix them. For what is otherwise a GREAT product, this lack of decent support is such a huge shame. :( |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Core 1.0.4, multiple different boards.
I'm trying to determine what state the WiFi is in immediately after boot
Calling printDiag first thing causes guru meditation
Q1 why has #1088 never been fixed?
Q2 Both getMode() and SSID() report incorrect values if called first thing. What is the "correct" way to determine intial state / settings without first calling some API that will change them, e.g. WiFi.mode(...) or WiFi.disconnect?
Q3 What is the "correct" way to turn off WiFi?
WiFi.softAPdisconnect(true)
does not do it*, WiFi.mode(WIFI_OFF) does not do it*Q4 What is the "correct" way to clear any stored credentials as in the ESP8266 equivalent of
ESP.eraseConfig()
? I want to do a full "factory reset" and the IDE does not have "total flash erase" tools options for either of my two boards: WEMOS LOLIN32 and ESP32 Dev ModuleMVCE
Output WEMOS LOLIN32 (no diag options available)
ESP32 Dev Board diag=verbose
Looking at that event trace - maybe this is why printDiag fails - because some background has not yet started WiFi ? Maybe all users need to monitor WiFi events and not call anything until after event 0? I'm guessing this is also why getmode and ssid report incorrect values... Is there anything in the docs I have missed that make this clear? Also does the WiFi have to be in a certain state before any of the OFF methods work? What am I doing wrong?
The text was updated successfully, but these errors were encountered: