From 713b2f881562febf35617856c83582d53350ed7d Mon Sep 17 00:00:00 2001 From: TeTeHacko Date: Wed, 2 Dec 2026 00:49:51 +0100 Subject: [PATCH] docs: console commands written one way -- required, [value] optional, one command per line Co-Authored-By: Claude Opus 5.5 --- README.md | 55 +++++++-------- docs/ble-lora-coexistence.md | 2 +- docs/cli_commands.md | 36 +++++++--- docs/power.md | 6 +- docs/tth-commands.md | 126 ++++++++++++++++++++++------------- 5 files changed, 137 insertions(+), 88 deletions(-) diff --git a/README.md b/README.md index c888fe44..4a1a04db 100644 --- a/README.md +++ b/README.md @@ -32,22 +32,22 @@ vypnuté, dokud je nezapnete. hash odesílatele, původce advertu). Port návrhu Beanowa [#1502](https://github.com/meshcore-dev/MeshCore/pull/1502), limity přepočítané z 30 dní skutečného provozu CZ meshe. - `fairness [on|off|grid|cap|refill]`; přímo směrovaný provoz se neomezuje nikdy. + `fairness `, `fairness cap`, `fairness refill`, `fairness grid`; přímo směrovaný provoz se neomezuje nikdy. * **Okno na adverty podle původce** – flood advert každého uzlu se přepošle - nejvýš jednou za N hodin (`fairness advert |clear`), převzato + nejvýš jednou za N hodin (`fairness advert `, `fairness advert clear`), převzato z AdvertLimiteru [DutchMeshCore](https://github.com/Dutch-MeshCore/MeshCore). Míří na uzly, které advertují každou minutu. * **Dry-run** – `fairness dryrun on` započítá každý verdikt, ale přepošle i tak; `fairness air` ukáže ušetřený (nebo ušetřitelný) airtime podle důvodu. * **Filtr kanálů** – na kanálech, jejichž klíč repeater zná (Public a `#hashtag` kanály), přestane přeposílat zprávy uvedených jmen odesílatelů - (`filter add|del|list`). Jméno se dá podvrhnout: je to brzda na utrženého + (`filter add `, `filter del `, `filter list`). Jméno se dá podvrhnout: je to brzda na utrženého bota, ne bezpečnost. -* **Blokace přeposílání podle hashe kanálu** – `filter hash add [s]`: +* **Blokace přeposílání podle hashe kanálu** – `filter hash add [secs]`: bez klíče, takže funguje i na soukromých kanálech; příjem se nemění, jen přeposílání. S `s` se kanál neodřízne, ale přiškrtí (jeden paket za `s` sekund). -* **Limit stáří zprávy** – `filter age |off` (volitelné, 1–10080 min): +* **Limit stáří zprávy** – `filter age ` / `filter age off` (volitelné, 1–10080 min): nepřeposílá skupinové zprávy na dešifrovaných kanálech, jejichž čas od odesílatele je starší; bez nastavených hodin repeateru neplatí. Posuzuje hodiny odesílatele, takže zahodí i companiony bez synchronizace času – @@ -86,7 +86,7 @@ Repeater navíc: (vysílací výkon do restartu, s verdiktem RadioLibu), čítače chyb vysílání ve stavové odpovědi. * Jen observer varianty (`*-observer`): textová konzole přes BLE vedle USB, - `ble on|off` uložené přes reboot (`RPT_BLE_DEFAULT_OFF`: startuje vypnuté), + `ble ` uložené přes reboot (`RPT_BLE_DEFAULT_OFF`: startuje vypnuté), vlastní BLE PIN (`ble pin`), uložený vysílací výkon spojení (`blepwr`), `bleconn`, neblokující BLE vysílání a parametry spojení, které vydrží i na slabém linku. @@ -99,7 +99,7 @@ Repeater navíc: `!noise`, `!ping`, `!help`, výběr přes `BOT_COMMANDS`, cooldown na odesílatele, ignore list) – odpovídá, aniž by přeposílal; * `RADIO_DIAG`: `radiostat` (stav přijímače SX1262 bez zásahu) a - `radiokick rx|clrirq|standby|agc` (jeden krok obnovy, od nejjemnějšího – + `radiokick ` (jeden krok obnovy, od nejjemnějšího – první, který pomůže, ukáže rozbitou vrstvu); * `PIN_DIAG`: `dio1` (stav přerušení v čipu proti úrovni na pinu – který konec mrtvé linky DIO1 je přerušený); @@ -144,10 +144,10 @@ Repeater navíc: a záznam o hardfaultu přežijí teplý reset (`.noinit`); `clkreboot`. * Na solárních uzlech žádná blikající LED a pomalejší BLE advertising. * Stav baterie jako ikona na konci advertovaného jména: `set batt.icon on`, - prahy `set batt.icon.lo|hi ` (výchozí vypnuté; dlouhé jméno ikonu + prahy `set batt.icon.lo ` a `set batt.icon.hi ` (výchozí vypnuté; dlouhé jméno ikonu nepojme a příkaz na to upozorní). -* Volitelný RX duty cycle (`set radio.rxps off|on|balanced|max`, jemněji - `level <1-10>`; port PowerSaving z EasySkyMesh): SX1262 mezi krátkými okny +* Volitelný RX duty cycle (`set radio.rxps `, jemněji + `set radio.rxps level ` 1–10; port PowerSaving z EasySkyMesh): SX1262 mezi krátkými okny poslechu spí. Ve veřejných buildech je zabudovaný a **vypnutý**; `max` na lavici ušetřil ~2,3 mA bez ztráty paketů ([docs/power.md](docs/power.md)), na ostrém meshi ale jeden náš stožár ztratil 16 % příjmu – zapínat s rozmyslem. Jen @@ -161,8 +161,8 @@ Repeater navíc: ([#2088](https://github.com/meshcore-dev/MeshCore/pull/2088)). Výjimkou je `SenseCap_Solar_repeater` (Li-ion, naše stožáry): pojistka je zapnutá a oba prahy jdou nastavit za běhu, i přes mesh jako admin – - `set pwr.bootlock |off` (výchozí 3300, pod ním uzel nenaběhne a spí, - dokud se článek nezotaví) a `set pwr.cutoff |off` (výchozí vypnuto, + `set pwr.bootlock ` nebo `off` (výchozí 3300, pod ním uzel nenaběhne a spí, + dokud se článek nezotaví) a `set pwr.cutoff ` nebo `off` (výchozí vypnuto, pod ním se běžící uzel vypne); `get pwr` ([docs/power.md](docs/power.md)). ### Senzory a companiony @@ -172,8 +172,8 @@ Repeater navíc: * Senzory, které jinak měří nepřetržitě (INA219, INA226, INA260, INA3221, BMP280), mezi čteními telemetrie spí a měří jen na vyžádání (nápad a první patch pro INA219: Alkel Brostl). Čipy INA se rozlišují podle ID, takže - INA226 už se nedetekuje jako INA219. Odpor bočníku se nastavuje za běhu - a ukládá se: `sensor set ina.shunt `. + INA226 už se nedetekuje jako INA219. Odpor bočníku (INA219, INA226, INA3221; INA260 ho má uvnitř) se + nastavuje za běhu a ukládá se: `sensor set ina.shunt `. * Companion: `gps duty` přežije reboot, kopie data sestavení má hlídanou délku. Export privátního klíče, čtení BLE PINu a jeho změna (i přes CLI `set pin`) jdou jen přes spárované BLE, ne přes USB, UART ani WiFi/TCP, @@ -356,21 +356,21 @@ off until you turn them on. ids already in the clear (channel hash, sender hash, advert origin). Port of Beanow's proposal [#1502](https://github.com/meshcore-dev/MeshCore/pull/1502), limits re-sized from 30 days of real CZ traffic. - `fairness [on|off|grid|cap|refill]`; direct-routed traffic is never limited. + `fairness `, `fairness cap`, `fairness refill`, `fairness grid`; direct-routed traffic is never limited. * **Per-origin advert window** -- each node's flood advert forwarded at most - once per N hours (`fairness advert |clear`), ported from + once per N hours (`fairness advert `, `fairness advert clear`), ported from [DutchMeshCore](https://github.com/Dutch-MeshCore/MeshCore)'s AdvertLimiter. Aimed at nodes that re-advertise every minute. * **Dry-run** -- `fairness dryrun on` counts every verdict but forwards anyway; `fairness air` reports the airtime shed (or that would be) per reason. * **Channel filter** -- on channels whose key the repeater knows (Public and `#hashtag` channels), stop forwarding messages of listed sender names - (`filter add|del|list`). Names are spoofable: it contains a runaway bot, + (`filter add `, `filter del `, `filter list`). Names are spoofable: it contains a runaway bot, it is not security. * **Channel-hash deny-forward** -- `filter hash add [secs]`: keyless, works on private channels too; reception is unaffected, only forwarding. With `secs` the channel is throttled (one packet per `secs`) instead of cut. -* **Message age limit** -- `filter age |off` (opt-in, 1-10080 min): do not +* **Message age limit** -- `filter age ` / `filter age off` (opt-in, 1-10080 min): do not forward group texts on the decrypted channels whose sender timestamp is older; inactive while the repeater clock is unset. It judges the sender's clock, so companions without a time sync are dropped too -- keep it in days. @@ -409,7 +409,7 @@ The repeater also has: `txpwr` (TX power until reboot, with RadioLib's verdict), TX-failure counters in the status reply. * Observer variants only (`*-observer`): text console over BLE next to USB, - `ble on|off` saved across reboots (`RPT_BLE_DEFAULT_OFF`: starts off), own + `ble ` saved across reboots (`RPT_BLE_DEFAULT_OFF`: starts off), own BLE PIN (`ble pin`), persisted connection TX power (`blepwr`), `bleconn`, a non-blocking BLE TX pump and connection parameters that hold on a weak link. @@ -422,7 +422,7 @@ The repeater also has: `!noise`, `!ping`, `!help`, narrowed by `BOT_COMMANDS`, per-sender cooldown, ignore list) -- answers without repeating; * `RADIO_DIAG`: `radiostat` (SX1262 receiver state, hands off) and - `radiokick rx|clrirq|standby|agc` (one recovery step at a time, gentlest + `radiokick ` (one recovery step at a time, gentlest first -- the first that helps names the broken layer); * `PIN_DIAG`: `dio1` (the chip's IRQ status against the level on the pin -- which end of a dead DIO1 line is broken); @@ -467,10 +467,10 @@ The repeater also has: hardfault record survive a warm reset (`.noinit`); `clkreboot`. * No blinking LED and slower BLE advertising on solar nodes. * Battery level as an icon at the end of the advertised name: `set batt.icon - on`, thresholds `set batt.icon.lo|hi ` (off by default; a long name has + on`, thresholds `set batt.icon.lo ` and `set batt.icon.hi ` (off by default; a long name has no room for it and the command says so). -* Optional RX duty cycle (`set radio.rxps off|on|balanced|max`, finer - `level <1-10>`; ported from EasySkyMesh PowerSaving): the SX1262 sleeps +* Optional RX duty cycle (`set radio.rxps `, finer + `set radio.rxps level ` 1-10; ported from EasySkyMesh PowerSaving): the SX1262 sleeps between short listening windows. Built into the public releases and **off**; `max` saved ~2.3 mA on the bench with no packet loss ([docs/power.md](docs/power.md)), but on the live mesh one of our masts lost @@ -485,8 +485,8 @@ The repeater also has: for upstream ([#2088](https://github.com/meshcore-dev/MeshCore/pull/2088)). The exception is `SenseCap_Solar_repeater` (Li-ion, our masts): the lock is on and both thresholds are settable at runtime, also as an admin over the mesh -- - `set pwr.bootlock |off` (default 3300; below it the node does not start - and sleeps until the cell recovers) and `set pwr.cutoff |off` (default + `set pwr.bootlock ` or `off` (default 3300; below it the node does not start + and sleeps until the cell recovers) and `set pwr.cutoff ` or `off` (default off; below it a running node switches off); `get pwr` ([docs/power.md](docs/power.md)). @@ -497,8 +497,9 @@ The repeater also has: * Sensors that would otherwise convert continuously (INA219, INA226, INA260, INA3221, BMP280) sleep between telemetry reads and measure on demand (idea and first INA219 patch: Alkel Brostl). INA chips are told apart by their ID, - so an INA226 is no longer taken for an INA219. The shunt is set at runtime - and saved: `sensor set ina.shunt `. + so an INA226 is no longer taken for an INA219. The shunt (INA219, INA226, + INA3221; the INA260 has it inside) is set at runtime and saved: + `sensor set ina.shunt `. * Companion: `gps duty` persists, bounded build-date copy. Private key export, reading the BLE PIN and changing it (CLI `set pin` included) work only over paired BLE, never over USB, a UART or WiFi/TCP, and the reply that diff --git a/docs/ble-lora-coexistence.md b/docs/ble-lora-coexistence.md index 762275c3..2ccbd406 100644 --- a/docs/ble-lora-coexistence.md +++ b/docs/ble-lora-coexistence.md @@ -198,7 +198,7 @@ know whether a change like `f6e9aeca` (widening the requested interval to from the last one; before any client has ever connected it answers `nothing seen yet`. -### `blepwr [dBm]` — connection TX power, saved +### `blepwr [dBm|default]` — connection TX power, saved ``` blepwr # report: BLE conn tx: 0 dBm, adv tx: 8 dBm diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 54dd0131..ca7665f9 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -44,6 +44,8 @@ This document provides an overview of CLI commands that can be sent to MeshCore --- ### Reset the clock and reboot +*meshcore-tth addition.* + **Usage:** - `clkreboot` @@ -74,7 +76,7 @@ locally. **Reply:** `HH:MM - D/M/YYYY UTC (epoch )` -The epoch is a TeTeHacko addition. The human part is minutes only, so a host +The epoch is a meshcore-tth addition. The human part is minutes only, so a host comparing clocks cannot see a difference smaller than a minute and has to leave a deadband of over 59 s; the epoch makes the comparison exact. It is appended, so anything that only prints the reply is unaffected. @@ -398,13 +400,13 @@ Refer to the node's manual for the correct settings to use. #### Show battery state as an icon on the advertised name -*(TeTeHacko fork)* Appends a solar marker and a charge level to the name +*meshcore-tth addition.* Appends a solar marker and a charge level to the name carried in adverts, so anyone who hears the node can see its state without logging in for telemetry. Off by default. **Usage:** - `get batt.icon` -- `set batt.icon on|off` +- `set batt.icon ` **Default:** `off` @@ -431,6 +433,8 @@ changes roughly once a week. --- #### Battery scale for the name icon +*meshcore-tth addition.* + **Usage:** - `get batt.icon.lo` / `set batt.icon.lo ` - `get batt.icon.hi` / `set batt.icon.hi ` @@ -581,12 +585,16 @@ so the icon and the Grafana percentage tell one story. --- -#### View or change the RX duty cycle (rxps) -- CUSTOM (TeTeHacko) +#### View or change the RX duty cycle (rxps) +*meshcore-tth addition.* + **Usage:** - `get radio.rxps` -- `set radio.rxps off|on|balanced|max` -- `set radio.rxps level <1-10> [preamble <16|32>]` -- `set radio.rxps max preamble <16|32>` +- `set radio.rxps ` +- `set radio.rxps preamble <16|32>` +- `set radio.rxps level [preamble <16|32>]` +- `set radio.rxps ` +- `set radio.rxps ` The SX1262 sleeps between short listening windows (`SetRxDutyCycle`) instead of listening all the time, and stays awake through a packet once it hears a @@ -600,7 +608,7 @@ off until you set it; the setting is saved. higher the level, the longer the sleep. The named presets assume senders with a 16-symbol preamble (the MeshCore default), so they are safe on a mixed mesh. -- `level `: the same scale by number; without `preamble` it follows the SF. +- `level`: the same scale by number, 1..10; without `preamble` it follows the SF. 9 (`overdrive`) and 10 (`riskyWorkingMax`) are past the datasheet's timing condition -- 10 is known to lose packets. - ` `: raw window lengths. @@ -797,6 +805,8 @@ also runs in continuous RX. --- #### Radio silence watchdog (repeater, sensor, room server) +*meshcore-tth addition.* + **Usage:** - `get radio.silence` - `set radio.silence ` @@ -814,6 +824,8 @@ To keep a quiet site out of a reboot loop, each such reboot doubles the threshol --- #### TX stall watchdog (repeater) +*meshcore-tth addition.* + **Usage:** - `get radio.txstall` - `set radio.txstall ` @@ -828,6 +840,8 @@ To keep a quiet site out of a reboot loop, each such reboot doubles the threshol --- #### Reboot into the bootloader (repeater, sensor, room server; nRF52, local console only) +*meshcore-tth addition.* + **Usage:** - `dfu [uf2|serial|ota]` @@ -836,6 +850,8 @@ To keep a quiet site out of a reboot loop, each such reboot doubles the threshol --- #### Why the board last reset (repeater, sensor, room server) +*meshcore-tth addition.* + **Usage:** - `get boot` @@ -1227,7 +1243,7 @@ region save **Note:** In duty-cycle mode `gps` answers `duty, {awake|asleep}, {fix|no fix}, {sat count} sats`. -`gps duty` powers the receiver only around a clock sync and cuts it in between. +*meshcore-tth addition:* `gps duty` powers the receiver only around a clock sync and cuts it in between. It is meant for a node that runs GPS purely to keep its (volatile) RTC set — a mast or solar repeater — where a receiver drawing tens of mA continuously dwarfs the rest of the power budget. Unlike `gps period`, every attempt is @@ -1378,6 +1394,8 @@ Covers serial NMEA receivers (`MicroNMEALocationProvider`). --- #### Set the INA current sensor's shunt resistor +*meshcore-tth addition.* + **Usage:** - `sensor get ina.shunt` - `sensor set ina.shunt ` diff --git a/docs/power.md b/docs/power.md index ea63c4e8..217e33ce 100644 --- a/docs/power.md +++ b/docs/power.md @@ -212,10 +212,10 @@ wired in `variants/sensecap_solar`) and `PWRMGT_RUNTIME` (ours), which gives two thresholds, both saved on the node and settable from the console or as an admin over the mesh: -| | default | | +| command | default | what | |---|---|---| -| `set pwr.bootlock \|off` | 3300 mV (`variant.h`) | at boot, below it the node goes to SYSTEMOFF and the LPCOMP wakes it when the battery recovers | -| `set pwr.cutoff \|off` | off | while running, three readings in a row (one a minute) below it switch the node off into the same SYSTEMOFF | +| `set pwr.bootlock ` | 3300 mV (`variant.h`) | 3000..4200 or `off`; at boot, below it the node goes to SYSTEMOFF and the LPCOMP wakes it when the battery recovers | +| `set pwr.cutoff ` | off | 3000..4200 or `off`; while running, three readings in a row (one a minute) below it switch the node off into the same SYSTEMOFF | | `get pwr` | | both, the battery now and at boot, USB, the reason of the last switch-off | The cutoff must stay below the bootlock -- a node switched off at the cutoff diff --git a/docs/tth-commands.md b/docs/tth-commands.md index 30e90b95..bb348a4c 100644 --- a/docs/tth-commands.md +++ b/docs/tth-commands.md @@ -9,6 +9,10 @@ Everything this fork adds to the text console of a node, on top of upstream's (the watchdogs, `rxps`, `batt.icon`, `gps duty`, `dfu`, `get boot`), this page gives the short form and points to it. +**How commands are written** (as in cli_commands.md): `` is required, +`[value]` optional, `` one of the listed words. One command per line; +ranges, units and defaults are in the description. + **Where a command exists** depends on the role and on build flags: | mark | builds | @@ -33,18 +37,19 @@ Token buckets on forwarded floods, keyed on the 1-byte ids already in the clear: channel hash, sender hash, advert origin. Buckets collide (the hash is masked), and every key is chosen by the sender: it contains runaway floods, it is not security. Direct-routed traffic is never limited. -**On after flashing** (`FAIRNESS_ENABLED_DEFAULT`). -| command | | +| command | what | |---|---| | `fairness` | state, denials per category, caps and refill intervals | -| `fairness on\|off` | the buckets on/off | -| `fairness cap ` | burst caps 0..255, `0` = build default (100 / 150 / 30) | -| `fairness refill ` | one token per interval, seconds, `0` = default (30 / 10 / 600) | +| `fairness ` | the buckets on or off. Default: on (`FAIRNESS_ENABLED_DEFAULT`) | +| `fairness cap ` | burst caps, 0..255 each; `0` = build default (100 / 150 / 30) | +| `fairness refill ` | one token per interval, seconds, 0..65535 each; `0` = build default (30 / 10 / 600) | | `fairness grid` | the busiest denied buckets per category -- what is being shed | | `fairness air` | estimated airtime shed per reason | -| `fairness advert [\|clear]` | per-origin advert window: one flood advert per origin per `` (0..720, `0` = off, default off); `clear` forgets the origins seen | -| `fairness dryrun [on\|off]` | count every verdict but forward anyway (default off) | +| `fairness advert` | the per-origin advert window: hours, held adverts, cache | +| `fairness advert ` | one flood advert per origin per `hours`, 0..720; `0` = off. Default: off | +| `fairness advert clear` | forget the origins seen | +| `fairness dryrun [on\|off]` | count every verdict but forward anyway; without an argument shows the state. Default: off | The defaults keep about twice the headroom over 30 days of CZ mesh traffic (the zero-loss frontier was 60 s / cap 60 per channel, 10 s / 60 per sender, @@ -57,11 +62,12 @@ know Public, `#meshcore` and `#test`) the node decrypts each group text and refuses to forward listed senders. The sender name is plain text in the message: anyone can rename around it. -| command | | +| command | what | |---|---| -| `filter` / `filter list` | channels known, drops, the deny list | -| `filter add ` / `filter del ` | exact, case-insensitive; spaces allowed, commas not | -| `filter clear` | empty the list | +| `filter [list]` | channels known, drops, the deny list | +| `filter add ` | deny a sender name: exact, case-insensitive; spaces allowed, commas not | +| `filter del ` | remove a name from the deny list | +| `filter clear` | empty the deny list | ### Channel-hash deny-forward -- `filter hash` (every repeater) @@ -70,41 +76,48 @@ so this works on private channels too. One byte is coarse -- every other channel whose key hashes to the same byte is hit as well; check what else lives on it before adding one. -| command | | +| command | what | |---|---| -| `filter hash` | drops, passes by a throttle, the list (`43` blocked, `43/60` throttled) | -| `filter hash add [secs]` | block the byte, or let one packet through per `secs` (1..65535); re-adding changes the interval | -| `filter hash del ` / `filter hash clear` | | +| `filter hash [list]` | drops, passes by a throttle, the list (`43` blocked, `43/60` throttled) | +| `filter hash add [secs]` | block the byte, or with `secs` (1..65535) let one packet through per `secs`; re-adding changes the interval | +| `filter hash del ` | remove one byte | +| `filter hash clear` | empty the list | A throttle's window lives in RAM: the first match after a boot passes. ### Message age -- `filter age` (repeater with channel keys) -`filter age |off` (1..10080, default off): do not forward a group text -on a decrypted channel whose sender timestamp is older than `` by this -node's clock. It judges the sender's clock, so a companion that never got a -time sync (it stamps 2024) is dropped too -- keep it in days. Inactive while -the node's own clock reads before 2026; a clock running ahead makes -everything look old. +| command | what | +|---|---| +| `filter age` | the limit and how many were dropped | +| `filter age ` | do not forward a group text on a decrypted channel whose sender timestamp is older than `minutes` (1..10080) by this node's clock | +| `filter age off` | no age limit. Default: off | -### `filter dryrun [on|off]` +It judges the sender's clock, so a companion that never got a time sync (it +stamps 2024) is dropped too -- keep it in days. Inactive while the node's own +clock reads before 2026; a clock running ahead makes everything look old. -Count every `filter` verdict (sender, hash, age) but forward anyway -- try a -rule on a live node before it bites. Default off. +### Dry run -- `filter dryrun` + +| command | what | +|---|---| +| `filter dryrun [on\|off]` | count every `filter` verdict (sender, hash, age) but forward anyway -- try a rule on a live node before it bites; without an argument shows the state. Default: off | ## Radio watchdogs and board upkeep (all) Details: [cli_commands.md](cli_commands.md), "Radio silence watchdog", "TX stall watchdog", "Reboot into the bootloader" and "Why the board last reset". -| command | | +| command | what | |---|---| -| `set radio.silence \|off` / `get radio.silence` | deaf receiver: re-arm RX, then reboot after `` without a received frame (CRC errors count as heard); each such reboot doubles the threshold for the next boot (up to 16x), the first frame clears it. 1..1440, persisted, **default off** | -| `set radio.txstall \|off` / `get radio.txstall` | repeater only: packets queued and nothing sent for `` -> re-arm, then reboot. An empty queue never counts. **On, 15 min** (`RADIO_TXSTALL_MIN`); a change holds until reboot | +| `get radio.silence` | threshold, current multiplier, quiet time, stage | +| `set radio.silence ` | deaf receiver: re-arm RX, then reboot after `minutes` (1..1440) without a received frame (CRC errors count as heard); each such reboot doubles the threshold for the next boot (up to 16x), the first frame clears it. `0` or `off` = off. Saved. Default: off | +| `get radio.txstall` | threshold, queue, time without TX, stage | +| `set radio.txstall ` | repeater only: packets queued and nothing sent for `minutes` (1..1440) -> re-arm, then reboot. An empty queue never counts. `0` or `off` = off. Not saved: a reboot returns to the build value. Default: 15 (`RADIO_TXSTALL_MIN`) | | `get radio.reboots` | reboots done by the watchdogs, survives power loss | | `get boot` | reset reason and the hardfault record (also printed at boot) | -| `dfu [uf2\|serial\|ota]` | *local only*: reboot into the bootloader -- UF2 drive (default), CDC port for `adafruit-nrfutil`, or BLE DFU | -| `fw ...` | `-ota` images only: admin-pushed firmware update, see [ota.md](ota.md) | +| `dfu [uf2\|serial\|ota]` | *local only*, nRF52: reboot into the bootloader -- UF2 drive (default), CDC port for `adafruit-nrfutil`, or BLE DFU | +| `fw ` | `-ota` images only: admin-pushed firmware update, see [ota.md](ota.md) | ## Number arguments of `set` (all, and the companion's serial CLI) @@ -123,15 +136,17 @@ tz.offset`. No exponent (`1e3`), no `nan`/`inf`. ## Diagnostics -| command | where | | +| command | where | what | |---|---|---| -| `blink [n]` / `blink on\|off` | repeater | flash a spare LED (not the BLE or TX one) `n` times (default 6, max 999), or until `blink off` (gives up after 10 min); finds a board on a bench or a node on a mast | -| `txpwr [dBm]` | repeater | LoRa output power until reboot, with RadioLib's status; takes -9..30 | +| `blink [count]` | repeater | flash a spare LED (not the BLE or TX one) `count` times (1..999, default 6); finds a board on a bench or a node on a mast | +| `blink ` | repeater | blink until `blink off` (gives up after 10 min) | +| `txpwr` | repeater | the last requested LoRa output power and RadioLib's status | +| `txpwr ` | repeater | LoRa output power until reboot, -9..30 (SX1262 takes -9..22), with RadioLib's status | | `i2c` | all | scan the I2C bus | | `get chip` | nRF52 (repeater, room server, sensor) | the silicon (`nRF52840 AAD0`; variant `xxF0` and later = rev3) and `UICR.APPROTECT`: `open` means SWD can read the whole flash, keys included | | `dio1` | own build: `PIN_DIAG` | has the SX1262 raise TX_DONE and compares its IRQ register with the level on the DIO1 pin -- which end of a dead IRQ line is broken | | `radiostat` | own build: `RADIO_DIAG` | receiver state, interrupt and RX counters, without touching the radio | -| `radiokick rx\|clrirq\|standby\|agc` | own build: `RADIO_DIAG` | one recovery step, gentlest first: re-arm RX, clear latched IRQs, standby + RX, AGC reset; the first that brings `recv` back names the broken layer | +| `radiokick ` | own build: `RADIO_DIAG` | one recovery step, gentlest first: re-arm RX, clear latched IRQs, standby + RX, AGC reset; the first that brings `recv` back names the broken layer | A board with a dead DIO1 line still runs with `LORA_POLL_IRQ` (own build): the IRQ status is polled over SPI. @@ -142,12 +157,15 @@ The text console over BLE (Nordic UART), next to USB. No login of its own: the BLE PIN is the only lock, and the release PIN is the public placeholder `123456`. These commands also work as admin over the mesh. -| command | | +| command | what | |---|---| -| `ble` | on/off, PIN `own` or `build default` -- never the PIN itself | -| `ble pin <6 digits>` | set your own PIN (saved, survives a reflash; drops every bond, so paired devices pair again) | -| `ble on\|off` | persisted; **off after flashing** (`RPT_BLE_DEFAULT_OFF`), and `ble on` is refused while the PIN is the placeholder | -| `blepwr [dBm\|default]` | TX power of the connection (-40, -20, -16, -12, -8, -4, 0, 2..8), applied to live connections and saved; `default` returns to the build value (0 dBm) | +| `ble` | on or off, PIN `own` or `build default`, connected or not -- never the PIN itself | +| `ble ` | the BLE console on or off, saved. Default: off (`RPT_BLE_DEFAULT_OFF`); `ble on` is refused while the PIN is the placeholder | +| `ble pin` | whether the PIN is your own or the build default | +| `ble pin ` | set your own PIN, 6 digits (saved, survives a reflash; drops every bond, so paired devices pair again) | +| `blepwr` | TX power of the connection and of advertising | +| `blepwr ` | TX power of the connection: -40, -20, -16, -12, -8, -4, 0, 2..8; applied to live connections and saved | +| `blepwr default` | back to the build value (0 dBm) | | `bleconn` | what the central actually agreed to: interval (and what was requested), latency, supervision timeout | A connected central stops the node advertising: if the BLE console cannot be @@ -155,9 +173,9 @@ found, look for who is connected (`ble` shows it). ## Passive analyzer (observer) -| command | | +| command | what | |---|---| -| `nodes [offset]` | heard repeaters and room servers with a key to join several paths, paged | +| `nodes [offset]` | heard repeaters and room servers with a key to join several paths, paged from `offset` | | `rxlog [cursor]` | every frame heard: type, path, SNR, RSSI; `cursor` from the previous page (`0` = all) | | `pktlog [cursor]` | raw frames heard, for an observer feed ([meshcore-repeater-observer](https://git.rfa.cz/tth-pub/meshcore-repeater-observer)) | @@ -173,27 +191,39 @@ console shows its state. ## Power and clock -| command | where | | +| command | where | what | |---|---|---| -| `set radio.rxps off\|on\|balanced\|max`, `level <1-10> [preamble 16\|32]` / `get radio.rxps` | all, SX1262 only (`WITH_RX_POWERSAVING`, in the releases) | RX duty cycle: the radio sleeps between short listening windows. **Off by default.** `max` saved ~2.3 mA on the bench, but a mast on the live mesh lost 16 % of its reception -- see cli_commands.md and [power.md](power.md) | -| `set batt.icon on\|off`, `set batt.icon.lo\|hi ` | all | battery level as an icon at the end of the advertised name (off by default; with a name too long for it the icon is left out, and the reply says so) | -| `gps duty ...` | GPS boards | the receiver runs only around a clock sync; see cli_commands.md | -| `get pwr`, `set pwr.bootlock \|off`, `set pwr.cutoff \|off` | SenseCAP Solar repeater (`PWRMGT_RUNTIME`) | battery thresholds: don't start below the bootlock, switch a running node off below the cutoff (cutoff < bootlock, none above the battery right now); saved on the node, see [power.md](power.md) | +| `get radio.rxps` | all, SX1262 only (`WITH_RX_POWERSAVING`, in the releases) | requested and effective RX duty cycle, window lengths, error counters | +| `set radio.rxps ` | same | RX duty cycle: the radio sleeps between short listening windows. Presets: `on` = level 3, `balanced` = 6, `max` = 8. Saved. Default: off | +| `set radio.rxps level [preamble <16\|32>]` | same | the same by number, 1..10 (9 and 10 are past the datasheet's timing condition, 10 is known to lose packets) | +| `set radio.rxps ` | same | raw window lengths | +| `get batt.icon` | all | whether the icon is on, and whether the name leaves room for it | +| `set batt.icon ` | all | battery level as an icon at the end of the advertised name; with a name too long for it the icon is left out, and the reply says so. Default: off | +| `set batt.icon.lo ` | all | the empty end of the icon's scale, 2500..4500; `0` = build default (3300) | +| `set batt.icon.hi ` | all | the full end, 2500..4500; `0` = build default (4200) | +| `gps duty` | GPS boards | the receiver runs only around a clock sync; `gps on` / `gps off` leave it. See cli_commands.md | +| `get pwr` | SenseCAP Solar repeater (`PWRMGT_RUNTIME`) | both thresholds, the battery now and at boot, why the node last switched off | +| `set pwr.bootlock ` | same | do not start below this voltage, 3000..4200 or `off`; saved on the node, see [power.md](power.md) | +| `set pwr.cutoff ` | same | switch a running node off below this voltage, 3000..4200 or `off`. Must stay under the bootlock; neither may be above the battery right now | | `clkreboot` | all | reset the clock to the build epoch and reboot -- the only way to move a clock backwards (`time` and `clock sync` refuse to) | +RX duty cycle: `max` saved ~2.3 mA on the bench, but a mast on the live mesh +lost 16 % of its reception -- see cli_commands.md and [power.md](power.md). + ## Sensors -| command | | +| command | what | |---|---| | `sensor read` | the live telemetry decoded into one line (`sensor list` shows only settings) | -| `sensor set ina.shunt ` | shunt resistance of an INA219/226/260/3221, saved across reboots | +| `sensor get ina.shunt` | the shunt the current is computed with | +| `sensor set ina.shunt ` | shunt resistance of an INA219, INA226 or INA3221 module (`10` for `R010`), saved; `0` = build default (100). The INA260 has its shunt inside and no setting | ## Build flags The ones that change what a node does; set in `platformio.ini` / `platformio.local.ini` (`-D NAME=value`, the last `-D` wins). -| flag | default | | +| flag | default | what | |---|---|---| | `FAIRNESS_ENABLED_DEFAULT` | `1` | FairnessLimiter on for a node without prefs | | `RADIO_SILENCE_MIN_DEFAULT` | `0` | deaf-receiver watchdog for a node without prefs |