From 402f4f2c63f2621f4e7e587288bc106bea37857a Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 May 2026 19:43:25 +0530 Subject: docs: update web WiFi setup plan checklist with progress --- WEB_WIFI_SETUP_PLAN.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/WEB_WIFI_SETUP_PLAN.md b/WEB_WIFI_SETUP_PLAN.md index 1a3f742..b80ec3a 100644 --- a/WEB_WIFI_SETUP_PLAN.md +++ b/WEB_WIFI_SETUP_PLAN.md @@ -13,11 +13,11 @@ WiFi setup. | State | When | Content | |-------|------|---------| -| BOOT | Startup | "TollGate" title + "starting..." | +| BOOT | Startup | WiFi QR + "TollGate" title + SSID + status | | READY (unconfigured) | No STA network | AP WiFi QR + SSID + "http://AP_IP/setup" | | READY (configured) | STA connected | QR cycling (WiFi↔Portal) + balance/clients/price | | PAYMENT_RECEIVED | After payment | "ACCESS GRANTED" + amount + time (3s then→READY) | -| ERROR | No upstream | "NO UPSTREAM" + "http://AP_IP/setup" | +| ERROR | No upstream | WiFi QR + "NO UPSTREAM" + SSID + setup URL | ### Captive Portal (new endpoints) @@ -53,6 +53,8 @@ WiFi setup. - [x] Update `display.h` — remove `DISPLAY_WIFI_SETUP`, `display_enter_wifi_setup()` - [x] Add setup URL text to READY (unconfigured) and ERROR screens - [x] Remove WiFi setup auto-enter from `tollgate_main.c` +- [x] Add WiFi QR code to BOOT screen (scan to connect) +- [x] Add WiFi QR code to ERROR screen ### Phase 2: Add web WiFi setup - [x] Add `/wifi/scan` endpoint to `captive_portal.c` @@ -64,9 +66,21 @@ WiFi setup. ### Phase 3: Build configuration - [x] Remove touch.c, keyboard.c, wifi_setup.c from `main/CMakeLists.txt` -### Phase 4: Testing +### Phase 4: Testing and fixes - [x] `make test-unit` passes - [x] Build succeeds (`idf.py build`) - [x] Flash to Board C, verify portrait display shows setup URL +- [x] Fix: display stuck at BOOT when WiFi configured but unreachable + - Added `s_total_retries` counter (MAX_TOTAL_RETRIES=10) + - Transitions to DISPLAY_ERROR after all retries exhausted +- [x] WiFi QR code visible on BOOT and ERROR screens (hardware verified) - [ ] Test `/setup` page from phone browser - [x] Write integration test `tests/integration/wifi_setup.mjs` + +## Commits + +| Hash | Message | +|------|---------| +| `aa58b47` | feat: web-based WiFi setup via captive portal, portrait-only display | +| `2e65cdf` | fix: transition display to ERROR after WiFi retries exhausted | +| `cf4ac1b` | feat: add WiFi QR code to BOOT and ERROR screens | -- cgit v1.2.3