MeshCore CLI Configuration
MeshCore nodes can be configured using two CLI systems: the meshcore-cli Python tool (recommended for most users) and the serial terminal CLI (low-level access, works without Python). Both operate over USB serial.
Option A: meshcore-cli (Python tool)
Installation
pip install meshcore-cli
Requires Python 3.8+. On Windows, ensure Python and pip are in PATH.
Connect to your device
# List available serial ports
meshcore-cli ports
# Connect (auto-detects port if only one device is connected)
meshcore-cli connect
# Connect to a specific port
meshcore-cli connect --port COM5 # Windows
meshcore-cli connect --port /dev/ttyUSB0 # Linux/Mac
Common commands
| Command | Description |
|---|---|
meshcore-cli info | Show node name, ID, firmware version, battery |
meshcore-cli contacts | List all known contacts with signal data |
meshcore-cli set name "My Node" | Set the node's display name |
meshcore-cli set role repeater | Set node role (repeater, router, client) |
meshcore-cli set preset usa | Apply USA/Canada frequency preset |
meshcore-cli set txpower 27 | Set TX power in dBm |
meshcore-cli set advert-hops flood | Set advertisement hop mode (flood or 0) |
meshcore-cli set advert-interval 720 | Set advertisement interval in minutes (720=12h) |
meshcore-cli set lat 47.6062 --lon -122.3321 | Set node position (decimal degrees) |
meshcore-cli reboot | Reboot the node |
meshcore-cli factory-reset | Wipe all configuration and contacts |
Repeater-specific configuration
# Set as a network repeater with flood advertisements
meshcore-cli set role repeater
meshcore-cli set preset usa
meshcore-cli set advert-hops flood
meshcore-cli set advert-interval 720
meshcore-cli set txpower 27
meshcore-cli set name "MY-REPEATER-NAME"
# Set position so the repeater appears on network maps
meshcore-cli set lat 47.6062 --lon -122.3321 --alt 150
Option B: Serial terminal CLI
All MeshCore nodes expose a raw serial command interface at 115200 baud. This works with any terminal emulator - no Python required.
Connecting
- Windows: PuTTY or Windows Terminal with COM port at 115200 8N1
- Mac/Linux:
screen /dev/ttyUSB0 115200orminicom -b 115200 -D /dev/ttyUSB0
Serial CLI commands
Type commands directly in the terminal. Commands are case-sensitive and terminated with Enter:
| Command | Description |
|---|---|
help | List all available commands |
info | Show device information and configuration |
contacts | List all known contacts |
set name My Repeater | Set node name |
set role 2 | Set role: 0=client, 1=router, 2=repeater |
set freq 910525 | Set frequency in kHz (e.g. 910525 = 910.525 MHz) |
set sf 7 | Set spreading factor (7-12) |
set bw 62 | Set bandwidth in kHz (62=62.5 kHz, 125, 250, 500) |
set cr 5 | Set coding rate (5=4/5, 6=4/6, 7=4/7, 8=4/8) |
set txpower 27 | Set TX power in dBm |
set lat 47.6062 | Set latitude |
set lon -122.3321 | Set longitude |
reboot | Reboot device |
Web-based configuration interfaces
Several browser-based tools offer configuration and flashing without any local software installation:
| Tool | URL | Purpose |
|---|---|---|
| MeshCore Web Flasher | meshcore.io/flasher | Flash firmware via WebSerial (Chrome/Edge) |
| MeshCore Web Config | config.meshcore.dev | Configure node settings via WebSerial |
| 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 repeater firmware (web flasher or PlatformIO)
- Apply USA/Canada preset:
meshcore-cli set preset usa - Set role:
meshcore-cli set role repeater - Set name (use something descriptive):
meshcore-cli set name "MT-RAINIER-SOUTH" - Set position:
meshcore-cli set lat 46.8523 --lon -121.7603 --alt 1234 - Set flood advertisements:
meshcore-cli set advert-hops flood - Set TX power appropriate for antenna + FCC EIRP:
meshcore-cli set txpower 27 - Verify:
meshcore-cli info - Reboot:
meshcore-cli reboot