-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
User is unable to define if WiFi.disconnect should null-ify SSID and Password or not #8689
Comments
cziter15
changed the title
User is unable to define is WiFi.disconnect should null SSID and Password
User is unable to define if WiFi.disconnect should null SSID and Password
Oct 29, 2022
cziter15
changed the title
User is unable to define if WiFi.disconnect should null SSID and Password
User is unable to define if WiFi.disconnect should null-ify SSID and Password or not
Oct 29, 2022
Would you be ready to make an API addition proposal to match esp32's ? |
I think it's better to erase whole AP data. We don't know how user will use it, but in case we want to forget AP data, we should erase at least whole password field. |
I've re-issued PR #8758 as previous was wrong. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is not really related to any board, but directly to the source code, using template is not necessary here.
The problem is that WiFi.disconnect function always set SSID and Password to NULL. On ESP32's version of Arduino, user can define if the config should be ever touched or not. When manually implementing reconnection, current state requires to store credentials externally between disconnect and connect method calls.
This should be unified somehow or at least eraseAP switch should be added to allow calling underlying methods without zeroing credentials.
Current workaround is calling wifi_station_disconnect directly.
https://github.com/espressif/arduino-esp32/blob/a5f03a86512b270be1080d7e7cb82e4fd71c9a1a/libraries/WiFi/src/WiFiSTA.cpp#L345
Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp
Line 350 in da6ec83
The text was updated successfully, but these errors were encountered: