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
ESP32-S3 WiFi credentials lost after reset #1703
Comments
Yeah this is a wifi init issue I may have accidentally renabled this bug let me check |
Thanks a lot! It would be beneficial to include some additional text in the README for new users, such as "Credentials are automatically saved to independent memory and restored after power loss. If your settings resets, check issue #1703." |
ESP32-S3 WiFi credentials lost after reset.
Using https://github.com/tzapu/WiFiManager.git
Code:
wifiManager.autoConnect("myAP", "myPassword");
WiFiManager.autoConnect() always goes to AP captive portal after reset on ESP32-S3.
Why is this? I see call to esp_wifi_get_config(WIFI_IF_STA, &conf) returns an empty SSID string. The return status code for the call to esp_wifi_get_config(WIFI_IF_STA, &conf) is not checked, but if I add esp_err_t result = esp_wifi_get_config(WIFI_IF_STA, &conf) I see result = ESP_ERR_WIFI_NOT_INIT
And why is this? I find
#elif defined(ESP32)
// wifiLowLevelInit(persistent); // @todo fix for S3, not found
So I uncomment this line, and sure enough the call to wifiLowLevelInit() is not found - wifiLowLevelInit() is in WiFiGeneric.cpp but not made public.
And I find this issue reported to team Arduino:
espressif/arduino-esp32#9056
which ends with comment "I'll give you the nvs keys next year." Is this a joke? I don't know.
Anyway, there is an easy fix which is to add a call to WiFi.mode(WIFI_AP_STA) before calling WiFiManager.autoConnect().
This issue does not occur on ESP32, only on ESP32-S3, so it seems WiFi driver is enabled by default at startup for ESP32, but not so for ESP32-S3.
The text was updated successfully, but these errors were encountered: