Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By sfranzyshen
#57682
craigfoo wrote:Using WiFiManager.resetSettings() was a winner, thanks!


Code: Select allvoid WiFiManager::resetSettings() {
  DEBUG_WM(F("settings invalidated"));
  DEBUG_WM(F("THIS MAY CAUSE AP NOT TO START UP PROPERLY. YOU NEED TO COMMENT IT OUT AFTER ERASING THE DATA."));
  WiFi.disconnect(true);
  //delay(200);
}


umm ... so the answer was really "WiFi.disconnect(true);" ...
User avatar
By digbigg
#59144
craigfoo wrote:Thanks for the reply.

What if I wanted to implement a "factory reset" using a button? I want to programmatically erase all Wifi profiles that are saved in flash. I played around with the system_restore API and I think it's working but there might be a better way.


Hi Craigfoo, have you figured out the solution yet? I'm trying to implement same thing but no luck. I want to connect a switch to GPIO0 or GPIO2 so that I should be able to Reset the WifiManager and SPIFFS.format() configurations.
If you have the solution would you please share it. It help be a great help. Thanks