Commit Graph

52 Commits

Author SHA1 Message Date
user
28db1f9fe3 docs: Update README for v1.7 with current features and CI
Some checks failed
Lint & Security / C/C++ Static Analysis (push) Failing after 3s
Lint & Security / Security Flaw Analysis (push) Failing after 2s
Lint & Security / Secret Scanning (push) Failing after 1s
Lint & Security / Shell Script Analysis (push) Failing after 1s
2026-02-05 11:38:08 +01:00
user
8265f96f3b ci: Add Gitea workflow for lint and security checks
Some checks failed
Lint & Security / C/C++ Static Analysis (push) Has been cancelled
Lint & Security / Security Flaw Analysis (push) Has been cancelled
Lint & Security / Secret Scanning (push) Has been cancelled
Lint & Security / Shell Script Analysis (push) Has been cancelled
- cppcheck: C/C++ static analysis (warnings, style, performance, portability)
- flawfinder: Security-focused C/C++ analysis
- gitleaks: Secret scanning across repo history
- shellcheck: Shell script analysis

All jobs run on 'anvil' labeled runner.
2026-02-05 11:33:44 +01:00
user
a1970639b9 docs: Mark firmware security audit done in TASKS.md 2026-02-05 11:32:54 +01:00
user
6f7490cd34 docs: Mark Pi-side presence event handling done in TASKS.md 2026-02-05 10:20:50 +01:00
user
528e34cb25 feat: Add baseline calibration & presence detection (v1.7)
CALIBRATE command captures per-subcarrier CSI amplitudes over a timed
window and stores the averaged baseline in NVS. PRESENCE command enables
real-time scoring via normalized Euclidean distance against the baseline,
with rolling window averaging and 10s holdoff on state transitions.

New commands: CALIBRATE [3-60|STATUS|CLEAR], PRESENCE [ON|OFF|THRESHOLD]
New NVS keys: bl_amps (blob), bl_nsub, presence, pr_thresh
New STATUS fields: presence=, pr_score=
New events: calibrate=done, presence=0|1
2026-02-04 23:04:19 +01:00
user
738c759573 docs: Update TASKS.md for v1.6 completion 2026-02-04 22:36:59 +01:00
user
616181e279 docs: Mark v1.6 Power Management done in ROADMAP 2026-02-04 22:36:09 +01:00
user
47db176619 feat: Add POWERSAVE command with DFS + light sleep (v1.6)
Enable ESP-IDF power management framework (DFS 240/80 MHz + light sleep)
and add POWERSAVE command to toggle WiFi modem sleep. NVS-persisted,
default off. Automatically disabled during POWERTEST.
2026-02-04 22:34:13 +01:00
user
b8f568890f docs: Mark v1.5 done, bump Power Management to v1.6 2026-02-04 22:07:20 +01:00
user
4358ce8b96 feat: Add NVS persistence for SCANRATE and PROBERATE commands
Both settings now save to NVS and restore on boot, matching
the pattern used by other persisted config (rate, tx_power, etc).
2026-02-04 22:06:04 +01:00
user
8c79d20cd8 feat: Add POWERTEST command, update roadmap with v2.0 FTM milestone
Add 7-phase power profiling command (POWERTEST) that cycles through
idle, CSI 10/100 Hz, BLE-only, combined, tx_low/tx_high with EVENT
markers for external power meter correlation. Saves/restores all
settings on completion.

Update roadmap: mark v1.4 done, add v2.0 hardware upgrade milestone
for ESP32-S3/C6 with WiFi FTM / 802.11mc inter-sensor ranging.
2026-02-04 21:47:28 +01:00
user
84f2b33dac docs: Update ROADMAP to reflect current state through v1.3
Mark v1.0-v1.1 as DONE, add missing v1.1 items (HOSTNAME, mDNS
discovery, SCANRATE/PROBERATE, temp, channel/boots/RSSI stats).
Rename v1.2 to On-Device CSI Processing, add v1.3 Security & OSINT,
plan v1.4 Multi-Sensor & Validation, v1.5 Power Management.
Remove stale/duplicate entries from Future.
2026-02-04 21:27:43 +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
7511814976 docs: Add Pi-side tool prerequisites, build notes to INSTALL.md
Document esp-ctl install, standalone tool symlinks, HMAC auth setup,
watch daemon setup, and CMakeLists.txt REQUIRES caveat.
2026-02-04 21:12:14 +01:00
user
fa589b0238 fix: Revert explicit REQUIRES mbedtls, move flood globals before NVS load
The main component in ESP-IDF auto-includes all components; explicit
REQUIRES overrides this and breaks the build. mbedtls is available
without it. Also moved flood detection globals above config_load_nvs
to fix undeclared identifier errors.
2026-02-04 21:11:24 +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
7ca58fee72 docs: Add STATUS field reference, PROFILE section, update completed items 2026-02-04 20:16:16 +01:00
user
27aeddbc45 feat: Add channel, boot count, RSSI min/max, actual CSI rate to STATUS
- WiFi channel in STATUS (channel=)
- Boot counter persisted in NVS (boots=)
- RSSI min/max tracked from CSI frames since boot (rssi_min=, rssi_max=)
- Actual CSI rate computed from csi_count/uptime_s (csi_rate=)
2026-02-04 20:12:04 +01:00
user
46d53ae71a feat: Enable FreeRTOS CPU runtime stats, increase cmd_task stack to 6KB
Enable CONFIG_FREERTOS_USE_TRACE_FACILITY and
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS so PROFILE command reports
per-task CPU usage. Increase cmd_task stack from 4KB to 6KB — was
down to 516 bytes free with current PROFILE reply size.
2026-02-04 20:06:40 +01:00
user
70f37ad6dc docs: Update TASKS and CHEATSHEET for new STATUS fields, SCANRATE/PROBERATE
Add csi_count, uptime_s, WiFi reconnect, SCANRATE, PROBERATE to completed
items. Document ESP32 promiscuous mode limitation (breaks CSI).
2026-02-04 19:58:36 +01:00
user
1a4a5a4ac1 fix: Disable promiscuous mode on ESP32 — breaks CSI callback
Promiscuous mode (deauth/probe detection) disables CSI data collection
on original ESP32 at the driver level. Guard with #if !CONFIG_IDF_TARGET_ESP32
to only enable on newer chips where the two coexist.
2026-02-04 19:45:56 +01:00
user
60264d83ae feat: Add STATUS counters, WiFi reconnect events, SCANRATE/PROBERATE commands
- Promote CSI packet counter to global, add csi_count= to STATUS
- Add uptime_s= (raw seconds) to STATUS for programmatic parsing
- Emit EVENT on WiFi reconnect with rssi and ip fields
- Add SCANRATE command (5-300s) to tune BLE scan restart interval
- Add PROBERATE command (1-300s) to tune probe dedup cooldown
2026-02-04 19:26:09 +01:00
user
a69fe8d696 docs: Update TASKS, TODO, CHEATSHEET for probe capture and mDNS discovery 2026-02-04 19:11:36 +01:00
user
ca526ef667 feat: Add probe request capture and mDNS service advertisement
- Capture WiFi probe requests (subtype 0x04) in promiscuous callback
- Parse SSID from tagged parameters, emit PROBE_DATA via UDP
- Per-MAC deduplication (10s cooldown) to limit probe flood
- Advertise _esp-csi._udp mDNS service for sensor discovery
2026-02-04 19:07:16 +01:00
user
a87151cc9c feat: Add runtime HOSTNAME command — NVS persisted, mDNS updated
Replace all CONFIG_CSI_HOSTNAME usage with runtime s_hostname variable.
Load from NVS on boot (falls back to Kconfig default). HOSTNAME <name>
sets hostname, persists to NVS, updates mDNS live. HOSTNAME (no arg)
queries current value. One firmware binary now works for all devices.
2026-02-04 18:40:47 +01:00
user
73429d1986 docs: Update CHEATSHEET — lower baud rate, new packet formats
Use 460800 baud for USB flash (921600 fails on some boards). Document
new sensor hostname prefix in all data packet formats. Add USB flash
notes section.
2026-02-04 18:36:32 +01:00
user
59b8001047 docs: Update ROADMAP, TASKS, TODO — mark v1.1 items done
Check off sensor ID, deauth detection, chip temperature, BLE alerting,
dwell time, timestamped logging. Advance TASKS sprint to v1.1. Clean
completed items from TODO.
2026-02-04 18:30:19 +01:00
user
2554e11a0e feat: Add deauth/disassoc frame detection via promiscuous mode
Enable WiFi promiscuous mode (MGMT filter only) to detect deauth and
disassociation frames. Sends ALERT_DATA packets via UDP with sender MAC,
target MAC, and RSSI. Coexists with CSI via separate callback path.
2026-02-04 18:21:45 +01:00
user
a917a5ea02 feat: Add chip temperature to STATUS reply
Use IDF 5.x temperature_sensor driver. Adds temp=XX.X field to STATUS
response. Graceful fallback if sensor init fails.
2026-02-04 18:21:28 +01:00
user
8885b95ee7 feat: Add sensor hostname prefix to CSI_DATA, BLE_DATA, EVENT packets
Multi-sensor support: all data streams now include CONFIG_CSI_HOSTNAME
after the packet type tag. Increase BLE and EVENT buffer sizes.
2026-02-04 18:20:57 +01:00
user
985dcd598a docs: Clean completed items from TODO 2026-02-04 18:03:45 +01:00
user
d9530c99dd docs: Reorganize roadmap and TODO for passive sensing & multi-sensor phases
- Mark completed items in TODO
- Add v1.1 Passive Sensing & Multi-Sensor phase (probe capture,
  deauth detection, sensor ID, multi-sensor BLE correlation, alerting)
- Add v1.2 Profiling & Power Management phase
- Move on-device CSI processing to Future (lower priority)
- Add OSINT/purple team ideas (fingerprinting, triangulation, presence logging)
2026-02-04 18:03:31 +01:00
user
7ec70a653d feat: Add PROFILE command — heap, stack watermarks, CPU runtime stats
- PROFILE command returns heap usage (free/min/dram/iram),
  per-task stack high watermark, and per-task CPU % (when
  CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is enabled)
- Enable FreeRTOS runtime stats in sdkconfig.defaults
- Enlarge cmd reply buffer to 1400 bytes for multi-line output
- Add esp_heap_caps.h include
2026-02-04 17:59:30 +01:00
user
3681568238 docs: Update v1.0 roadmap — TARGET done, error handling covered, esp-ctl added 2026-02-04 17:51:29 +01:00
user
92e65d8775 feat: Add TARGET command — runtime UDP destination config
- TARGET <ip> [port] command to change data destination live
- NVS persistence for target_ip and target_port
- Falls back to Kconfig defaults when no NVS config
- target= field added to STATUS reply
- config_save_str helper for NVS string storage
2026-02-04 17:47:50 +01:00
user
81c4337646 feat: Add v0.5 BLE scanning — NimBLE passive scan, BLE_DATA UDP stream
- NimBLE stack init with passive BLE scanning
- BLE ON/OFF command with NVS persistence
- BLE_DATA,<mac>,<rssi>,<pub|rnd>,<name> UDP packets
- 30s periodic scan restart to refresh duplicate filter
- ble= field in STATUS reply
- sdkconfig: enable BT+NimBLE, BLE-only mode, disable Bluedroid
2026-02-04 17:40:20 +01:00
user
8a60547fca docs: Mark v0.5 BLE tracking as done 2026-02-04 17:33:21 +01:00
user
3980b5e130 docs: Mark v0.5 BLE firmware items as done 2026-02-04 17:30:33 +01:00
user
27f05d0d82 docs: Add AP+STA config portal to roadmap 2026-02-04 17:29:57 +01:00
user
8fbc54da0d docs: Add WiFi probe request capture to roadmap and TODO 2026-02-04 17:27:59 +01:00
user
c922e05266 feat: Add v0.4 adaptive sampling — wander detection, auto rate control
On-device CSI wander calculation (coefficient of variation over 50-packet
window). Rate drops to 10 Hz when idle, jumps to 100 Hz on motion with
3s holdoff. EVENT notifications sent to Pi on rate changes. New commands:
ADAPTIVE ON/OFF, THRESHOLD. RATE command disables adaptive mode.
All settings NVS-persisted.
2026-02-04 16:34:19 +01:00
user
2f90a099b7 docs: Finalize v0.3, add OTA section to USAGE.md 2026-02-04 16:26:49 +01:00
user
efc3fec25f chore: Regenerate sdkconfig.sample with OTA settings 2026-02-04 16:23:19 +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
6c4c17d740 docs: Add esp-cmd usage and LED states to cheatsheet 2026-02-04 15:37:44 +01:00
user
0c1a0ccc7f chore: Add sdkconfig.sample with placeholders, gitignore sdkconfig
Prevents WiFi credentials from being committed. Copy sdkconfig.sample
to sdkconfig and fill in SSID/password before building.
2026-02-04 15:37:08 +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
user
2d52ac6026 chore: Downgrade ESP-IDF from v6.1.0 to v5.5.2
Matches the version deployed on ESP32 sensors. Removes v6.1
workaround, updates all docs to reflect v5.5.2, regenerates
sdkconfig for the correct IDF version.
2026-02-04 15:02:54 +01:00
user
628b84f4f3 docs: Complete v0.1 documentation sprint
- Add build & flash workflow (docs/INSTALL.md)
- Add CSI config reference and firmware comparison (docs/USAGE.md)
- Add quick reference cheatsheet (docs/CHEATSHEET.md)
- Add dependencies.lock to .gitignore (env-specific)
- Update TASKS.md with completed items and build notes
- Verified firmware builds on ESP-IDF v6.1.0 / aarch64
2026-02-04 13:25:26 +01:00