docs/fw: full feature catalog, robust HTTP body reads, CORS, LED off at boot #2

Open
drjones wants to merge 2 commits from docs/readme-full-catalog-and-api into main
Owner

Summary

  • Expand README with complete firmware + UI feature catalog and full HTTP/WebSocket API tables; remove unimplemented roadmap section
  • app_net.c: replace bare httpd_req_recv with TCP-safe recv_body_capped/recv_body_alloc helpers; add OPTIONS /* CORS preflight; bump WS broadcast buffer to 2048
  • Add nfc_access_lock/nfc_access_unlock mutex around concurrent NFC calls
  • board_rgb_off.c: kill onboard WS2812/SK6812 (GPIO 48) at boot via led_strip + RMT; called first in app_main
  • sdkconfig.defaults: add board RGB Kconfig defaults
  • net_service/CMakeLists.txt: add http_parser dep for HTTP_OPTIONS
  • docs/LIMITATIONS.md, docs/PINOUT.md: expand and correct

Test plan

  • npm run build:fw succeeds
  • idf.py build compiles cleanly with ESP-IDF 5.x
  • POST endpoints return full JSON body (no truncation on large brute payloads)
  • CORS preflight (OPTIONS) returns 204 with correct headers
  • Onboard RGB is off after boot
  • WebSocket scan/capture stream is intact
## Summary - Expand README with complete firmware + UI feature catalog and full HTTP/WebSocket API tables; remove unimplemented roadmap section - `app_net.c`: replace bare `httpd_req_recv` with TCP-safe `recv_body_capped`/`recv_body_alloc` helpers; add `OPTIONS /*` CORS preflight; bump WS broadcast buffer to 2048 - Add `nfc_access_lock`/`nfc_access_unlock` mutex around concurrent NFC calls - `board_rgb_off.c`: kill onboard WS2812/SK6812 (GPIO 48) at boot via `led_strip` + RMT; called first in `app_main` - `sdkconfig.defaults`: add board RGB Kconfig defaults - `net_service/CMakeLists.txt`: add `http_parser` dep for `HTTP_OPTIONS` - `docs/LIMITATIONS.md`, `docs/PINOUT.md`: expand and correct ## Test plan - [ ] `npm run build:fw` succeeds - [ ] `idf.py build` compiles cleanly with ESP-IDF 5.x - [ ] POST endpoints return full JSON body (no truncation on large brute payloads) - [ ] CORS preflight (`OPTIONS`) returns 204 with correct headers - [ ] Onboard RGB is off after boot - [ ] WebSocket scan/capture stream is intact
drjones added 1 commit 2026-04-07 21:24:38 -07:00
- app_net.c: replace bare httpd_req_recv with recv_body_capped/alloc
  helpers (TCP-safe, full-body reads); add OPTIONS/* CORS preflight
  handler; bump WS broadcast buffer to 2048; add CORS Allow-Methods
- CMakeLists (net_service): add http_parser dep for HTTP_OPTIONS
- nfc_engine/pn532_core: add nfc_access_lock/unlock mutex, board-RGB
  quiet helper, UL type detection, general-status improvements
- pn532_transport: minor cleanup
- main.c: call board_rgb_led_quiet() at boot to kill onboard LED
- sdkconfig.defaults: add board RGB Kconfig defaults
- README, docs/LIMITATIONS, docs/PINOUT: expand and correct

Made-with: Cursor
drjones added 1 commit 2026-04-09 15:49:23 -07:00
Firmware:
- nfc_engine: add nfc_engine_try_init() (non-fatal, sets s_pn532_ready),
  nfc_engine_try_reattach() (soft re-init, skips bus re-init),
  nfc_engine_is_ready() accessor
- main: replace ESP_ERROR_CHECK(nfc_engine_init) with nfc_engine_try_init;
  device boots and serves web UI even with no PN532 connected
- app_net: add reconnect_task — every 5s retries nfc_engine_try_reattach()
  and broadcasts {"channel":"pn532","payload":{"connected":true}} over WS
- app_net: scan_loop_task skips polling when !nfc_engine_is_ready()
- app_net/api_status: always emit pn532Connected bool; null-guard pn532 fw object
- find_sector_hit / program_classic_snapshot_locked: null-guard cJSON array items
- session_capture: abort if xSemaphoreCreateMutex() returns NULL

Web:
- NfcWsContext: track pn532Connected state from WS pn532 channel + status fetch on connect
- App.tsx: live HeaderBadge (LIVE/NO RF/WAIT) replacing static text
- Dashboard: READY/SEARCHING pill with fw version when available
- api.ts: add pn532Connected to Status type
- toast.tsx: fix ID collision (Date.now + Math.random)
- Capture: surface status fetch errors
- ReadAnalyze: add error feedback for readUl when no data returned
- WriteClone: busy state on both write buttons
- RawConsole: toast when frame returns error not response
- Emulate: validate hex before send (non-empty, even length, hex chars only)
- Brute: warn and skip invalid custom key lines

Made-with: Cursor
Checking for merge conflicts…
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin docs/readme-full-catalog-and-api:docs/readme-full-catalog-and-api
git checkout docs/readme-full-catalog-and-api
Sign in to join this conversation.