Skip to content

Commit bb8dc5b

Browse files
author
Scott Powell
committed
Merge branch 'main' into dev
2 parents 8ac8c4d + 792f299 commit bb8dc5b

12 files changed

Lines changed: 291 additions & 160 deletions

File tree

docs/cli_commands.md

Lines changed: 100 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ This document provides an overview of CLI commands that can be sent to MeshCore
6363

6464
---
6565

66+
### Send a zero-hop advert
67+
**Usage:**
68+
- `advert.zerohop`
69+
70+
---
71+
6672
### Start an Over-The-Air (OTA) firmware update
6773
**Usage:**
6874
- `start ota`
@@ -355,13 +361,25 @@ This document provides an overview of CLI commands that can be sent to MeshCore
355361

356362
---
357363

364+
#### View this node's public key
365+
**Usage:** `get public.key`
366+
367+
---
368+
369+
#### View this node's configured role
370+
**Usage:** `get role`
371+
372+
---
373+
358374
#### View or change this node's power saving flag (Repeater Only)
359375
**Usage:**
360-
- `powersaving <state>`
361376
- `powersaving`
377+
- `powersaving on`
378+
- `powersaving off`
362379

363380
**Parameters:**
364-
- `state`: `on`|`off`
381+
- `on`: enable power saving
382+
- `off`: disable power saving
365383

366384
**Default:** `on`
367385

@@ -383,6 +401,46 @@ This document provides an overview of CLI commands that can be sent to MeshCore
383401

384402
---
385403

404+
#### View or change this node's advert path hash size
405+
**Usage:**
406+
- `get path.hash.mode`
407+
- `set path.hash.mode <value>`
408+
409+
**Parameters:**
410+
- `value`: Path hash size (0-2)
411+
- `0`: 1 Byte hash size (256 unique ids)[64 max flood]
412+
- `1`: 2 Byte hash size (65,536 unique ids)[32 max flood]
413+
- `2`: 3 Byte hash size (16,777,216 unique ids)[21 max flood]
414+
- `3`: DO NOT USE (Reserved)
415+
416+
**Default:** `0`
417+
418+
**Note:** the 'path.hash.mode' sets the low-level ID/hash encoding size used when the repeater adverts. This setting has no impact on what packet ID/hash size this repeater forwards, all sizes should be forwarded on firmware >= 1.14. This feature was added in firmware 1.14
419+
420+
**Temporary Note:** adverts with ID/hash sizes of 2 or 3 bytes may have limited flood propogation in your network while this feature is new as v1.13.0 firmware and older will drop packets with multibyte path ID/hashes as only 1-byte hashes are suppored. Consider your install base of firmware >=1.14 has reached a criticality for effective network flooding before implementing higher ID/hash sizes.
421+
422+
---
423+
424+
#### View or change this node's loop detection
425+
**Usage:**
426+
- `get loop.detect`
427+
- `set loop.detect <state>`
428+
429+
**Parameters:**
430+
- `state`:
431+
- `off`: no loop detection is performed
432+
- `minimal`: packets are dropped if repeater's ID/hash appears 4 or more times (1-byte), 2 or more (2-byte), 1 or more (3-byte)
433+
- `moderate`: packets are dropped if repeater's ID/hash appears 2 or more times (1-byte), 1 or more (2-byte), 1 or more (3-byte)
434+
- `strict`: packets are dropped if repeater's ID/hash appears 1 or more times (1-byte), 1 or more (2-byte), 1 or more (3-byte)
435+
436+
**Default:** `off`
437+
438+
**Note:** When it is enabled, repeaters will now reject flood packets which look like they are in a loop. This has been happening recently in some meshes when there is just a single 'bad' repeater firmware out there (prob some forked or custom firmware). If the payload is messed with, then forwarded, the same packet ends up causing a packet storm, repeated up to the max 64 hops. This feature was added in firmware 1.14
439+
440+
**Example:** If preference is `loop.detect minimal`, and a 1-byte path size packet is received, the repeater will see if its own ID/hash is already in the path. If it's already encoded 4 times, it will reject the packet. If the packet uses 2-byte path size, and repeater's own ID/hash is already encoded 2 times, it rejects. If the packet uses 3-byte path size, and the repeater's own ID/hash is already encoded 1 time, it rejects.
441+
442+
---
443+
386444
#### View or change the retransmit delay factor for flood traffic
387445
**Usage:**
388446
- `get txdelay`
@@ -804,6 +862,11 @@ region save
804862

805863
### Bridge (When bridge support is compiled in)
806864

865+
#### View the compiled bridge type
866+
**Usage:** `get bridge.type`
867+
868+
---
869+
807870
#### View or change the bridge enabled flag
808871
**Usage:**
809872
- `get bridge.enabled`
@@ -841,10 +904,10 @@ region save
841904

842905
**Parameters:**
843906
- `source`:
844-
- `rx`: bridges received packets
845-
- `tx`: bridges transmitted packets
907+
- `logRx`: bridges received packets
908+
- `logTx`: bridges transmitted packets
846909

847-
**Default:** `tx`
910+
**Default:** `logTx`
848911

849912
---
850913

@@ -876,8 +939,39 @@ region save
876939
- `set bridge.secret <secret>`
877940

878941
**Parameters:**
879-
- `secret`: 16-character encryption secret
942+
- `secret`: ESP-NOW bridge secret, up to 15 characters
880943

881944
**Default:** Varies by board
882945

883946
---
947+
948+
#### View the bootloader version (nRF52 only)
949+
**Usage:** `get bootloader.ver`
950+
951+
---
952+
953+
#### View power management support
954+
**Usage:** `get pwrmgt.support`
955+
956+
---
957+
958+
#### View the current power source
959+
**Usage:** `get pwrmgt.source`
960+
961+
**Note:** Returns an error on boards without power management support.
962+
963+
---
964+
965+
#### View the boot reset and shutdown reasons
966+
**Usage:** `get pwrmgt.bootreason`
967+
968+
**Note:** Returns an error on boards without power management support.
969+
970+
---
971+
972+
#### View the boot voltage
973+
**Usage:** `get pwrmgt.bootmv`
974+
975+
**Note:** Returns an error on boards without power management support.
976+
977+
---

0 commit comments

Comments
 (0)