Skip to content

Commit c80bd9c

Browse files
authored
Merge pull request #1952 from AI7NC/patch-1
Update cli_commands.md to include path.hash.mode and loop.detect
2 parents 9f1a3ea + 36db50a commit c80bd9c

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

docs/cli_commands.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,46 @@ This document provides an overview of CLI commands that can be sent to MeshCore
383383

384384
---
385385

386+
#### View or change this node's advert path hash size
387+
**Usage:**
388+
- `get path.hash.mode`
389+
- `set path.hash.mode <value>`
390+
391+
**Parameters:**
392+
- `value`: Path hash size (0-2)
393+
- `0`: 1 Byte hash size (256 unique ids)[64 max flood]
394+
- `1`: 2 Byte hash size (65,536 unique ids)[32 max flood]
395+
- `2`: 3 Byte hash size (16,777,216 unique ids)[21 max flood]
396+
- `3`: DO NOT USE (Reserved)
397+
398+
**Default:** `0`
399+
400+
**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
401+
402+
**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.
403+
404+
---
405+
406+
#### View or change this node's loop detection
407+
**Usage:**
408+
- `get loop.detect`
409+
- `set loop.detect <state>`
410+
411+
**Parameters:**
412+
- `state`:
413+
- `off`: no loop detection is performed
414+
- `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)
415+
- `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)
416+
- `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)
417+
418+
**Default:** `off`
419+
420+
**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
421+
422+
**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.
423+
424+
---
425+
386426
#### View or change the retransmit delay factor for flood traffic
387427
**Usage:**
388428
- `get txdelay`

0 commit comments

Comments
 (0)