Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 53 additions & 44 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
## Operational

### Reboot the node
**Usage:**
**Usage:**
- `reboot`

**Note:** No reply is sent.
Expand All @@ -50,7 +50,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

### Sync the clock with the remote device
**Usage:**
**Usage:**
- `clock sync`

---
Expand All @@ -62,7 +62,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

### Set the time to a specific timestamp
**Usage:**
**Usage:**
- `time <epoch_seconds>`

**Parameters:**
Expand All @@ -71,7 +71,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

### Send a flood advert
**Usage:**
**Usage:**
- `advert`

---
Expand Down Expand Up @@ -101,7 +101,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
## Neighbors (Repeater Only)

### List nearby neighbors
**Usage:**
**Usage:**
- `neighbors`

**Note:** The output of this command is limited to the 8 most recent adverts.
Expand All @@ -111,10 +111,10 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

### Remove a neighbor
**Usage:**
**Usage:**
- `neighbor.remove <pubkey_prefix>`

**Parameters:**
**Parameters:**
- `pubkey_prefix`: The public key of the node to remove from the neighbors list. This can be a short prefix or the full key. All neighbors matching the provided prefix will be removed.

**Note:** You can remove all neighbors by sending a space character as the prefix. The space indicates an empty prefix, which matches all existing neighbors.
Expand All @@ -123,7 +123,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore

### Discover zero hop neighbors

**Usage:**
**Usage:**
- `discover.neighbors`

---
Expand All @@ -136,7 +136,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

### System Stats - Battery, Uptime, Queue Length and Debug Flags
**Usage:**
**Usage:**
- `stats-core`

**Serial Only:** Yes
Expand Down Expand Up @@ -233,7 +233,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

#### Change the radio parameters for a set duration
**Usage:**
**Usage:**
- `tempradio <freq>,<bw>,<sf>,<cr>,<timeout_mins>`

**Parameters:**
Expand Down Expand Up @@ -420,7 +420,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
- `powersaving on`
- `powersaving off`

**Parameters:**
**Parameters:**
- `on`: enable power saving
- `off`: disable power saving

Expand Down Expand Up @@ -454,13 +454,13 @@ This document provides an overview of CLI commands that can be sent to MeshCore
- `0`: 1 Byte hash size (256 unique ids)[64 max flood]
- `1`: 2 Byte hash size (65,536 unique ids)[32 max flood]
- `2`: 3 Byte hash size (16,777,216 unique ids)[21 max flood]
- `3`: DO NOT USE (Reserved)
- `3`: DO NOT USE (Reserved)

**Default:** `0`

**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

**Temporary Note:** adverts with ID/hash sizes of 2 or 3 bytes may have limited flood propagation 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 supported. Consider your install base of firmware >=1.14 has reached a criticality for effective network flooding before implementing higher ID/hash sizes.
**Temporary Note:** adverts with ID/hash sizes of 2 or 3 bytes may have limited flood propagation 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 supported. Consider your install base of firmware >=1.14 has reached a criticality for effective network flooding before implementing higher ID/hash sizes.

---

Expand All @@ -470,17 +470,17 @@ This document provides an overview of CLI commands that can be sent to MeshCore
- `set loop.detect <state>`

