-->
Page 1 of 2

How to reset ESP8266 to clear Wi-Fi AP or STA mode configura

PostPosted: Tue Dec 05, 2017 5:00 pm
by Ahmed Ahmed
Hi :) :)

I have a problem with ESP12E, as follows:

I have implemented a serial to wifi bridge that I can convert any USB to wifi communication, I'm facing problem now, as I provide two modes of connection to the ESP, the first is WiFi_STA and the second mode is WiFi_AP, it works fine, but if I forgot the password of my router, and the ESP can't forget my router connection, so, I need a reliable programmatic way of clearing or resetting only the wifi connection to its default without affecting EEPROM or flash in order not to delete Arduino bootloader.

Please help me .... :)

Thanks in advance ....

Re: How to reset ESP8266 to clear Wi-Fi AP or STA mode confi

PostPosted: Thu Dec 21, 2017 12:22 pm
by Ahmed Ahmed
Thanks for your reply,

I have put a button that will execute the commands, but it didn't erase the configuration, since the SSID and password still exist ..

I can't connect it to another network since the configuration isn't erased .. :( :(

Is there any solution ?

Re: How to reset ESP8266 to clear Wi-Fi AP or STA mode confi

PostPosted: Thu Aug 02, 2018 3:55 am
by clg75959@molms.com
Ahmed Ahmed wrote:Thanks for your reply,

I have put a button that will execute the commands, but it didn't erase the configuration, since the SSID and password still exist ..

I can't connect it to another network since the configuration isn't erased .. :( :(

Is there any solution ?


Try
WiFi.disconnect(true);
It erases the saved Configuration Of Wifi in STA Mode

Re: How to reset ESP8266 to clear Wi-Fi AP or STA mode confi

PostPosted: Sun May 08, 2022 10:22 pm
by GABYCON
clear wifi settings

WiFiManager wifiManager;

WiFi.begin("xx","xx");

wifiManager.autoConnect();