Skip to content

Latest commit

 

History

History
227 lines (172 loc) · 7.54 KB

File metadata and controls

227 lines (172 loc) · 7.54 KB

CLI Command Reference

Source: docs.meshcore.io/cli_commands/, docs.meshcore.io/terminal_chat_cli/

The MeshCore CLI is accessible via USB serial connection (115200 baud, 8N1, no flow control) or over the companion app's admin interface.

System Commands

Command Description
reboot Restart the device
clkreboot Reset clock and restart
clock sync Sync clock with a remote device
clock Show current UTC time
time <epoch_seconds> Set time to specific Unix timestamp
advert Send flood advertisement
advert.zerohop Send direct (zero-hop) advertisement
start ota Start over-the-air firmware update
erase Factory reset the device

Neighbor Management (Repeater only)

Command Description
neighbors Show up to 8 most recent neighbor advertisements
neighbor.remove <pubkey_prefix> Remove neighbor from table
discover.neighbors Discover direct neighbors

Statistics

Command Description
clear stats Reset all statistics
stats-core System stats (battery, uptime, queue)
stats-radio Radio stats (noise floor, RSSI/SNR)
stats-packets Packet stats (received/sent counts)

Logging

Command Description
log start Start capturing RX log in memory
log stop Stop log capture
log erase Delete stored log
log Display log in terminal

Device Information

Command Description
ver Show firmware version
board Show hardware board name

Radio Configuration

Command Parameters Default
get/set radio freq(MHz),bw(kHz),sf(5–12),cr(5–8) 869.525,250,11,5
get/set tx TX power in dBm (1–22) Board-dependent
get/set radio.rxgain on / off off
tempradio freq,bw,sf,cr,timeout_mins
get/set freq Frequency in MHz 869.525

Note: rxgain is enabled by default in v1.15.0 for most boards.


System Configuration

Command Description Default
get/set name Node name (max 24–32 bytes, board-dependent)
get/set lat Latitude in decimal degrees 0
get/set lon Longitude in decimal degrees 0
get/set prv.key Private key (64 hex chars) — serial only
password Change admin password (prompted) password
get/set guest.password Guest password hello
get/set owner.info Owner information string
get/set adc.multiplier ADC multiplier (0.0–10.0) 0.0
get public.key Show public key
get role Show configured node role
powersaving on / off (Repeater only) on

Routing Configuration

Command Description Default
get/set repeat Enable/disable packet repeating on
get/set path.hash.mode Hash size: 0=1byte, 1=2bytes, 2=3bytes 0
get/set loop.detect off / minimal / moderate / strict off
get/set txdelay TX delay factor (0.0–2.0) 0.5
get/set direct.txdelay Direct TX delay factor (0.0–2.0) 0.2
get/set rxdelay RX delay (0.0–20.0) 0.0
get/set dutycycle Transmit duty cycle limit (1–100%) 50
get/set int.thresh Interference threshold 0.0
get/set agc.reset.interval AGC reset interval in seconds (multiple of 4) 0.0
get/set multi.acks Multiple ACKs: 0=off, 1=on 0
get/set flood.advert.interval Flood advert interval in hours (3–168) 12
get/set advert.interval Direct advert interval in minutes (60–240) 0
get/set flood.max Maximum flood hop count (0–64) 64

Access Control (ACL)

Command Description
setperm <pubkey> Set permissions: 0=guest, 1=read-only, 2=read-write, 3=admin
get acl Show current ACL (serial only)
get/set allow.read.only Allow read-only access: on / off

Region Management (v1.10+)

Regions allow organizing the network into named geographic or logical areas with configurable flood permissions.

Command Description
region load [name] [F] Load a region (F = enable flooding)
region save Save changes since last reboot
region allowf <name> Allow flooding for region
region denyf <name> Deny flooding for region
region get <name> Show region information
region home [name] Set home region
region default {name|null} Set default scope region
region put <name> [parent] Create new region
region remove <name> Delete region
region list [allowed|denied] List all regions

GPS (when compiled in)

Command Parameters Default
gps [on|off] Enable/disable GPS off
gps sync Sync clock from GPS
gps setloc Set location from current GPS coordinates
gps advert [policy] GPS advert policy: none / share / prefs prefs

Sensors (when compiled in)

Command Description
sensor list [start] List all sensors with current values
sensor get <key> Get specific sensor value
sensor set <key> <value> Set sensor value

Bridge (when compiled in)

Command Parameters Default
get bridge.type Show compiled bridge type
get/set bridge.enabled on / off off
get/set bridge.delay Delay in milliseconds (0–10000) 500
get/set bridge.source logRx / logTx logTx
get/set bridge.baud Baud rate (9600–115200) 115200
get/set bridge.channel ESPNow channel (1–14)
get/set bridge.secret Bridge secret (max 15 chars) Board-dependent

Power Management (nRF52)

Command Description
get bootloader.ver Show bootloader version
get pwrmgt.support Check power management support
get pwrmgt.source Show current power source
get pwrmgt.bootreason Show boot/shutdown reason
get pwrmgt.bootmv Show boot voltage in mV

Terminal Chat CLI

Source: docs.meshcore.io/terminal_chat_cli/

Used with the simple_secure_chat example firmware.

Configuration

Command Description
set freq <MHz> Set LoRa frequency
set tx <dBm> Set transmit power
set name <name> Set advertisement name
set lat <degrees> Set latitude
set lon <degrees> Set longitude
set dutycycle <percent> Set TX duty cycle limit (1–100%)
time <epoch_seconds> Sync device clock

Messaging

Command Description
send <text> Send direct message to current recipient
public <text> Send to public channel
to <name_prefix> Select recipient from contacts

Contacts & Info

Command Description
card Display your own "business card" for manual import
import <card> Import a contact's business card
list [n] List contacts by most recent
ver Show version information
clock Show current device time
reset path Reset path to current recipient