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.
This commit is contained in:
@@ -23,30 +23,38 @@ idf.py reconfigure # Re-fetch managed components
|
||||
|
||||
## Deployed Sensors
|
||||
|
||||
| Name | IP | Location |
|
||||
|------|-----|----------|
|
||||
| muddy-storm | 192.168.129.29 | Living Room |
|
||||
| amber-maple | 192.168.129.30 | Office |
|
||||
| hollow-acorn | 192.168.129.31 | Kitchen |
|
||||
| Name | IP | mDNS | Location |
|
||||
|------|-----|------|----------|
|
||||
| muddy-storm | 192.168.129.29 | muddy-storm.local | Living Room |
|
||||
| amber-maple | 192.168.129.30 | amber-maple.local | Office |
|
||||
| hollow-acorn | 192.168.129.31 | hollow-acorn.local | Kitchen |
|
||||
|
||||
**Target:** `192.168.129.11:5500` (Pi) | **Cmd port:** `5501`
|
||||
|
||||
## Remote Management (esp-cmd)
|
||||
|
||||
```bash
|
||||
esp-cmd <ip> STATUS # Uptime, heap, RSSI, tx_power, rate
|
||||
esp-cmd <ip> IDENTIFY # LED solid 5s (find the device)
|
||||
esp-cmd <ip> RATE 50 # Set ping rate to 50 Hz (NVS saved)
|
||||
esp-cmd <ip> POWER 15 # Set TX power to 15 dBm (NVS saved)
|
||||
esp-cmd <ip> REBOOT # Restart device
|
||||
esp-cmd <host> STATUS # Uptime, heap, RSSI, tx_power, rate
|
||||
esp-cmd <host> IDENTIFY # LED solid 5s (find the device)
|
||||
esp-cmd <host> RATE 50 # Set ping rate to 50 Hz (NVS saved)
|
||||
esp-cmd <host> POWER 15 # Set TX power to 15 dBm (NVS saved)
|
||||
esp-cmd <host> REBOOT # Restart device
|
||||
```
|
||||
|
||||
Examples with deployed sensors:
|
||||
Host can be an IP or mDNS name (`amber-maple.local`).
|
||||
|
||||
```bash
|
||||
esp-cmd 192.168.129.29 STATUS # muddy-storm
|
||||
esp-cmd 192.168.129.30 IDENTIFY # amber-maple
|
||||
esp-cmd 192.168.129.31 RATE 25 # hollow-acorn
|
||||
esp-cmd amber-maple.local STATUS # Single device via mDNS
|
||||
esp-cmd 192.168.129.29 IDENTIFY # Single device via IP
|
||||
```
|
||||
|
||||
## Fleet Management (esp-fleet)
|
||||
|
||||
```bash
|
||||
esp-fleet status # Query all sensors at once
|
||||
esp-fleet identify # Blink all LEDs
|
||||
esp-fleet rate 50 # Set rate on all devices
|
||||
esp-fleet reboot # Reboot entire fleet
|
||||
```
|
||||
|
||||
### LED States
|
||||
@@ -83,6 +91,8 @@ nc -lu 5500 | wc -l # Count packets/sec (Ctrl+C)
|
||||
| Example Connection Configuration → Password | WiFi password |
|
||||
| CSI UDP Configuration → IP | `192.168.129.11` |
|
||||
| CSI UDP Configuration → Port | `5500` |
|
||||
| CSI UDP Configuration → Cmd port | `5501` |
|
||||
| CSI UDP Configuration → Hostname | mDNS name (e.g., `amber-maple`) |
|
||||
|
||||
## CSI Data Format
|
||||
|
||||
@@ -99,6 +109,7 @@ secondary_channel,timestamp,ant,sig_len,rx_state,len,first_word,"[I,Q,...]"
|
||||
| `get-started/csi_recv_router/main/app_main.c` | Main firmware source |
|
||||
| `get-started/csi_recv_router/main/Kconfig.projbuild` | UDP/cmd port config |
|
||||
| `tools/esp-cmd` | Pi-side management CLI |
|
||||
| `tools/esp-fleet` | Fleet-wide command tool |
|
||||
| `get-started/csi_recv_router/sdkconfig.defaults` | SDK defaults |
|
||||
| `get-started/csi_recv_router/main/idf_component.yml` | Dependencies |
|
||||
| `get-started/csi_recv_router/CMakeLists.txt` | Build config |
|
||||
|
||||
Reference in New Issue
Block a user