Skip to content
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

Closed
cziter15 opened this issue Oct 12, 2022 · 3 comments · Fixed by #8758
Closed

Comments

@cziter15
Copy link
Contributor

cziter15 commented Oct 12, 2022

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

@cziter15 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 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
@d-a-v
Copy link
Collaborator

d-a-v commented Dec 12, 2022

On ESP32's version of Arduino, user can define if the config should be ever touched or not

Would you be ready to make an API addition proposal to match esp32's ?

@cziter15
Copy link
Contributor Author

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.

@cziter15
Copy link
Contributor Author

cziter15 commented Dec 12, 2022

I've re-issued PR #8758 as previous was wrong.

@mcspr mcspr linked a pull request Dec 14, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants