Skip to content
Draft
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
24 changes: 24 additions & 0 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,30 @@ This document provides an overview of CLI commands that can be sent to MeshCore

---

#### Try a setting with automatic revert
**Usage:**
- `try <secs> <set-args>`
- `try reboot <secs> <set-args>`
- `get try`

**Parameters:**
- `secs`: Trial duration in seconds (1–604800, max 7 days)
- `set-args`: Same arguments as `set` (e.g. `radio.rxgain off`) or `powersaving on|off`
- `reboot`: Optional keyword before `secs`. On timeout, restore the snapshotted value and reboot (~2 s later)

**Examples:**
- `try 3600 radio.rxgain off`
- `try reboot 3600 radio 915.0,250,11,5`
- `set radio.rxgain off` commits the trial before timeout (cancels revert)

**Notes:**
- Up to **4** concurrent trials (`/try.json` on flash). Survives reboot; timer uses RTC `expires_at`.
- Denied keys: `prv.key`, `password`, `guest.password`, `name`, `lat`, `lon`.
- `set radio` / `set freq` inherit **reboot armed** on revert (reply says so). Apply still needs a manual reboot.
- Reply forms: `OK - try Ns (reverts unless set)` or `… reboot armed` (+ `; reboot to apply` when applicable).

---

#### View or change this node's frequency
**Usage:**
- `get freq`
Expand Down
2 changes: 2 additions & 0 deletions examples/simple_repeater/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,8 @@ void MyMesh::loop() {
bridge.loop();
#endif

_cli.loop();

mesh::Mesh::loop();

if (next_flood_advert && millisHasNowPassed(next_flood_advert)) {
Expand Down
2 changes: 2 additions & 0 deletions examples/simple_room_server/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,8 @@ bool MyMesh::saveFilter(ClientInfo* client) {
}

void MyMesh::loop() {
_cli.loop();

mesh::Mesh::loop();

if (millisHasNowPassed(next_push) && acl.getNumClients() > 0) {
Expand Down
2 changes: 2 additions & 0 deletions examples/simple_sensor/SensorMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,8 @@ bool SensorMesh::getGPS(uint8_t channel, float& lat, float& lon, float& alt) {
}

void SensorMesh::loop() {
_cli.loop();

mesh::Mesh::loop();

if (next_flood_advert && millisHasNowPassed(next_flood_advert)) {
Expand Down
Loading