handshake-capture-c6 v1.0.4: persist captured BSSIDs, PCAP EAPOL recount
- /cap_bssids.txt append on save; handshakeLoadPersistedBssids after SD mount - Boot order: SD then load file then first WiFi scan (reds match SD) - Pre-save walk of in-memory PCAP counting EAPOL-Key frames - SD_AppendLine / SD_ForEachLine; drop g_sd_ready clear on write fail - README + MUST_DO updates Made-with: Cursor
This commit is contained in:
@@ -2,6 +2,25 @@
|
||||
|
||||
Full pass over `handshake-capture-c6`: capture logic, SD, UI, display SPI, and main loop. Items below are **simple in concept** (some need careful implementation). Ordered by **severity**.
|
||||
|
||||
## Status vs **v1.0.3** (re-review)
|
||||
|
||||
| # | Item | Status |
|
||||
|---|------|--------|
|
||||
| 1 | Serialize shared SPI (LCD + SD) | **Done** — `SPI_Bus_Lock.cpp` recursive mutex; all `LCD_Write*` paths lock; `LCD_addWindow` wraps full flush; `SD_Init` / `SD_WriteFileAtomic` lock + `SPIBus_SetDisplayPaused` so `Timer_Loop` skips LVGL during SD. |
|
||||
| 2 | Cap / document `eapol_count` | **Done** — increment only while `eapol_count < HANDSHAKE_EAPOL_FRAMES`; README notes heuristic. |
|
||||
| 3 | 2.4 GHz–only sweep | **Done** — `isSupportedCaptureChannel`, `isCaptureable` filters; list shows `5G+` + grey for off-band secure APs; status line `off-band` count. |
|
||||
| 4 | Production vs debug serial | **Done** — `HANDSHAKE_DEBUG` (default 0) + `HANDSHAKE_LOGF` / `HANDSHAKE_LOGLN`; boot version line always. |
|
||||
| 5 | `USE_SOFTAP` default | **Done** — default `0` in `HandshakeCapture.h`. |
|
||||
| 6 | Long SD write / WDT / UI | **Partially** — `yield()` after large write in `SD_WriteFileAtomic`; WDT not explicitly fed (usually OK on Arduino main task). |
|
||||
| 7 | Rescan vs `network_index` | **Unchanged** — still no mid-capture rescan; README covers behavior. |
|
||||
| 8 | Magic numbers | **Done** — timing + channel range centralized in `HandshakeCapture.h`. |
|
||||
|
||||
### Remaining nits (optional follow-ups)
|
||||
|
||||
1. **`SD_WriteFileAtomic`:** On failure it sets `g_sd_ready = false` even for a **single-file** error (e.g. disk full, bad filename) while the card may still be mounted. Consider clearing `g_sd_ready` only on errors that imply unmount, or always pair with a defined recovery path.
|
||||
2. **`SD_Card.cpp` → `HandshakeCapture.h`:** Include is only for log macros — a tiny `HandshakeLog.h` would remove coupling.
|
||||
3. **`LCD_Reset`:** Still toggles CS without the SPI mutex (boot-only; low risk).
|
||||
|
||||
---
|
||||
|
||||
## 1. **Serialize shared SPI (LCD + SD)** — *critical*
|
||||
|
||||
Reference in New Issue
Block a user