Andy Stanford-Clark

Results 13 comments of Andy Stanford-Clark

I'm trying to make the ESP8266 forget its wifi credentials - I've tried `wifiManager.resetSettings();` and `Wifi.disconnect(true);` with `delay(2000);` `ESP.reset();` thrown in for good measure, but every time it comes back...

oh, it looks like I'm hideously back-level! `0.15.0-beta` !!! Sorry... I'll upgrade and report back

should I be trying 2.00 or 0.16 ?? Are there breaking changes in 2.0 ?

OK, here's my little test case: ``` #include #include WiFiManager wifiManager; void setup() { Serial.begin(9600); delay(500); Serial.print("Looking for "); Serial.print(WiFi.SSID().c_str()); Serial.print(" / "); Serial.println(WiFi.psk().c_str()); Serial.println("*** Resetting WiFi credentials ***"); wifiManager.resetSettings();...

On `v2.0.5-beta` ... it works great! ``` ** Resetting WiFi credentials *** *wm:[1] resetSettings *wm:[1] SETTINGS ERASED H!⸮⸮L⸮⸮⸮J(⸮⸮⸮ ⸮Looking for / *** Resetting WiFi credentials *** *wm:[1] resetSettings *wm:[1] SETTINGS...

aha - I see there's some additional magic in this version... ``` WiFi.persistent(true); WiFi.disconnect(true); WiFi.persistent(false); ``` Thanks :)

looks like there's more to it than that, as just adding those lines into my sketch doesn't erase the credentials. Anyway... latest library seems to be the answer :)

Cracked it :) ``` WiFi.mode(WIFI_STA); WiFi.persistent(true); WiFi.disconnect(true); WiFi.persistent(false); ``` THAT resets the wifi credentials. (you do not need to restart the ESP afterwards for it to take effect)

yes, I was trying to work out what you did in v2 that makes it work, that didn't work in v0.

yes, on Pi, with --max-old-space-size=256