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

User avatar
By Piter
#63223 Hi! I'm planning to setup a customer project based on an ESP8266 NodeMcu dev board. But, once the project based on ESP reaches the client, in order to connect to wifi, he'll have to setup somehow the SSID and password in the Arduino app.
Didn't find too much on this, can you guys help me with some suggestions regarding that? Thank you!
User avatar
By domfe
#63236 I use WiFiManager library. Works like a charm!

Code: Select all  WiFiManager wifiManager;
  wifiManager.setSTAStaticIPConfig(ip, gateway, subnet);

  {
  //starts an access point with the specified name
  //here  "AutoConnectAP" with password "password"
  //and goes into a blocking loop awaiting configuration
    if (!wifiManager.autoConnect("AutoConnectAP", "password")) {
      Serial.println(F("failed to connect, we should reset as see if it connects"));
      delay(3000);
      ESP.reset();
      delay(5000);
    }
  }


It starts an access point, go to 192.168.4.1 and you have a web page to submit information about your WiFi network. Configuration is then stored in Flash memory.