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

Moderator: igrr

User avatar
By freedom2000
#40576 Hi,

I don't know why but I am now unable to change Access Point Name...
It did work a few months ago, but now I can't change it.

I have tried to reflash the ESP, but doesn't work

The code I am using is the AccessPoint example in the IDE :

Code: Select all#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>

/* Set these to your desired credentials. */
const char *ssid = "ESPap";
const char *password = "thereisnospoon";

ESP8266WebServer server(80);

/* Just a little test message.  Go to http://192.168.4.1 in a web browser
 * connected to this access point to see it.
 */
void handleRoot() {
   server.send(200, "text/html", "<h1>You are connected</h1>");
}

void setup() {
   delay(1000);
   Serial.begin(115200);
   Serial.println();
   Serial.print("Configuring access point...");
   /* You can remove the password parameter if you want the AP to be open. */
   WiFi.softAP(ssid, password);

   IPAddress myIP = WiFi.softAPIP();
   Serial.print("AP IP address: ");
   Serial.println(myIP);
   server.on("/", handleRoot);
   server.begin();
   Serial.println("HTTP server started");
}

void loop() {
   server.handleClient();
}


Same thing if I remove the password...

Do you have same behavior ?

Thank you
JP
User avatar
By Trickuncle
#40577 Yes! Some observations...
1. In my first tests, I used "ESP8266" as my SSID. But on my Android phone, it first appeared as ESP followed by three or four bytes of the modules MAC address.
2. At that point, I tried to change it but the Android did not see the changed SSID but it still connects.
3. Later, trying SOFTAP mode, I wanted to be able to connect with no password so set it to "". The Android connected with no password - fine.
4. Then switching between different code and STATION mode with a password, the Android decided it always needed a password even if my code called out SOFTAP mode and a nullstring for password.
5. Reflashing the module and resetting the phone made no difference. But - once in a while trying a new SSID, the phone sees that successfully.

Bottom line, there is some persistence in the system that remembers a previous SSID and/or password but I have no idea where it exists or how to change it reliably.
User avatar
By martinayotte
#40578
Trickuncle wrote:Bottom line, there is some persistence in the system that remembers a previous SSID and/or password but I have no idea where it exists or how to change it reliably.

This persistence is on the phone itself, you probably need to do a "forget this Wifi" in the network settings.