WiFi AP Mode Interface¶
Work in Progress
WiFi AP mode is functional and builds successfully with ENABLE_WIFI=1,
but the web interface is still under active development.
The HTTP status page works; advanced features (sensor data, configuration UI)
are not yet implemented. See Planned Features for the roadmap.
Overview¶
When the ESP32 is running in AP mode, you can connect from a browser at
http://192.168.4.1 to verify the device connection and view a status page.
Setup¶
1. Connect to WiFi¶
When the device boots in AP mode:
| Item | Value |
|---|---|
| SSID | OSECHI-DETECTOR |
| Password | osechi2025 |
| IP Address | 192.168.4.1 |
| Port | 80 (HTTP) |
2. Open in Browser¶
After connecting, enter the following URL:
http://192.168.4.1
3. Status Page¶
The page displays:
- Connection status: Connected
- WiFi SSID: OSECHI-DETECTOR
- AP address: 192.168.4.1
- Protocol: HTTP
Features¶
Buttons¶
- Refresh — Reload the page to check connection status
- Status — Link to the status information page
Build Configuration¶
WiFi support is disabled by default. Enable it via the ENABLE_WIFI build flag.
With Task¶
task v2:build # default: ENABLE_WIFI=0
To enable WiFi, add the flag in platformio.override.ini:
[env:esp32dev-v2]
build_flags =
-D ENABLE_WIFI=1
With uv¶
uv run platformio run -e esp32dev-v2
Implementation Details¶
File Structure¶
include/
└── web_server.h # Web server header
src/
├── web_server.cpp # Web server implementation
└── main.cpp # Init and update integration
Initialization Flow¶
- Call
wifi_init()insetup()— starts AP mode - Wait 500 ms, then call
web_server_init()— starts HTTP server - Call
web_server_update()inloop()— handles incoming requests
HTTP Routes¶
| Request | Response |
|---|---|
GET / |
200 — Connection confirmation page |
GET /status |
302 redirect → / |
| Any other | 404 Not Found |
Technical Specifications¶
Memory Usage¶
- Embedded HTML: ~3 KB
- Web server buffer: ~1 KB
- WiFi stack: included in existing WiFi module
Response Times¶
- Page load: 100–200 ms
- Refresh button: 50–100 ms
Supported Browsers¶
- Chrome / Chromium
- Safari
- Firefox
- Edge
- Mobile browsers (iOS Safari, Android Chrome)
Troubleshooting¶
Page Not Displaying¶
- Check the serial monitor for
[WiFi] AP Started - Verify the
OSECHI-DETECTORSSID is visible on your device - Clear browser cache and retry
Connection Drops Immediately¶
-
Check the serial monitor for connection logs:
task monitor -
Check for 5 GHz band interference
Security Notes¶
- Default password — The AP password
osechi2025can be changed inwifi_manager.cpp. Use a strong password in production. - HTTP only — Traffic is not encrypted. Use in development environments only.
- Local network only — AP mode is accessible only within the
192.168.4.0/24network. No internet access.
Planned Features¶
- Real-time sensor data display
- WiFi configuration page (SSID / password)
- Device log viewer
- HTTPS support