explaingit

tzapu/wifimanager

7,170C++Audience · developerComplexity · 2/5Setup · easy

TLDR

An Arduino library for ESP8266 and ESP32 boards that handles WiFi setup through a browser-based portal. When the device can't connect to a known network, it creates a temporary hotspot so users can pick their network and enter credentials from any phone or laptop.

Mindmap

mindmap
  root((WiFiManager))
    How it works
      Try saved network
      Fallback to hotspot
      Browser config portal
      Save and reconnect
    Customization
      Custom parameters
      AP password
      Portal timeout
      On-demand trigger
    Boards supported
      ESP8266
      ESP32
    Installation
      Arduino Library Manager
      PlatformIO
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Ship an IoT device without hardcoded WiFi credentials, end users configure the network themselves through a browser portal.

USE CASE 2

Move an ESP board to a new location and reconfigure its WiFi without touching the firmware or using a USB cable.

USE CASE 3

Collect extra setup values like API keys or server addresses through the same WiFi setup portal.

Tech stack

C++ArduinoESP8266ESP32

Getting it running

Difficulty · easy Time to first run · 30min

Requires an ESP8266 or ESP32 board with the Arduino toolchain or PlatformIO installed.

License is not mentioned in the documentation.

In plain English

WiFiManager is an Arduino library for ESP8266 and ESP32 microcontroller boards that solves a common problem with IoT devices: how do you configure the WiFi network without hardcoding the credentials into your code? The answer it provides is a fallback web interface that appears automatically when the device cannot connect to a known network. Here is how it works in practice. When an ESP board running WiFiManager starts up, it tries to connect to whatever WiFi network it has previously saved. If that succeeds, your application takes over as normal. If it does not, the board switches into access point mode and creates its own small WiFi network. Any phone, laptop, or tablet that connects to that temporary network will be redirected to a configuration page in the browser, similar to hotel WiFi login pages. You select your home network from a scan list, type the password, and save it. The board stores the credentials, reconnects, and hands control back to your code. This means you can distribute a device or move it to a new location without recompiling or reflashing. The configuration happens in the browser, not in code. There is no need to know the WiFi password ahead of time when building or shipping the device. The library supports custom parameters beyond WiFi credentials, so you can collect other setup values like API keys or server addresses through the same portal. You can also protect the access point with a password, set a timeout so the portal closes after a period of inactivity, or trigger the portal on demand at runtime rather than only on failed connection. Available through the Arduino Library Manager and PlatformIO, the library works with both ESP8266 and ESP32 chip families.

Copy-paste prompts

Prompt 1
I'm building an ESP32 project with WiFiManager. Show me the minimal Arduino sketch to launch the captive portal when no saved network is found.
Prompt 2
I want to add a custom field to the WiFiManager portal so users can also enter an MQTT server address during WiFi setup. How do I do that?
Prompt 3
My WiFiManager portal should close automatically if nobody configures it within 3 minutes. How do I set that timeout?
Prompt 4
I want to trigger the WiFiManager config portal on demand when the user holds a button, not just on failed connection. How do I implement that?
Prompt 5
How do I password-protect the WiFiManager access point so random people nearby can't connect to the setup portal?
Open on GitHub → Explain another repo

← tzapu on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.