MeshCore CLI Configuration
MeshCore nodes can be configured using two distinct CLI systems:systems. theThe meshcore-cli Python tool drives a Companion node (recommendedBLE/USB-Companion forfirmware) mostover users)BLE, andTCP, theor Serial. The serial terminal/ web-console CLI (low-leveldocumented access,at worksdocs.meshcore.io/cli_commands withoutadministers Python).Repeater, BothRoom operateServer, overand USBSensor serial.firmware. They are separate interfaces targeting different firmware types, not two ways of doing the same thing.
Option A: meshcore-cli (Python tool)
Installation
pipx install meshcore-cli # recommended (upstream guidance)
pip install meshcore-cli # also works
Requires Python 3.8+.10 or newer. On Windows, ensure Python and pippip/pipx are in PATH. meshcore-cli depends on the meshcore Python package; installing meshcore-cli pulls it in automatically.
Connect to your device
meshcore-cli has no connect or ports subcommand. You select the transport with flags, then chain the commands you want to run. The general form is meshcore-cli <connection flags> <command>.
# List available BLE / serial portsdevices, then exit
meshcore-cli ports-l
# Connect (auto-detectsvia portserial ifand onlyrun onea device is connected)command
meshcore-cli connect
# Connect to a specific port
meshcore-cli connect --ports COM5 infos # Windows
meshcore-cli connect --ports /dev/ttyUSB0 infos # Linux/Mac
# Connect via BLE (by name or address)
meshcore-cli -d "My Node" infos # BLE by device name
meshcore-cli -a <ble-address> infos # BLE by address
# Connect via TCP (MeshCore default TCP port is 5000)
meshcore-cli -t 192.168.1.50 -p 5000 infos
Connection flags: -s <port> serial, -a <address> BLE address, -d <name> BLE name, -S BLE scan, -t <host> -p <port> TCP. Note: some Companion builds compile in only one interface, so a BLE-only Companion is not reachable over serial.
Common commands
| Command | Description |
|---|---|
meshcore-cli | i |
meshcore-cli | v |
meshcore-cli -s COM5 contacts | List known contacts (use contact_info <name> / ci for signal/path detail). Alias: lc |
meshcore-cli -s COM5 set name "My Node"Set the node's display name via meshcore-cli's set params (see set help)
Role is fixed by the flashed firmware type (Companion / Repeater / Room Server / Sensor). There is no set role; get role only reads it. To change role, reflash the desired firmware.
There is no set preset command. Apply the USA/Canada preset in the app or at config.meshcore.io, or set the radio explicitly (see the Repeater section below).
meshcore-cli set-s role repeatermeshcore-cliCOM5 set presettx usameshcore-cli set txpower 2722Set TX power in dBm (valid range 1–22; SX1262 max is 22)
Advert behaviour is split into flood and zero-hop commands. Send a flood advert with advert; send a zero-hop advert with advert.zerohop.
meshcore-cli -s COM5 set advert-hopsflood.advert.interval flood12meshcore-cli -s COM5 set advert-advert.interval 72060meshcore-cli -s COM5 set lat 47.6062meshcore-cli --s COM5 set lon -122.3321Set node position (decimal degrees). Latitude and longitude are set with separate commands — there is no --lon flag
meshcore-cli -s COM5 rebootReboot the node
meshcore-cli factory-reset-s COM5 eraseerase, not factory-reset
Repeater-specific configuration
Repeater behaviour comes from flashing the Repeater firmware, not from a set role command. Once flashed, configure the radio and identity explicitly:
# Set asthe aradio networkparameters repeater(USA/Canada: with910.525 floodMHz, advertisementsBW meshcore-cli62.5 kHz, SF 7, CR 5)
set roleradio repeater910.525,62.5,7,5
meshcore-cli# Or set presetfrequency usaon meshcore-cliits own (MHz, not kHz)
set advert-hopsfreq flood910.525
meshcore-cli# Flood advert cadence (hours)
set advert-flood.advert.interval 72012
meshcore-cli# TX power in dBm (1-22; 22 is the SX1262 chip max)
set txpowertx 2722
meshcore-cli# Node name
set name "MY-REPEATER-NAME"NAME
# Set positionPosition so the repeater appears on network maps meshcore-cli(lat/lon set separately)
set lat 47.6062
--set lon -122.3321 --alt 150
Option B: Serial terminal/ web-console CLI (Repeater, Room Server, Sensor)
AllRepeater, MeshCoreRoom nodesServer, and Sensor firmware (and serial-enabled Companions) expose a raw serial commandconsole, interfacecommonly at 115200 baud.8N1. This works with any terminal emulator -— no Python required. BLE-only Companion builds are not reachable over serial. Confirm the exact baud from your device's flash notes. The full command set is documented at docs.meshcore.io/cli_commands.
Connecting
- Windows: PuTTY or Windows Terminal with the COM port at 115200 8N1 (general serial-terminal guidance — verify baud per device)
- Mac/Linux:
screen /dev/ttyUSB0 115200orminicom -b 115200 -D /dev/ttyUSB0
Serial CLI commands
Type commands directly in the terminal. Commands are case-sensitiveentered in lowercase and terminatedsubmitted with Enter:
| Command | Description |
|---|---|
|
infoget roleget informationfreq, get configurationtx, get radio
contactsList neighborsList directly-heard neighbour nodes
stats-core / stats-radio / stats-packetsShow node statistics (RSSI/SNR are in stats-radio)
set name My RepeaterSet node name
There is no set role command and no 0/1/2 role mapping. Role is fixed by the flashed firmware variant; get role only reads it.
set radio 910.525,62.5,7,5Set set freq 910525910.525Set frequency in set radio <freq>,<bw>,<sf>,<cr> — there are no standalone set sf / set bw / set cr commands. Bandwidth is expressed as 62.5, not 62.
set sftx 7set bw 62set cr 5set txpower 2722Set TX power in dBm (valid range 1–22). The command is set tx, not set txpower
set lat 47.6062Set latitude
set lon -122.3321Set longitude
advertSend a flood advertisement (advert.zerohop for zero-hop)
rebootReboot device
eraseErase / factory reset (destructive)
Web-based configuration interfaces
Several browser-based tools offer configuration and flashing without any local software installation:
| Tool | URL | Purpose |
|---|---|---|
| MeshCore Web Flasher | flasher.meshcore. | Flash firmware via WebSerial (Chrome/Edge). Choose the firmware variant (Companion / Repeater / Room Server / Sensor) here |
| MeshCore Web Config | config.meshcore. | Configure node settings via WebSerial (the official URL; config.meshcore.dev is not canonical) |
| MeshCore Web App (NZ) | app.meshcore.nz | Community-hosted web app for messaging and config |
Note: All web tools require Chrome or Edge (WebSerial API). Firefox is not supported. For web flasher use, see the Flashing Repeater Firmware page.
Recommended configuration for a new repeater deployment
- Flash with
repeaterRepeater firmware(using the web flasheror(thisPlatformIO)
meshcore-cli set presetrole meshcore-cli set roleradio repeater910.525,62.5,7,5
Set name (use something descriptive): meshcore-cli set name "MT-RAINIER-SOUTH"SOUTH
Set meshcore-cli set lat 46.8523 set lon -121.7603 --alt 1234
Set flood meshcore-cli set advert-hopsflood.advert.interval flood12
Set TX power appropriate for antenna + FCC meshcore-cli set txpowertx 2722. Under 47 CFR 15.247(b), the max conducted power on 902–928 MHz is 30 dBm (1 W) with antennas ≤6 dBi; for every dB of antenna gain above 6 dBi you must reduce conducted power by the same amount. For bare SX1262 boards the chip max is 22 dBm
meshcore-cliget inforadio, get tx, get role
Reboot: meshcore-cli reboot