7 Commits

Author SHA1 Message Date
user
a81e7e3990 feat: Serial console AUTH + NVS provisioning tool
- Add serial_task: UART console for AUTH management with physical access
  AUTH shows full secret, AUTH <secret> sets, AUTH OFF clears
- Add esp-provision tool: provision auth secret via serial or NVS flash
  Supports auto-generate, custom secrets, --serial and --generate-only
- Fix esp-ota uptime cache: avoid firmware rate limiter on consecutive
  udp_cmd calls by caching uptime_s for 3s
2026-02-14 20:48:40 +01:00
user
a4bd2a6315 fix: Add uptime sync to all tools for 5s HMAC replay window
All three standalone tools (esp-cmd, esp-fleet, esp-ota) now fetch
device uptime before signing commands, matching what esp-ctl already
does. Includes 60ms delay after uptime fetch to avoid firmware rate
limiter (50ms inter-command throttle).
2026-02-14 20:29:49 +01:00
user
6066832271 feat: Add parallel OTA to esp-fleet (--parallel flag)
Start one HTTP server, send OTA commands to all devices simultaneously,
wait for reboot, then verify all in parallel. Cuts fleet OTA from ~90s
to ~30s. Sequential mode remains the default.

Usage: esp-fleet ota --parallel [firmware.bin]
2026-02-04 21:18:17 +01:00
user
2586234473 feat: Add HMAC command auth, deauth flood detection, sign all tools
Firmware:
- HMAC-SHA256 command authentication (AUTH command, NVS persisted)
- Deauth flood detection with ring buffer and aggregate ALERT_DATA
- FLOODTHRESH command (count + window, NVS persisted)
- New STATUS fields: auth=on/off, flood_thresh=5/10
- mbedtls dependency in CMakeLists.txt, rx_buf increased to 192

Tools:
- esp-cmd/esp-fleet/esp-ota import sign_command from esp_ctl.auth
- Commands auto-signed when ESP_CMD_SECRET env var is set

Docs:
- CHEATSHEET: AUTH, FLOODTHRESH, HMAC auth, OUI, watch, osint sections
- TASKS: v1.3 completed section with all new features
2026-02-04 21:07:00 +01:00
user
d65ac208b9 feat: Add v0.3 OTA updates — dual partition, esp-ota tool, rollback
Dual OTA partition table (ota_0/ota_1, 1920 KB each) on 4MB flash.
Firmware gains OTA command, LED_OTA double-blink, version in STATUS,
and automatic rollback validation. Pi-side esp-ota tool serves firmware
via HTTP and orchestrates the update flow. esp-fleet gains ota subcommand.
2026-02-04 16:19:09 +01:00
user
44bd549761 feat: Add mDNS, watchdog, human-readable uptime, esp-fleet tool
Firmware:
- mDNS announcement as <hostname>.local (configurable via Kconfig)
- Task watchdog with 30s timeout and auto-reboot on hang
- STATUS now returns human-readable uptime (e.g., 3d2h15m) and hostname

Pi-side tools:
- esp-cmd: mDNS hostname resolution (esp-cmd amber-maple.local STATUS)
- esp-fleet: parallel command to all sensors (esp-fleet status)

Tested on amber-maple — mDNS resolves, watchdog active, fleet tool works.
2026-02-04 15:59:18 +01:00
user
18933ea778 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.
2026-02-04 15:36:14 +01:00