Skip to content

feat: Add /join route and WiFi setup screen improvements#660

Open
marcodejongh wants to merge 1 commit intomainfrom
add-join-route-and-display-improvements
Open

feat: Add /join route and WiFi setup screen improvements#660
marcodejongh wants to merge 1 commit intomainfrom
add-join-route-and-display-improvements

Conversation

@marcodejongh
Copy link
Owner

Summary

  • Add /join route for easier session joining
  • Improve LilyGo display QR code for session joining
  • Add WiFi setup screen with QR code when no WiFi credentials are configured

WiFi Setup Screen

When the device boots without saved WiFi credentials:

  • Starts Access Point with SSID "Boardsesh-Setup"
  • Shows setup screen with QR code linking to http://192.168.4.1
  • Defers BLE initialization until WiFi is configured (saves resources)
  • Web interface shows AP mode status and allows network configuration

Files Changed

  • wifi_utils: Add AP_MODE state, startAP/stopAP methods
  • lilygo_display: Add showSetupScreen() with QR code
  • main.cpp: Defer BLE init, show setup screen in AP mode
  • esp_web_server: Handle AP mode in WiFi status endpoint

Test plan

  • Flash firmware to device with no saved WiFi credentials
  • Verify device creates "Boardsesh-Setup" access point
  • Connect phone/laptop to AP
  • Scan QR code - should open http://192.168.4.1
  • Configure WiFi credentials in web interface
  • Verify device connects to configured network and exits AP mode
  • Verify BLE only initializes after WiFi connects

🤖 Generated with Claude Code

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>
@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
boardsesh Building Building Feb 5, 2026 10:02am

Request Review

@claude
Copy link

claude bot commented Feb 5, 2026

Claude Review

Ready to merge - Minor issues noted below, but nothing blocking.

Issues

  1. wifi_utils.cpp:52-64 - startAP() doesn't set currentSSID/currentPassword, so if WiFi connection fails later in AP mode and code tries to reconnect, it will attempt to reconnect with stale credentials from a previous connection attempt. Consider clearing these in startAP().

  2. main.cpp:421-427 - hasSavedCredentials() is only checked after CONNECTION_FAILED, but checkConnection() in wifi_utils.cpp will continuously attempt reconnection if currentSSID is non-empty from a failed attempt. This could cause a loop between AP mode and connection attempts. The state machine would benefit from being cleared when entering AP mode.

  3. PR title mismatch - Title mentions "Add /join route" but no web route changes are in this PR (only embedded firmware). Consider updating the PR title to accurately reflect the changes.

Documentation

No documentation updates needed - these are embedded-only changes not covered by existing docs.

Tests

Embedded firmware - no automated tests expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant