diff options
| author | Your Name <you@example.com> | 2026-05-18 20:41:16 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-18 20:41:16 +0530 |
| commit | 7344b1b50bcb3e1fc24b164cd601dd7cbce582c1 (patch) | |
| tree | ed639e1748d9b461fc77e9587c5de6142c243781 /CHECKLIST.md | |
| parent | 06de1143037399bb96308df0ea4290faa79de9dc (diff) | |
feat: WiFi country code DE + retry delay + updated docs
- Add esp_wifi_set_country_code('DE') before WiFi start for EU regulatory compliance
- Add 2s delay between WiFi auth retries to avoid AP rate limiting
- Update AGENTS.md with CVM modules, board C, per-board locks, WiFi notes
- Update CHECKLIST.md with Phase 7b completion, 7c integration progress
- Update PLAN.md with test cases 53-73, WiFi country code findings
- Update Makefile port defaults (A=ACM0, B=ACM1)
- Board B connects to WiFi successfully with these fixes
- Board A has hardware WiFi issue (auth fails on all APs)
Diffstat (limited to 'CHECKLIST.md')
| -rw-r--r-- | CHECKLIST.md | 83 |
1 files changed, 63 insertions, 20 deletions
diff --git a/CHECKLIST.md b/CHECKLIST.md index 4e4411a..09220bd 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md | |||
| @@ -53,21 +53,63 @@ | |||
| 53 | - [x] nip04.c/h (AES-256-CBC + ECDH, 15 unit tests) | 53 | - [x] nip04.c/h (AES-256-CBC + ECDH, 15 unit tests) |
| 54 | - [x] cvm_server.c/h (Nostr DM listener skeleton) | 54 | - [x] cvm_server.c/h (Nostr DM listener skeleton) |
| 55 | 55 | ||
| 56 | ## Phase 7b: ContextVM Protocol Rewrite — IN PROGRESS | 56 | ## Phase 7b: ContextVM Protocol Rewrite — COMPLETE |
| 57 | - [ ] Add 6 new tools to mcp_handler.c/h (get_sessions, get_usage, set_payout, set_metric, set_price, wallet_melt) | 57 | - [x] Add 6 new tools to mcp_handler.c/h (get_sessions, get_usage, set_payout, set_metric, set_price, wallet_melt) |
| 58 | - [ ] Update test_mcp_handler.c with tests for 6 new tools | 58 | - [x] Update test_mcp_handler.c with tests for 6 new tools |
| 59 | - [ ] Rewrite cvm_server.c: persistent WebSocket listener, kind 25910 subscription | 59 | - [x] Rewrite cvm_server.c: persistent WebSocket listener, kind 25910 subscription |
| 60 | - [ ] MCP protocol handlers: initialize, notifications/initialized, tools/list, tools/call, ping | 60 | - [x] MCP protocol handlers: initialize, notifications/initialized, tools/list, tools/call, ping |
| 61 | - [ ] Auth check: only accept from owner npub | 61 | - [x] Auth check: only accept from owner npub |
| 62 | - [ ] CEP-6: publish kind 11316 server announcement on startup | 62 | - [x] CEP-6: publish kind 11316 server announcement on startup |
| 63 | - [ ] CEP-6: publish kind 11317 tools list on startup | 63 | - [x] CEP-6: publish kind 11317 tools list on startup |
| 64 | - [ ] CEP-17: publish kind 10002 relay list on startup | 64 | - [x] CEP-17: publish kind 10002 relay list on startup |
| 65 | - [ ] Update config.c: default cvm_enabled = true | 65 | - [x] Update config.c: default cvm_enabled = true |
| 66 | - [ ] Create test_cvm_server.c unit test (event parsing, announcement construction, auth) | 66 | - [x] Create test_cvm_server.c unit test (event parsing, announcement construction, auth) |
| 67 | - [ ] Update tests/unit/Makefile with test_cvm_server target | 67 | - [x] Update tests/unit/Makefile with test_cvm_server target |
| 68 | - [ ] Create tests/integration/test-cvm.mjs (nak-based integration test) | 68 | - [x] Create tests/integration/test-cvm.mjs (nak-based integration test) |
| 69 | - [ ] Update Makefile with cvm-* targets (test-cvm, cvm-pubkey, cvm-test-tool) | 69 | - [x] Update Makefile with cvm-* targets (test-cvm, cvm-pubkey, cvm-test-tool) |
| 70 | - [ ] Verify on contextvm.org/servers with board's npub | 70 | - [x] WS frame masking fix (RFC 6455 client-to-server) |
| 71 | - [x] EVENT msg buffer underflow fix (snprintf buffer size) | ||
| 72 | - [x] TLS write loop for large payloads | ||
| 73 | - [x] WS ping/pong keepalive (30s interval) | ||
| 74 | - [x] Subscription REQ fix (removed invalid limit field) | ||
| 75 | - [x] SNTP init after STA gets IP | ||
| 76 | - [x] 282 unit tests passing (61 CVM + 60 MCP + 161 existing) | ||
| 77 | |||
| 78 | ## Phase 7c: CVM Integration Testing — IN PROGRESS | ||
| 79 | - [x] Per-board hardware locks implemented (board-a/b/c.lock) | ||
| 80 | - [x] Lock infrastructure in 3 Makefiles (esp32-tollgate, physical-router-test-automation/esp32, top-level) | ||
| 81 | - [x] CVM test infrastructure verified (API check, relay queries, event publishing) | ||
| 82 | - [x] Fix CVM test API reachability check (HTTP status instead of JSON parse) | ||
| 83 | - [x] WiFi password fix for EnterSSID-2.4GHz (c03rad0r123! — was missing `!`) | ||
| 84 | - [x] WiFi auth threshold fix (WPA3_PSK → WPA2_PSK → WIFI_AUTH_OPEN, now WPA2_PSK) | ||
| 85 | - [x] PMF capable mode enabled | ||
| 86 | - [x] WIFI_ALL_CHANNEL_SCAN enabled | ||
| 87 | - [ ] WiFi country code fix (ESP-IDF defaults to CN, need DE for EU regulatory compliance) | ||
| 88 | - [ ] Verify Board A connects to upstream WiFi with country code fix | ||
| 89 | - [ ] If Board A fails, try Board B or C | ||
| 90 | - [ ] Verify kind 11316 announcement on relay.primal.net | ||
| 91 | - [ ] Verify kind 11317 tools list on relay.primal.net | ||
| 92 | - [ ] Verify kind 10002 relay list on relay.primal.net | ||
| 93 | - [ ] End-to-end MCP tools/call roundtrip via kind 25910 | ||
| 94 | - [ ] Verify board npub on contextvm.org/servers | ||
| 95 | |||
| 96 | ### WiFi Debugging Findings (Board A — 94:a9:90:2e:37:7c) | ||
| 97 | - **Symptom:** `WIFI_REASON_AUTH_EXPIRED` (0x200) on all upstream APs | ||
| 98 | - **APs tested:** EnterSSID-2.4GHz (ch11, WPA2), c03rad0r (not in range), laptop hotspot (ch6, WPA2) | ||
| 99 | - **Modes tested:** APSTA (ch1/6/11), STA-only (no AP at all) | ||
| 100 | - **MAC tested:** Custom (derived from nsec) and factory MAC | ||
| 101 | - **Result:** Auth fails in ALL configurations, even STA-only 1m from laptop hotspot | ||
| 102 | - **Root cause hypothesis 1:** Missing WiFi country code — ESP-IDF defaults to CN regulatory domain, boards are in DE. Different TX power limits and channel parameters may cause APs to ignore ESP32 auth frames. | ||
| 103 | - **Root cause hypothesis 2:** Hardware antenna issue on Board A — needs testing on other boards to confirm | ||
| 104 | - **Spectrum:** Dense environment (ch1: 2 APs, ch6: 4 APs, ch11: 4 APs) but laptop connects fine at 100% | ||
| 105 | - **Next step:** Add `esp_wifi_set_country_code("DE")` and test Board A, then Board B/C if needed | ||
| 106 | |||
| 107 | ### Per-Board Hardware Locks | ||
| 108 | - [x] Lock files in `physical-router-test-automation/locks/` (board-a.lock, board-b.lock, board-c.lock) | ||
| 109 | - [x] `lock-a/b/c`, `unlock-a/b/c`, `force-unlock-a/b/c` targets | ||
| 110 | - [x] All hardware-touching targets require corresponding board lock | ||
| 111 | - [x] Read-only targets (build, cvm-pubkey, lock-status) work without lock | ||
| 112 | - [x] Board port mapping updated: A=ACM0, B=ACM1, C=ACM3 | ||
| 71 | 113 | ||
| 72 | ## Bug Fixes — COMPLETE (commit `3342c8e`) | 114 | ## Bug Fixes — COMPLETE (commit `3342c8e`) |
| 73 | - [x] reset_auth, /usage, metric default, sys_evt stack overflow fixes | 115 | - [x] reset_auth, /usage, metric default, sys_evt stack overflow fixes |
| @@ -156,12 +198,13 @@ | |||
| 156 | 198 | ||
| 157 | ## Reminders | 199 | ## Reminders |
| 158 | - **Commit + push every time a test passes that previously didn't pass** | 200 | - **Commit + push every time a test passes that previously didn't pass** |
| 159 | - Board A: `/dev/ttyACM0`, SSID `TollGate-C0E9CA`, AP IP `10.192.45.1` | 201 | - Board A: `/dev/ttyACM0`, MAC `94:a9:90:2e:37:7c`, SSID `TollGate-B96D80`, AP IP `10.185.47.1` |
| 160 | - Board B: `/dev/ttyACM1`, SSID `TollGate-b96d80`, AP IP `10.185.47.1`, nsec `9af47906...` | 202 | - Board B: `/dev/ttyACM1`, MAC `fc:01:2c:c5:50:50`, SSID `TollGate-C0E9CA`, AP IP `10.192.45.1` |
| 161 | - OpenWRT Router: SSH `root@10.47.41.1`, port 2121 | 203 | - Board C: `/dev/ttyACM3`, MAC `20:6e:f1:98:d7:08` |
| 162 | - `source ~/esp/esp-idf/export.sh` before `idf.py` | 204 | - `source ~/esp/esp-idf/export.sh` before `idf.py` |
| 163 | - Latest commit: `0c2c67b` | ||
| 164 | - 186 unit tests + 18 Playwright tests — all passing | ||
| 165 | - sudo password: `c03rad0r123` | 205 | - sudo password: `c03rad0r123` |
| 166 | - Token generation: `cashu -h https://testnut.cashu.space send --legacy 21` | 206 | - Token generation: `cashu -h https://testnut.cashu.space send --legacy 21` |
| 207 | - SPIFFS offset `0x410000`, size `0xF0000` | ||
| 167 | - See `AGENTS.md` for full testing rules | 208 | - See `AGENTS.md` for full testing rules |
| 209 | - **Per-board locks:** `make lock-a PHASE="desc"` before hardware access | ||
| 210 | - **WiFi country code:** Must set `esp_wifi_set_country_code("DE")` before `esp_wifi_start()` | ||