MeshCore CLI Reference
Connecting to Your Device
The MeshCore CLI (meshcore-cli) supports three connection methods. Choose the one that matches your hardware and situation.
Serial (USB)
The most reliable method. Connect your device via USB and specify the serial port with -s:
meshcore-cli -s /dev/ttyUSB0
The serial port must be given explicitly with -s — it is not auto-detected. Use the port that matches your system:
meshcore-cli -s /dev/ttyUSB0 # Linux/macOS
meshcore-cli -s COM3 # Windows
If you need to set a non-default baud rate, pass it with -b (for example -b 115200). MeshCore serial consoles commonly run at 115200, matching the firmware's default, but set it explicitly with -b if your connection fails.
Bluetooth (BLE)
Connect wirelessly to a nearby device. BLE is the default transport — scan for devices and pick one with -S, or target a known device directly with -a <address> or -d <name>:
meshcore-cli -S # scan and select a BLE device
meshcore-cli -a <ble-address> # connect to a known device
If the device does not appear, ensure it is powered on and not already connected to the MeshCore app. A BLE companion connection is a single GATT link, so generally only one client can connect at a time.
TCP (Wi-Fi / LAN)
Connect to a device that exposes a TCP interface (useful for remote administration of fixed nodes). Use -t for the host and -p for the port:
meshcore-cli -t 192.168.1.100 -p 5000
Replace the IP with the device's actual address. Port 5000 is the meshcore-cli TCP default.
Verifying Connection
Once connected, run infos (shortcut i) to confirm the connection and see device details:
infos
The infos output includes the node's public key, node name, TX power, location (lat/lon), and radio configuration (frequency, bandwidth, spreading factor, coding rate). Firmware version is shown by the separate ver command, and battery/telemetry by self_telemetry (shortcut t).
Full Command Reference
MeshCore has two command surfaces. The device-side serial CLI (canonical reference: docs.meshcore.io/cli_commands) uses bare get/set verbs and is used to configure repeaters and room servers over USB serial. The host tool meshcore-cli (invoked as meshcore-cli/meshcli) connects to a companion radio over BLE, TCP, or Serial; commands can be passed on the command line or entered in interactive chat mode. The tables below note which surface each command belongs to.
Device Information & Status
| Command | Purpose |
|---|---|
infos (alias i) | meshcore-cli: print node info (public key, TX power, radio params, name, location). For firmware version use ver; for battery/telemetry use self_telemetry / req_status. |
stats-radio / stats-core / stats-packets | Serial CLI: radio stats (noise floor, RSSI/SNR, airtime), core stats (battery, uptime, queue), and packet counters. There is no bare status command. |
contacts / list (alias lc) | meshcore-cli: list known contacts (nodes you have received adverts from). Use node_discover <filter> (nd) to discover nodes by type, or neighbors on a repeater's serial CLI. |
get <param> | Read a setting (e.g. get radio, get name, get tx). Run get help for the parameter list. There is no config get command. |
Configuration
| Command | Purpose |
|---|---|
set name <name> | Set the node name (no config set prefix). |
set tx <dbm> | Set LoRa transmit power in dBm (valid 1–22 for SX1262). Choose a value that keeps EIRP within your region's limit — 36 dBm EIRP in the US per FCC Part 15.247. Setting too high may violate local law. |
erase | Restore factory defaults. Serial-only and destructive. There is no config reset command. |
set lat <degrees> | Set latitude in degrees. |
set lon <degrees> | Set longitude in degrees. |
password <new_password> | Set the admin password. Any node presenting this password is added to the admin ACL. |
Messaging
| Command | Purpose |
|---|---|
msg <name> <message> (alias m) | meshcore-cli: send a direct message to a contact by name. |
public <message> or chan <nb> <message> | meshcore-cli: send to the public channel (0) or to channel number <nb>. Channel messages flood to subscribers. There is no broadcast command. |
msgs_subscribe (alias ms) | meshcore-cli: display messages as they arrive. Use recv (r) / wait_msg (wm) to read them, or chat mode. There is no listen command. |
Network & Routing
| Command | Purpose |
|---|---|
advert | Trigger immediate advertisement broadcast (flood). Use advert.zerohop for a zero-hop advert. |
set flood.advert.interval <hours> | Flood advert interval in hours (valid 3–168; default 12). |
set path.hash.mode <0|1|2> | Advert path hash size (0=1-byte, 1=2-byte, 2=3-byte; default 0). Affects only this node's own adverts, not forwarding or routing-table behaviour; requires firmware ≥ 1.14. |
region put <name> [parent] | Create a region. Names are user-defined (e.g. region put #USA) — there are no predefined US/state scopes. Flooding must be enabled separately. |
region put <child> <parent> | Create a nested region under a parent (e.g. region put #Colorado #USA). Names are user-defined, not ISO/region codes. |
region save | Save region configuration. |
Repeater & Room Server
| Command | Purpose |
|---|---|
set agc.reset.interval <seconds> | AGC reset interval in seconds (rounded down to a multiple of 4; 0 disables). Helps with receiver desensitization. |
set repeat <on|off> | Enable/disable packet repeating on a repeater or room server (default on). |
Firmware & Maintenance
| Command | Purpose |
|---|---|
reboot | Restart the device. |
start ota | Initiate an over-the-air firmware update (nRF52). Otherwise flash via the MeshCore web flasher or esptool/UF2. There is no flash command. |
Key Repeater Settings
These settings are most critical for deploying and maintaining MeshCore repeater and room server nodes.
AGC Reset Interval - Fix Receiver Deafness
set agc.reset.interval 8
Problem it solves: If a high-power transmitter (such as a nearby ham radio or commercial repeater) is within range, the LoRa receiver's automatic gain control (AGC) can be driven into a saturated state. After the nearby transmission ends, the AGC does not always recover correctly, leaving the MeshCore repeater effectively deaf to normal LoRa signals.
Symptom: The repeater was working, a nearby radio transmission occurred, and now the repeater is not hearing any nodes even though they are transmitting normally.
Fix: The value is in seconds (rounded to a multiple of 4; 0 disables the periodic reset). Setting agc.reset.interval 8 forces the AGC to reset every 8 seconds, preventing permanent desensitization.
Flood Advertisement Interval
set flood.advert.interval 47
Controls how often the repeater floods its advert (presence). The value is in hours (valid 3-168, default 12). Lower values mean neighbors discover the repeater faster after power-on, but generate more radio traffic. 47 hours is a reasonable setting for a fixed infrastructure node on a busy mesh. Small meshes can advert more frequently.
Path Hash Mode
set path.hash.mode 2
Sets the size of this repeater's own advert path-hash (it does not control message-cache granularity or forwarding):
0- 1-byte hash: default; minimal overhead, higher chance of hash collision in large networks1- 2-byte hash: more precision at slightly higher overhead2- 3-byte hash: highest precision; use in very large networks where collisions are observed. Recommended.
Packet Repeat (Room Server)
set repeat on
On room server firmware, this enables the node to also act as a packet repeater in addition to its store-and-forward function. Only enable if the room server has good placement; a poorly-placed room server acting as a repeater can cause more harm than good to routing.
TX Power
set tx 20
TX power is set with set tx <dbm>, valid range 1-22 dBm (the SX1262 maximum is 22). For unlicensed operation in the US 902-928 MHz band, the 30 dBm (1 W) conducted limit is set by FCC Part 15.247, not Part 97. (Part 97 - licensed amateur - allows up to 10 W PEP for spread spectrum under 47 CFR 97.313(j), but it requires a license, prohibits encryption, and requires station ID, so default-encrypted MeshCore cannot lawfully run under Part 97.) Antennas over 6 dBi require a dB-for-dB reduction in conducted power. More power is not always better - an overdriven signal can desensitize nearby receivers including your own.
Region Configuration
region put us
region put us-co us
region save
Region scopes control which nodes can see and communicate through this repeater. The hierarchical scheme (us › us-co) allows regional segmentation in large deployments.
Name and Location
set name MyRepeater-Site1
set lat 39.7392
set lon -104.9903
Always set a meaningful name and accurate coordinates for infrastructure nodes. This allows map tools (such as the MeshCore map at meshcore.co.uk/map.html) to display the repeater correctly and helps operators diagnose coverage gaps.