wifi connection manager for esp8266

WiFiManager ESP8266 WiFi connection manager library (Arduino IDE)

ESP8266 WiFi Configuration Library

The burden every headless wireless connected device needs to overcome is how to connect to the network without having to hardcode any credentials in it’s firmware.

For the ESP8266 based devices programmed with the Arduino IDE, I have put together this little library that tries to make connecting as seamless and quick as possible. It’s called WiFiManager.

WiFiManager‘s Features:

  • user friendly setup of esp8266 devices
  • no need to hardcode credentials anymore
  • simple and self contained, get started with a couple of copy/pastes
  • captive portal so you get the configuration page as soon as you connect to the WiFi from mobile devices
  • configuration portal is mobile visible/usable

How It works

  • when your ESP starts up, it sets it up in Station mode and tries to connect to a previously saved Access Point
  • if this is unsuccessful (or no previous network saved) it moves the ESP into Access Point mode and spins up a DNS and WebServer (default ip
  • using any wifi enabled device with a browser(computer, phone, tablet) connect to the newly created Access Point
  • because of the Captive Portal and the DNS server you will either get a ‘Join to network’ type of popup or get any domain you try to access redirected to the configuration portal
  • choose one of the access points scanned, enter password, click save, ESP will reboot and retry the whole flow above
esp8266 wifimanager captive portal

ios captive portal

esp8266 wifi manager debug output

Sample serial debug output

Get it from github: WiFiManager github
This package works fine with stable release 2.0.0 or newer of the Arduino IDE
Up to date documentation can be found on the github page, where any exceptions should also be noted
All the involved projects are moving very fast, so a lot of changes have happened, but the basic use for this, has remained the same.

Category: blog

Tags: , , ,

- October 8, 2015