Skip to content

Change disconnect function #466

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

Merged
merged 2 commits into from
Aug 1, 2017
Merged

Conversation

sticilface
Copy link
Contributor

Current implementation does not disconnect the WiFi. Use of esp_wifi_disconnect() does.

Current implementation does not disconnect the WiFi. Use of `esp_wifi_disconnect()` does.
@me-no-dev
Copy link
Member

have you tried calling that function first?

void setup(){
  //....
  WiFi.disconnect(true);
  WiFi.connect("ssid", "pass");
  //....
}

It should wipe the settings as well

@sticilface
Copy link
Contributor Author

I was testing the disconnect directly. Ie configure the ESP to join an AP, then 10 seconds later call WiFi.disconnect(). It returned true, but nothing changed and the ESP still had an IP and was connected.

@me-no-dev
Copy link
Member

you removed some lines that had a function there ;)

@sticilface
Copy link
Contributor Author

sticilface commented Jun 25, 2017

Ah, is disconnect meant to wipe the settings too?
I guess I can put them back:)

@me-no-dev
Copy link
Member

what's up with this?

put back the clear ssid + password
remove the duplicate `esp_wifi_set_config(WIFI_IF_STA, &conf);`
@sticilface
Copy link
Contributor Author

holiday + forgot. sorry:)

@me-no-dev
Copy link
Member

great :)

@me-no-dev me-no-dev merged commit 91d02cc into espressif:master Aug 1, 2017
Raienryu97 pushed a commit to Raienryu97/arduino-esp32 that referenced this pull request Aug 2, 2017
* Change disconnect function

Current implementation does not disconnect the WiFi. Use of `esp_wifi_disconnect()` does.

* Update WiFiSTA.cpp

put back the clear ssid + password
remove the duplicate `esp_wifi_set_config(WIFI_IF_STA, &conf);`
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.

2 participants