Skip to content

Commit 0d0b31e

Browse files
committed
docs: sync CLI and payload docs with implementation
1 parent eeae32b commit 0d0b31e

3 files changed

Lines changed: 90 additions & 38 deletions

File tree

docs/cli_commands.md

Lines changed: 69 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
5353
- `time <epoch_seconds>`
5454

5555
**Parameters:**
56-
- `epoc_seconds`: Unix epoc time
56+
- `epoch_seconds`: Unix epoch time
5757

5858
---
5959

@@ -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`
@@ -136,7 +142,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
136142

137143
---
138144

139-
### End capture of rx log to node sotrage
145+
### End capture of rx log to node storage
140146
**Usage:** `log stop`
141147

142148
---
@@ -200,7 +206,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
200206

201207
**Default:** Varies by board
202208

203-
**Notes:** This setting only controls the power level of the LoRa chip. Some nodes have an additional power amplifier stage which increases the total output. Referr to the node's manual for the correct setting to use. **Setting a value too high may violate the laws in your country.**
209+
**Notes:** This setting only controls the power level of the LoRa chip. Some nodes have an additional power amplifier stage which increases the total output. Refer to the node's manual for the correct setting to use. **Setting a value too high may violate the laws in your country.**
204210

205211
---
206212

@@ -230,6 +236,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
230236
**Default:** `869.525`
231237

232238
**Note:** Requires reboot to apply
239+
**Serial Only:** `set freq <frequency>`
233240

234241
### System
235242

@@ -287,24 +294,24 @@ This document provides an overview of CLI commands that can be sent to MeshCore
287294

288295
**Serial Only:**
289296
- `get prv.key`: Yes
290-
- `set prv.key`: No
297+
- `set prv.key`: Yes
291298

292299
**Note:** Requires reboot to take effect after setting
293300

294301
---
295302

296303
#### Change this node's admin password
297304
**Usage:**
298-
- `password <password>`
305+
- `password <new_password>`
299306

300307
**Parameters:**
301-
- `password`: Admin password
308+
- `new_password`: New admin password
302309

303310
**Set by build flag:** `ADMIN_PASSWORD`
304311

305312
**Default:** `password`
306313

307-
**Note:** Echoed back for confirmation
314+
**Note:** Command reply echoes the updated password for confirmation.
308315

309316
**Note:** Any node using this password will be added to the admin ACL list.
310317

@@ -354,13 +361,25 @@ This document provides an overview of CLI commands that can be sent to MeshCore
354361

355362
---
356363

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+
357374
#### View or change this node's power saving flag (Repeater Only)
358375
**Usage:**
359-
- `powersaving <state>`
360376
- `powersaving`
377+
- `powersaving on`
378+
- `powersaving off`
361379

362380
**Parameters:**
363-
- `state`: `on`|`off`
381+
- `on`: enable power saving
382+
- `off`: disable power saving
364383

365384
**Default:** `on`
366385

@@ -769,7 +788,7 @@ region save
769788
- `gps advert <policy>`
770789

771790
**Parameters:**
772-
- `policy`: `none`|`shared`|`prefs`
791+
- `policy`: `none`|`share`|`prefs`
773792
- `none`: don't include location in adverts
774793
- `share`: share gps location (from SensorManager)
775794
- `prefs`: location stored in node's lat and lon settings
@@ -803,6 +822,11 @@ region save
803822

804823
### Bridge (When bridge support is compiled in)
805824

825+
#### View the compiled bridge type
826+
**Usage:** `get bridge.type`
827+
828+
---
829+
806830
#### View or change the bridge enabled flag
807831
**Usage:**
808832
- `get bridge.enabled`
@@ -840,10 +864,10 @@ region save
840864

841865
**Parameters:**
842866
- `source`:
843-
- `rx`: bridges received packets
844-
- `tx`: bridges transmitted packets
867+
- `logRx`: bridges received packets
868+
- `logTx`: bridges transmitted packets
845869

846-
**Default:** `tx`
870+
**Default:** `logTx`
847871

848872
---
849873

@@ -875,8 +899,39 @@ region save
875899
- `set bridge.secret <secret>`
876900

877901
**Parameters:**
878-
- `secret`: 16-character encryption secret
902+
- `secret`: ESP-NOW bridge secret, up to 15 characters
879903

880904
**Default:** Varies by board
881905

882906
---
907+
908+
#### View the bootloader version (nRF52 only)
909+
**Usage:** `get bootloader.ver`
910+
911+
---
912+
913+
#### View power management support
914+
**Usage:** `get pwrmgt.support`
915+
916+
---
917+
918+
#### View the current power source
919+
**Usage:** `get pwrmgt.source`
920+
921+
**Note:** Returns an error on boards without power management support.
922+
923+
---
924+
925+
#### View the boot reset and shutdown reasons
926+
**Usage:** `get pwrmgt.bootreason`
927+
928+
**Note:** Returns an error on boards without power management support.
929+
930+
---
931+
932+
#### View the boot voltage
933+
**Usage:** `get pwrmgt.bootmv`
934+
935+
**Note:** Returns an error on boards without power management support.
936+
937+
---

docs/faq.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ MeshCore allows you to manually broadcast your name, position and public encrypt
221221
* Zero hop means your advert is broadcasted out to anyone that can hear it, and that's it.
222222
* Flooded means it's broadcasted out and then repeated by all the repeaters that hear it.
223223

224-
MeshCore clients only advertise themselves when the user initiates it. A repeater sends a flood advert once every 3 hours by default. This interval can be configured using the following command:
224+
MeshCore clients only advertise themselves when the user initiates it. A repeater sends a flood advert once every 12 hours by default. This interval can be configured using the following command:
225225

226-
`set advert.interval {minutes}`
226+
`set flood.advert.interval {hours}`
227227

228-
As of Aug 20 2025, a pending PR on github will change the flood advert to 12 hours to minimize airtime utilization caused by repeaters' flood adverts.
228+
The separate `set advert.interval {minutes}` command controls the local zero-hop advert timer.
229229

230230
### 2.5. Q: Is there a hop limit?
231231

@@ -260,7 +260,9 @@ Repeater or room server can be administered with one of the options below:
260260
### 3.2. Q: Do I need to set the location for a repeater?
261261
**A:** While not required, with location set for a repeater it will show up on the MeshCore map in the future. Set location with the following command:
262262

263-
`set lat <GPS Lat> set long <GPS Lon>`
263+
`set lat <GPS Lat>`
264+
265+
`set lon <GPS Lon>`
264266

265267
You can get the latitude and longitude from Google Maps by right-clicking the location you are at on the map.
266268

docs/payloads.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,17 @@ Returned path messages provide a description of the route a packet took from the
9090

9191
## Request
9292

93-
| Field | Size (bytes) | Description |
94-
|--------------|-----------------|----------------------------|
95-
| timestamp | 4 | send time (unix timestamp) |
96-
| request type | 1 | see below |
97-
| request data | rest of payload | depends on request type |
93+
| Field | Size (bytes) | Description |
94+
|--------------|-----------------|------------------------------------------|
95+
| timestamp | 4 | sender time (unix timestamp) |
96+
| request data | rest of payload | application-defined request payload body |
9897

99-
Request type
98+
For the common chat/server helpers in `BaseChatMesh`, the current request type values are:
10099

101100
| Value | Name | Description |
102101
|--------|----------------------|---------------------------------------|
103102
| `0x01` | get stats | get stats of repeater or room server |
104-
| `0x02` | keepalive | (deprecated) |
105-
| `0x03` | get telemetry data | TODO |
106-
| `0x04` | get min,max,avg data | sensor nodes - get min, max, average for given time span |
107-
| `0x05` | get access list | get node's approved access list |
108-
| `0x06` | get neighbors | get repeater node's neighbors |
109-
| `0x07` | get owner info | get repeater firmware-ver/name/owner info |
103+
| `0x02` | keepalive | keep-alive request used for maintained connections |
110104

111105
### Get stats
112106

@@ -133,35 +127,36 @@ Gets information about the node, possibly including the following:
133127

134128
### Get telemetry data
135129

136-
Request data about sensors on the node, including battery level.
130+
Not defined in `BaseChatMesh`. Sensor- and application-specific request payloads may be implemented by higher-level firmware.
137131

138132
### Get Telemetry
139133

140-
TODO
134+
Not defined in `BaseChatMesh`.
141135

142136
### Get Min/Max/Ave (Sensor nodes)
143137

144-
TODO
138+
Not defined in `BaseChatMesh`.
145139

146140
### Get Access List
147141

148-
TODO
142+
Not defined in `BaseChatMesh`.
149143

150144
### Get Neighors
151145

152-
TODO
146+
Not defined in `BaseChatMesh`.
153147

154148
### Get Owner Info
155149

156-
TODO
150+
Not defined in `BaseChatMesh`.
157151

158152

159153
## Response
160154

161155
| Field | Size (bytes) | Description |
162156
|---------|-----------------|-------------|
163-
| tag | 4 | TODO |
164-
| content | rest of payload | TODO |
157+
| content | rest of payload | application-defined response body |
158+
159+
Response contents are opaque application data. There is no single generic response envelope beyond the encrypted payload wrapper shown above.
165160

166161
## Plain text message
167162

0 commit comments

Comments
 (0)