finds.dev← search

// the find

tonyp7/esp32-wifi-manager

★ 770 · C · MIT · updated Jun 2024

Captive Portal for ESP32 that can connect to a saved wireless network or start an access point where you can connect to existing wifis.

A self-contained esp-idf component that turns an ESP32 into a captive portal: boots up as an access point with a web UI for scanning and connecting to wifi, saves credentials to NVS, then reconnects automatically on future boots. Aimed at product developers who need wifi provisioning without writing the plumbing themselves.

The component embeds its own HTTP server and DNS daemon, so there are no external service dependencies at runtime — everything fits in the ESP32's RAM budget. The menuconfig integration is done right: SSID, password, timers, and base URL are all configurable without touching component code. The event callback API is clean and maps directly to esp-idf's own event model, so integrating it with existing application code doesn't require restructuring. NVS access is guarded by an explicit mutex (nvs_sync), which is a real problem in FreeRTOS projects that people usually ignore until they hit corruption.

Last meaningful activity is effectively 2022; the repo hasn't tracked esp-idf past 4.x and ESP-IDF 5.x broke the WiFi event API in ways that require non-trivial changes — you'll hit linker errors or runtime panics on current toolchains. There's no support for esp32-s3 or esp32-c3/C6 despite those being the chips anyone starting a new project would reach for in 2024. The HTTP server is hand-rolled with static assets compiled into the binary as char arrays; it works but it means changing the UI requires running a separate compression step and rebuilding, which is friction during development. Only one callback slot per event type, so if two parts of your code both need to react to WM_EVENT_STA_GOT_IP you have to chain them manually.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →