From 59b8001047f9d4a3ff793dcf06ab0be4676f9d0b Mon Sep 17 00:00:00 2001 From: user Date: Wed, 4 Feb 2026 18:27:20 +0100 Subject: [PATCH] =?UTF-8?q?docs:=20Update=20ROADMAP,=20TASKS,=20TODO=20?= =?UTF-8?q?=E2=80=94=20mark=20v1.1=20items=20done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- ROADMAP.md | 16 ++++---- TASKS.md | 42 +++++++++++++++------ TODO.md | 13 ++----- get-started/csi_recv_router/main/app_main.c | 11 +++++- 4 files changed, 52 insertions(+), 30 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 264b573..a138b8d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -44,7 +44,7 @@ - [x] RATE command disables adaptive mode - [x] adaptive/motion fields in STATUS reply -## v0.5 - BLE Scanning +## v0.5 - BLE Scanning [DONE] - [x] Enable Bluetooth alongside WiFi (NimBLE, BLE ON/OFF command) - [x] Periodic BLE advertisement scanning - [x] Report device MAC, RSSI, name via UDP (`BLE_DATA,,,,`) @@ -56,20 +56,20 @@ - [ ] On-device CSI processing (send metrics, not raw) - [x] Configuration via UDP (`TARGET [port]`, NVS persisted) - [x] Comprehensive error handling (watchdog, WiFi reconnect via example_connect) -- [x] `esp-ctl` unified CLI tool (cmd, status, listen, serial, ble, target) +- [x] `esp-ctl` unified CLI tool (cmd, status, listen, serial, ble, target, profile) ## v1.1 - Passive Sensing & Multi-Sensor -- [ ] Sensor ID in data packets (hostname prefix on all UDP streams) +- [x] Sensor ID in data packets (hostname prefix on CSI_DATA, BLE_DATA, EVENT) - [ ] WiFi probe request capture (`PROBE_DATA,,,,`) -- [ ] Deauth/disassoc frame detection (`ALERT_DATA,,deauth,`) +- [x] Deauth/disassoc frame detection (`ALERT_DATA,,,,,`) - [ ] Multi-sensor BLE correlation in esp-ctl (zone tracking by source sensor) -- [ ] BLE alerting (known device list, alert on unknown MACs) -- [ ] BLE dwell time tracking (loitering detection) -- [ ] Timestamped CSV event logging +- [x] BLE alerting (`esp-ctl ble --known`, alert on unknown MACs) +- [x] BLE dwell time tracking (`esp-ctl ble --track` dwell column) +- [x] Timestamped event logging (`esp-ctl listen --timestamp`) ## v1.2 - Profiling & Power Management - [x] PROFILE command (heap, stack watermarks, CPU runtime stats) -- [ ] Chip temperature reporting in STATUS +- [x] Chip temperature reporting in STATUS (`temp=` field) - [ ] Power consumption measurements (per-mode baseline) - [ ] Deep sleep mode with wake-on-CSI-motion - [ ] Battery-optimized duty cycling diff --git a/TASKS.md b/TASKS.md index 5651e9d..18ffca7 100644 --- a/TASKS.md +++ b/TASKS.md @@ -2,23 +2,40 @@ **Last Updated:** 2026-02-04 -## Current Sprint: v0.5 - BLE Scanning - -### P0 - Critical -- [ ] Enable Bluetooth alongside WiFi -- [ ] Periodic BLE advertisement scanning +## Current Sprint: v1.1 - Passive Sensing & Multi-Sensor ### P1 - Important -- [ ] Report device MAC, RSSI, name via UDP -- [ ] Pi-side BLE device tracking +- [ ] Build + flash firmware (sensor ID, temp, deauth detection) +- [ ] OTA update remaining fleet (muddy-storm, hollow-acorn) +- [ ] WiFi probe request capture (PROBE_DATA via promiscuous mode) ### P2 - Normal -- [ ] OTA update remaining fleet (muddy-storm, hollow-acorn) via USB -- [ ] Test rollback (flash bad firmware, verify auto-revert) +- [ ] Multi-sensor BLE correlation in esp-ctl (zone tracking) +- [ ] Test OTA rollback (flash bad firmware, verify auto-revert) ### P3 - Low - [ ] Document esp-crab dual-antenna capabilities - [ ] Document esp-radar console features +- [ ] Pin mapping for ESP32-DevKitC V1 + +## Completed: v1.1 (partial) + +- [x] Sensor ID in data packets (hostname prefix on CSI_DATA, BLE_DATA, EVENT) +- [x] Deauth/disassoc frame detection (ALERT_DATA via promiscuous mode) +- [x] Chip temperature reporting in STATUS reply +- [x] BLE alerting (`esp-ctl ble --known`, alert on unknown MACs) +- [x] BLE dwell time tracking (dwell column in `--track` summary) +- [x] Timestamped event logging (`esp-ctl listen --timestamp`) +- [x] Alert filter in esp-ctl (`listen -f alert`) + +## Completed: v0.5 - BLE Scanning + +- [x] Enable Bluetooth alongside WiFi (NimBLE, BLE ON/OFF command) +- [x] Periodic BLE advertisement scanning +- [x] Report device MAC, RSSI, name via UDP +- [x] Pi-side BLE device tracking (`esp-ctl ble --track`) +- [x] PROFILE command (heap, stack watermarks, CPU runtime stats) +- [x] TARGET command (runtime UDP destination config) ## Completed: v0.4 - Adaptive Sampling @@ -68,6 +85,7 @@ ## Notes - Adaptive threshold varies by environment; 0.001-0.01 is a good starting range -- NVS keys: `send_rate`, `tx_power`, `adaptive`, `threshold` -- EVENT packets sent on CSI UDP port when adaptive rate changes -- OTA download ~904 KB on LAN takes ~3-5s, well under 30s watchdog +- NVS keys: `send_rate`, `tx_power`, `adaptive`, `threshold`, `ble_scan`, `target_ip`, `target_port` +- EVENT packets now include sensor hostname: `EVENT,,motion=... rate=... wander=...` +- ALERT_DATA format: `ALERT_DATA,,,,,` +- STATUS now includes `temp=` field (chip temperature in Celsius) diff --git a/TODO.md b/TODO.md index 2261d0f..65ffd5f 100644 --- a/TODO.md +++ b/TODO.md @@ -1,17 +1,13 @@ # ESP32 Hacking TODO ## Firmware -- [ ] Chip temperature reporting -- [ ] Sensor ID in data packets (hostname prefix on CSI_DATA/BLE_DATA) - [ ] WiFi probe request capture (PROBE_DATA via promiscuous mode) -- [ ] Deauth/disassoc frame detection (alert on WiFi attacks) - [ ] On-device CSI processing (send metrics, not raw) +- [ ] Deep sleep mode with wake-on-CSI-motion +- [ ] Battery-optimized duty cycling -## Tools -- [ ] Multi-sensor BLE correlation (tag by source sensor, zone tracking) -- [ ] BLE alerting (known device list, alert on unknown MACs) -- [ ] BLE dwell time tracking (loitering detection) -- [ ] Event logging (timestamped CSV from all streams) +## Tools (esp-ctl) +- [ ] Multi-sensor BLE correlation (zone tracking by source sensor) - [ ] Sensor discovery script (find all ESP32s on network via mDNS) ## Testing @@ -27,7 +23,6 @@ ## Ideas - ESP-NOW mesh for direct ESP32-to-ESP32 CSI - External PIR sensor for CSI ground truth validation -- Battery + deep sleep mode for portable deployment - AP+STA config portal (captive portal for initial setup) - Multi-channel scanning (hop across WiFi channels) - RSSI triangulation with 3 sensors (approximate device location) diff --git a/get-started/csi_recv_router/main/app_main.c b/get-started/csi_recv_router/main/app_main.c index b0784c0..69b528d 100644 --- a/get-started/csi_recv_router/main/app_main.c +++ b/get-started/csi_recv_router/main/app_main.c @@ -36,7 +36,10 @@ #include "esp_https_ota.h" #include "esp_http_client.h" #include "driver/gpio.h" +#include "soc/soc_caps.h" +#if SOC_TEMP_SENSOR_SUPPORTED #include "driver/temperature_sensor.h" +#endif #include "mdns.h" #include "lwip/inet.h" @@ -107,7 +110,9 @@ static bool s_ble_enabled = false; static uint8_t s_ble_own_addr_type; /* Chip temperature sensor */ +#if SOC_TEMP_SENSOR_SUPPORTED static temperature_sensor_handle_t s_temp_handle = NULL; +#endif /* UDP socket for CSI data transmission */ static int s_udp_socket = -1; @@ -788,9 +793,11 @@ static int cmd_handle(const char *cmd, char *reply, size_t reply_size) const esp_app_desc_t *app_desc = esp_app_get_description(); float chip_temp = 0.0f; +#if SOC_TEMP_SENSOR_SUPPORTED if (s_temp_handle) { temperature_sensor_get_celsius(s_temp_handle, &chip_temp); } +#endif char uptime_str[32]; if (days > 0) { @@ -1081,7 +1088,8 @@ void app_main() esp_wifi_set_max_tx_power(s_tx_power_dbm * 4); ESP_LOGI(TAG, "TX power set to %d dBm", (int)s_tx_power_dbm); - /* Chip temperature sensor */ + /* Chip temperature sensor (ESP32-S2/S3/C3/C6 only) */ +#if SOC_TEMP_SENSOR_SUPPORTED temperature_sensor_config_t temp_cfg = TEMPERATURE_SENSOR_CONFIG_DEFAULT(-10, 80); if (temperature_sensor_install(&temp_cfg, &s_temp_handle) == ESP_OK) { temperature_sensor_enable(s_temp_handle); @@ -1090,6 +1098,7 @@ void app_main() ESP_LOGW(TAG, "Temperature sensor init failed"); s_temp_handle = NULL; } +#endif /* mDNS: announce as .local */ ESP_ERROR_CHECK(mdns_init());