feat: Add v0.2 remote management — UDP commands, LED, NVS persistence

Firmware (app_main.c):
- UDP command listener on port 5501 (configurable via Kconfig)
- Commands: REBOOT, IDENTIFY, STATUS, RATE, POWER
- LED status indicator on GPIO2 (off/slow/fast blink/solid)
- NVS persistence for send_rate and tx_power settings
- Refactored ping to support stop/restart for dynamic rate changes
- TX power control via esp_wifi_set_max_tx_power()

Pi-side tooling:
- tools/esp-cmd: standalone Python3 UDP client for device management

Tested on amber-maple (ESP32 v3.1) with ESP-IDF v5.5.2.
This commit is contained in:
user
2026-02-04 15:36:14 +01:00
parent 2d52ac6026
commit 18933ea778
5 changed files with 388 additions and 25 deletions

View File

@@ -2,28 +2,44 @@
**Last Updated:** 2026-02-04
## Current Sprint: v0.1 - Documentation
## Current Sprint: v0.2 - Remote Management
### P0 - Critical
- [x] Copy firmware sources to project
- [x] Document current firmware and settings
- [x] Firmware: UDP command listener (port 5501)
- [x] Firmware: LED status indicator (GPIO2)
- [x] Firmware: NVS config persistence (rate, tx_power)
- [~] Build and flash firmware to device
### P1 - Important
- [x] Document build & flash workflow step by step
- [x] Create .gitignore for build artifacts
- [x] Test building firmware from this repo
- [x] Firmware: REBOOT, IDENTIFY, STATUS commands
- [x] Firmware: RATE command (10-100 Hz, restarts ping)
- [x] Firmware: POWER command (2-20 dBm)
- [x] Firmware: Refactor ping to support restart
- [x] Pi-side: `esp-cmd` CLI tool
- [ ] Update CHEATSHEET.md with esp-cmd usage
### P2 - Normal
- [x] Document CSI config options (what each sdkconfig flag does)
- [x] Compare csi_recv vs csi_recv_router differences
- [ ] Document esp-cmd in USAGE.md
- [ ] Add Kconfig CSI_CMD_PORT option
### P3 - Low
- [ ] Document esp-crab dual-antenna capabilities
- [ ] Document esp-radar console features
## Completed: v0.1 - Documentation
- [x] Copy firmware sources to project
- [x] Document current firmware and settings
- [x] Document build & flash workflow
- [x] Create .gitignore for build artifacts
- [x] Test building firmware from this repo
- [x] Document CSI config options
- [x] Compare csi_recv vs csi_recv_router differences
## Notes
- Build confirmed working on ESP-IDF v5.5.2 (aarch64/Pi 5)
- Downgraded from IDF v6.1.0 to v5.5.2 for compatibility with deployed devices
- Branch renamed from `master` to `main`
- Docs created: `docs/INSTALL.md`, `docs/USAGE.md`, `docs/CHEATSHEET.md`
- v0.2 firmware adds ~1.5 KB heap + 6 KB stack usage
- NVS namespace: `csi_config` (keys: `send_rate`, `tx_power`)
- LED uses GPIO2 (built-in on most ESP32 dev boards)
- Command port default: 5501 (configurable via menuconfig)