So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By mrlightsman
#82119 I've taken a simpler approach and just time-out the while (wifiMulti.run() != WL_CONNECTED) statement and that allows the softAP created by wifiMulti to function until I enter proper credentials for a network connection.

Doing this allows the ESP to create an unsecure network named "ESP12345."

I cannot figure out how to name the SSID and add a password. Using WiFi.softAP("SSID", "Password) does not change the displayed network name on my computer and it also seems to block my ability to connect to the ESP.

Any idea how to set the SSID and PW as part of the following code? Thanks.
Code: Select all  aptime = millis();
  wifiMulti.addAP("NoConnect", "NoAccess");
  wifiMulti.addAP(SSID1, PW1);
  wifiMulti.addAP(SSID2, PW2);
  wifiMulti.addAP(SSID3, PW3);
  wifiMulti.addAP(SSID4, PW4);

  Serial.println("Connecting Wifi...");
  while (wifiMulti.run() != WL_CONNECTED) {
      if (millis()-aptime >= apdelay) {
        Serial.println("Network Failed. Starting AP Mode.");
        break;
      }
    Serial.print(".");
    delay(500);
  }
  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("Connected to SSID: ");
  Serial.println(WiFi.SSID());
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}


Thank you.