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

Moderator: igrr

User avatar
By josephchrzempiec
#83120 Hello i was wondering something. I was looking at some of these example codes i found online for Web configuration to a router wireless SSID and password. As i was looking around and seeing i don't have to manually keep putting my SSID and password into the sketch and it can be stored in the memory of the ESP8266. What happens when i say update that configuration sketch to changes colors of the web page and add buttons etc..... Then upload the updated sketch. would my SSID and password be gone would it clear out, Or would it still remain?


Joseph
User avatar
By rudy
#83123 The previously set mode, SSID and password are retained by the ESP. Those settings are kept in a settings area separate from the normal areas that our sketches use.

As a test, load a sketch that sets the ssid and password.

// Connect to WiFi network
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);

Then load a different sketch but comment out these.

// Connect to WiFi network
// WiFi.mode(WIFI_STA);
// WiFi.begin(ssid, password);

The routines in rom will look at the last settings and use them to connect to the network. As long as you don't change those, and when loading new sketches you have set the following selected Erase Flash: "Only Sketch" (under the tools tab) The ESP8266 will connect to the previously set network.
User avatar
By josephchrzempiec
#83127 Hello Rudy sorry I'm still trying to understand this and maybe a little confused. If i comment out them lines it only stops me from using the Station mode but I'm talking about is the access point AP mode. that is what connects to the home router. If i update that wifi manger page with some new text and upload it. What i mean is that does my home router information i put in is that done or still remains?