I want to build an IOT product that logs/polls values from a server. The problem is that all of the arduino/esp8266 and similar modules that I have found require the user to initialize the device with a wifi username/password. If I want to sell this device to people, what's the best way for them to upload the right username/password to the device?

I'm looking for options/libraries/best practices. The only option I can think of so far is to write a cellphone app that communicates with the IOT device via Bluetooth and is used to upload the wifi settings to the device. This way seems cumbersome, and I'd rather not write a iphone/ios app just for the purpose of connecting the module to the web.

  • \$\begingroup\$ Most iot devices have a web page for this. I'm not sure there ESP has the capability to act as an AP or not but it could act as one to set up the device. \$\endgroup\$
    – Ron Beyer
    Apr 25, 2020 at 3:38

1 Answer 1


There are Arduino libraries available that start a simple Access Point application with a Captive Portal when the ESP can’t find a local Wifi network to connect to.

The Captive Portal allows a user to log on to the AP created by the ESP from a different device like a phone or laptop, with a preconfigured Wifi password, open a simple web page, search for a local Wifi network to connect to, and enter its credentials.

Once configured, it will from then on use these SSID / credentials.

The library is called “WifiManager” and there are several varieties (for the ESP8266 and the ESP32).

  • \$\begingroup\$ Where does credentials are stored then? \$\endgroup\$
    – Andis
    Oct 12, 2020 at 12:27
  • \$\begingroup\$ As is standard with the ESP8266 (and ESP32), Wifi credentials are stored in the Flash memory of the ESP and can be recalled by standard SDK function calls. See, for example here \$\endgroup\$
    – StarCat
    Oct 12, 2020 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.