Skip to main content

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

CommandDescription
meshcore-cli infoShow node name, ID, firmware version, battery
meshcore-cli contactsList all known contacts with signal data
meshcore-cli set name "My Node"Set the node's display name
meshcore-cli set role repeaterSet node role (repeater, router, client)
meshcore-cli set preset usaApply USA/Canada frequency preset
meshcore-cli set txpower 27Set TX power in dBm
meshcore-cli set advert-hops floodSet advertisement hop mode (flood or 0)
meshcore-cli set advert-interval 720Set advertisement interval in minutes (720=12h)
meshcore-cli set lat 47.6062 --lon -122.3321Set node position (decimal degrees)
meshcore-cli rebootReboot the node
meshcore-cli factory-resetWipe 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 115200 or minicom -b 115200 -D /dev/ttyUSB0

Serial CLI commands

Type commands directly in the terminal. Commands are case-sensitive and terminated with Enter:

CommandDescription
helpList all available commands
infoShow device information and configuration
contactsList all known contacts
set name My RepeaterSet node name
set role 2Set role: 0=client, 1=router, 2=repeater
set freq 910525Set frequency in kHz (e.g. 910525 = 910.525 MHz)
set sf 7Set spreading factor (7-12)
set bw 62Set bandwidth in kHz (62=62.5 kHz, 125, 250, 500)
set cr 5Set coding rate (5=4/5, 6=4/6, 7=4/7, 8=4/8)
set txpower 27Set TX power in dBm
set lat 47.6062Set latitude
set lon -122.3321Set longitude
rebootReboot device

Web-based configuration interfaces

Several browser-based tools offer configuration and flashing without any local software installation:

ToolURLPurpose
MeshCore Web Flashermeshcore.io/flasherFlash firmware via WebSerial (Chrome/Edge)
MeshCore Web Configconfig.meshcore.devConfigure node settings via WebSerial
MeshCore Web App (NZ)app.meshcore.nzCommunity-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.

  1. Flash with repeater firmware (web flasher or PlatformIO)
  2. Apply USA/Canada preset: meshcore-cli set preset usa
  3. Set role: meshcore-cli set role repeater
  4. Set name (use something descriptive): meshcore-cli set name "MT-RAINIER-SOUTH"
  5. Set position: meshcore-cli set lat 46.8523 --lon -121.7603 --alt 1234
  6. Set flood advertisements: meshcore-cli set advert-hops flood
  7. Set TX power appropriate for antenna + FCC EIRP: meshcore-cli set txpower 27
  8. Verify: meshcore-cli info
  9. Reboot: meshcore-cli reboot