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

Add eraseCredentials option to WiFi disconnect method. #8758

Merged
merged 9 commits into from
Dec 15, 2022
Merged

Add eraseCredentials option to WiFi disconnect method. #8758

merged 9 commits into from
Dec 15, 2022

Conversation

cziter15
Copy link
Contributor

@cziter15 cziter15 commented Dec 12, 2022

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 PR aims to fix this problem by introducing second variable (eraseap), which defaults to false to maintain compatibility.

Copy link
Collaborator

@d-a-v d-a-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp Show resolved Hide resolved
libraries/ESP8266WiFi/src/ESP8266WiFiSTA.h Outdated Show resolved Hide resolved
@cziter15
Copy link
Contributor Author

Do you know why its failing? Is it missing header?

@cziter15
Copy link
Contributor Author

cziter15 commented Dec 14, 2022 via email

@d-a-v d-a-v merged commit d3c8d27 into esp8266:master Dec 15, 2022
@mcspr mcspr changed the title Add eraseap option to WiFi disconnect method. Add eraseCredentials option to WiFi disconnect method. Dec 15, 2022
@mcspr mcspr added this to the 3.1 milestone Dec 15, 2022
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
Add eraseCredentials option to WiFi disconnect method (legacy default: true)
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 this pull request may close these issues.

User is unable to define if WiFi.disconnect should null-ify SSID and Password or not
3 participants