feat: Add WiFi setup screen with QR code on LilyGo display#673
feat: Add WiFi setup screen with QR code on LilyGo display#673marcodejongh wants to merge 3 commits intomainfrom
Conversation
When WiFi isn't configured, the device now: - Starts in AP mode with SSID "Boardsesh-Setup" - Shows a setup screen with QR code linking to http://192.168.4.1 - Defers BLE initialization until WiFi is connected This provides a better first-time setup experience where users can scan the QR code to configure WiFi credentials via the web interface. Changes: - WiFiUtils: Add AP_MODE state and startAP/stopAP methods - LilyGoDisplay: Add showSetupScreen() with QR code - main.cpp: Defer BLE init until WiFi configured - esp_web_server: Handle AP mode in status endpoint Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
startAP() was not clearing currentSSID/currentPassword, which caused checkConnection() to attempt reconnection with stale credentials after transitioning out of AP mode. This created a loop between AP mode and failed connection attempts. Also adds softAP/softAPIP/softAPdisconnect mock methods and 7 new AP mode tests covering credential clearing, state transitions, and the reconnection loop prevention. https://claude.ai/code/session_0183bcPx7kSdnPXNKw2kKp6m
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Claude Review✅ Ready to merge - Minor issues noted below, but nothing blocking. Issues
|
The AP mode fallback when WiFi connection fails with no saved credentials was wrapped entirely in #ifdef ENABLE_DISPLAY, so non-display builds would stay stuck in CONNECTION_FAILED state. Restructured the #ifdef guards so only Display calls are conditional. Also removes unused getAPSSID/isAPActive mock methods that had no corresponding WiFiUtils API. https://claude.ai/code/session_0183bcPx7kSdnPXNKw2kKp6m
Claude Review✅ Ready to merge - Minor issues noted below, but nothing blocking. Issues
Test CoverageTests are well-written and cover the key AP mode functionality including edge cases like credential clearing and state transitions. |
When WiFi isn't configured, the device now:
This provides a better first-time setup experience where users can
scan the QR code to configure WiFi credentials via the web interface.
Changes:
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com