**Parameters:**
- `state`:
- `state`:
- `off`: no loop detection is performed
- `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)
- `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)
- `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)

**Default:** `off`

**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 (probably 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

**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.
**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.

---

Expand Down Expand Up @@ -666,12 +666,12 @@ This document provides an overview of CLI commands that can be sent to MeshCore
### ACL

#### Add, update or remove permissions for a companion
**Usage:**
**Usage:**
- `setperm <pubkey> <permissions>`

**Parameters:**
- `pubkey`: Companion public key
- `permissions`:
- `permissions`:
- `0`: Guest
- `1`: Read-only
- `2`: Read-write
Expand All @@ -682,7 +682,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

#### View the current ACL
**Usage:**
**Usage:**
- `get acl`

**Serial Only:** Yes
Expand All @@ -704,7 +704,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
### Region Management (v1.10.+)

#### Bulk-load region lists
**Usage:**
**Usage:**
- `region load`
- `region load <name> [flood_flag]`

Expand All @@ -720,35 +720,35 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

#### Save any changes to regions made since reboot
**Usage:**
**Usage:**
- `region save`

---

#### Allow a region
**Usage:**
**Usage:**
- `region allowf <name>`

**Parameters:**
**Parameters:**
- `name`: Region name (or `*` for wildcard)

**Note:** Setting on wildcard `*` allows packets without region transport codes

---

#### Block a region
**Usage:**
**Usage:**
- `region denyf <name>`

**Parameters:**
**Parameters:**
- `name`: Region name (or `*` for wildcard)

**Note:** Setting on wildcard `*` drops packets without region transport codes

---

#### Show information for a region
**Usage:**
**Usage:**
- `region get <name>`

**Parameters:**
Expand All @@ -757,7 +757,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

#### View or change the home region for this node
**Usage:**
**Usage:**
- `region home`
- `region home <name>`

Expand All @@ -767,7 +767,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

#### View or change the default scope region for this node
**Usage:**
**Usage:**
- `region default`
- `region default {name|<null>}`

Expand All @@ -777,7 +777,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
---

#### Create a new region
**Usage:**
**Usage:**
- `region put <name> [parent_name]`

**Parameters:**
Expand Down Expand Up @@ -828,18 +828,18 @@ region save
---

#### Remove a region
**Usage:**
**Usage:**
- `region remove <name>`

**Parameters:**
- `name`: Region name

**Note:** Must remove all child regions before the region can be removed
**Note:** Must remove all child regions before the region can be removed

---

#### View all regions
**Usage:**
**Usage:**
- `region list <filter>`

**Serial Only:** Yes
Expand All @@ -852,7 +852,7 @@ region save
---

#### Dump all defined regions and flood permissions
**Usage:**
**Usage:**
- `region`

**Serial Only:** For firmware older than 1.12.0
Expand All @@ -877,7 +877,7 @@ region save

**Example 2: Using Wildcard with F Flag**
```
region load
region load
* F
<blank line to end region load>
region save
Expand All @@ -892,7 +892,7 @@ region save

**Example 3: Using Wildcard Without F Flag**
```
region load
region load
*
<blank line to end region load>
region save
Expand All @@ -906,7 +906,7 @@ region save

**Example 4: Nested Public Region with F Flag**
```
region load
region load
#Europe F
#UK
#London
Expand All @@ -927,7 +927,7 @@ region save

**Example 5: Wildcard with Nested Public Regions**
```
region load
region load
* F
#NorthAmerica
#USA
Expand Down Expand Up @@ -966,13 +966,13 @@ region save
---

#### Sync this node's clock with GPS time
**Usage:**
**Usage:**
- `gps sync`

---

#### Set this node's location based on the GPS coordinates
**Usage:**
**Usage:**
- `gps setloc`

---
Expand All @@ -982,8 +982,8 @@ region save
- `gps advert`
- `gps advert <policy>`

**Parameters:**
- `policy`: `none`|`share`|`prefs`
**Parameters:**
- `policy`: `none`|`share`|`prefs`
- `none`: don't include location in adverts
- `share`: share gps location (from SensorManager)
- `prefs`: location stored in node's lat and lon settings
Expand All @@ -1005,7 +1005,7 @@ region save
---

#### View or change the value of a sensor
**Usage:**
**Usage:**
- `sensor get <key>`
- `sensor set <key> <value>`

Expand All @@ -1020,6 +1020,15 @@ region save
#### View the compiled bridge type
**Usage:** `get bridge.type`

**Returns:**
- `none`
- `rs232`
- `espnow`
- `usbserial`
- `tcp`

**Default:** `none`

---

#### View or change the bridge enabled flag
Expand Down Expand Up @@ -1052,7 +1061,7 @@ region save
- `set bridge.source <source>`

**Parameters:**
- `source`:
- `source`:
- `logRx`: bridges received packets
- `logTx`: bridges transmitted packets

Expand Down Expand Up @@ -1083,7 +1092,7 @@ region save
---

#### Set the ESP-Now secret
**Usage:**
**Usage:**
- `get bridge.secret`
- `set bridge.secret <secret>`

Expand Down
Loading