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

Moderator: igrr

User avatar
By rudy
#83128 If you connect to the home router then the ESP8266 must be in Station mode.

AP mode allows a phone to connect directly to the ESP8266. The ESP8266 in AP mode forms it's own network, and a station device can then connect to it without a router.

I think (not sure) you are confused about AP mode because there are a lot of examples on the internet that have incorrect comments. And it seems that those incorrect comments are duplicated every time someone copies the code and modifies it for their own use. But still with the incorrect comment.

The router is an Access Point. When we connect to the router with our computers, phones, or ESP8266 they are Stations that are connecting to the Access Point (AP).

https://arduino-esp8266.readthedocs.io/ ... eadme.html

If i update that wifi manger page with some new text and upload it.


I don't know what you mean by wifi manger page. If there are pages that modify the SSID or password, then they are modifying the settings currently held by the ESP.

What I am saying is that you don't have to set the SSID and password every time the ESP starts up. It doesn't have to be in the sketch after an initial setup.

Load the example HellowServer sketch. Enter your SSID and password. Have it connect and confirm that you can access it. Then load a different sketch but comment out the WiFi.begin(ssid, password); line so there is nowhere that the ssid or password is in the program. Then when you start the sketch the ESP8266 will still connect because it had stored the ssid and password the last time WiFi.begin(ssid, password); was used. It retains that information.
User avatar
By josephchrzempiec
#83129 Hello Rudy thank you. Yes i was misunderstanding things. But got it now.

If i comment out that line am i still able to connect to the router like that? Also wouldnt i be unable to change the ssid unless i take out the commented lines?
User avatar
By rudy
#83130 From your initial post,
Then upload the updated sketch. would my SSID and password be gone would it clear out, Or would it still remain?

If the SSID and password is not changed by newer sketches, then it is retained. If your newer sketch changes it, then it will be updated. The point is that the SSID and password survives the programming of new user code, as long as that new user code doesn't change it.

It is your decision if you wish to have it included with each uploaded sketch. If you exclude it, the previous set values will be used.
User avatar
By josephchrzempiec
#83139 Hello Rudy thank you for that information. As stated before I'm not very good at software or understanding it. I'm trying. My area of skills is hardware I love building things and making them work. But software is one thing tat actually use to give me headaches LOL. So 'm starting to learn.


Joseph