docs: add name, name set, beacon

This commit is contained in:
UA1ZBE
2026-07-22 13:32:59 +03:00
parent acc36cf3ad
commit 62cf8fc3f4
3 changed files with 22 additions and 0 deletions

View File

@@ -117,6 +117,9 @@ All commands are processed in `onGroupDataRecv()`:
| `ver` | build date | `build:Mon DD YYYY HH:MM:SS` |
| `scan` | noise floor | `noise:-XXXdBm` |
| `snr` | RSSI и SNR последнего пакета | `rssi:-78dBm snr:+6.5dB` |
| `name` | показать имя устройства | `test` или `name not set` |
| `name set <name>` | присвоить имя (до 31 символа) | `test` |
| `beacon` | отправить advert с ретрансляцией | `beacon ok` |
| `uptime` | device uptime | `uptime:1d 3h 15m` |
| `kontrol <min>` | auto-status every N min | `kontrol 60 min ok` |
| `kontrol off` | disable auto-status | `kontrol off` |
@@ -134,6 +137,10 @@ Alerts (`alert:hall`, `alert:motion`) and startup (`poweron`) are sent immediate
- **`snr`** — returns `rssi:-78dBm snr:+6.5dB` based on the last received packet. Uses `radio_driver.getLastRSSI()` and `pkt->getSNR()`. Stored in `last_rssi` / `last_snr` fields, updated on every `onGroupDataRecv`.
- **`name set <name>`** — stores device name in `/name.cfg` on InternalFS. Name is saved persistently and survives reboot. Query with `name`.
- **`beacon`** — creates an advert packet via `createAdvert(self_id, app_data)` with device name as app_data, then sends with `sendFlood()` for network-wide propagation.
- **`reboot`** — sends `rebooting` immediately (not deferred), blinks LED 5 times, then `NVIC_SystemReset()`.
- **`uptime`** — calculates uptime from `g_boot_time` (set at boot). Format: `uptime:1d 3h 15m` (days/hours/minutes).
- **`kontrol <min>`** — sets `g_auto_status_interval = min * 60000`. In `loop()`, when `millis() - g_last_auto_status >= interval`, sends status. Range: 11440 minutes.