MeshCore CLI configuration
Manage your MeshCore nodes via the official MeshCore-cli tool. Precise control for advanced users and automation.
What is the MeshCore CLI?
The MeshCore command-line interface (MeshCore-cli) is a Python-based tool enabling terminal communication with your MeshCore companion radio. The CLI supports connections via Bluetooth Low Energy (BLE), TCP/IP, or serial.
Additionally, repeaters and room servers possess their own built-in CLI accessible via USB serial or remotely. This permits direct device configuration of frequency, transmission power, name, and other settings.
This guide covers both approaches: the MeshCore-cli Python tool for companion radios, and the serial CLI for repeaters and room servers. Essential reading for system administrators, power users, and anyone interested in scripting or automation.
Why use the CLI?
Speed and efficiency
Configure nodes in seconds with a few commands, far quicker than navigating graphical interfaces.
Scriptable automation
Write bash or Python scripts to execute batch operations across multiple nodes simultaneously.
Complete control
Access all settings including advanced radio parameters and repeater configuration.
Multiple connections
Connect via Bluetooth, WiFi/TCP, or serial. Choose whichever suits your setup.
Remote management
Manage repeaters remotely via the remote admin feature from CLI or mobile app.
Interactive chat mode
The CLI includes an interactive mode with tab-completion, command history, and real-time messaging.
Installing MeshCore CLI
The MeshCore-cli tool is installed as a Python package via pip or pipx. It operates on Windows, macOS, Linux, and Raspberry Pi. Requires Python 3.10 or newer.
Step 1: verify python version
Python 3.10 or newer is required. Check your version:
python3 --version
If Python is absent, download it from python.org
Step 2: install MeshCore-cli
Install the official MeshCore CLI tool via pipx (recommended) or pip:
# Via pipx (aanbevolen)pipx install meshcore-cli# Of via pippip3 install meshcore-cliStep 3: verify installation
Confirm successful installation by opening the help:
meshcli -h
Basic CLI commands
The MeshCore-cli supports both command-line parameters and an interactive chat mode. Launch without arguments for interactive mode.
Select device (ble)
Scan and select your MeshCore device via Bluetooth. The CLI remembers your selection for subsequent sessions.
meshcli -S
Connect via tcp/ip
Connect to a MeshCore node via WiFi/network if TCP server is active.
meshcli -t 192.168.1.100
Connect via serial
Connect via USB serial port for direct communication with your node.
meshcli -s /dev/ttyUSB0
Send message
Send a text message to a specific contact or broadcast to everyone.
meshcli send "Hallo MeshCore netwerk!"
View contacts
View all known nodes in your network with their status and Signal strength.
meshcli contacts
Interactive mode
Launch without commands for interactive chat mode with tab-completion and history.
meshcli
Repeater & room server CLI
Repeaters and room servers have a built-in CLI accessible via USB serial (terminal/PuTTY) or via the T-Deck CLI. Following flashing, basic settings are configured here.
Set frequency (required)
Following flashing, frequency must be set for your region. For Britain use 869.4 MHz or 869.525 MHz.
set freq 869.4rebootName and location
Assign your repeater a recognisable name and optionally GPS coordinates for map display.
set name MijnRepeaterset lat 52.3676set lon 4.9041Configure transmission power
Adjust transmission power in dBm. Use maximum 22 dBm for the EU 868 MHz band.
set tx 22
Repeater settings
Configure repeater-specific options such as hop limits and advertisement intervals.
set flood.max 3set advert.interval 30set flood.advert.interval 3Web-Based configuration
Beyond the CLI, repeaters and room servers can also be configured via web-based tools. This is often simpler for beginners.
MeshCore flasher
Flash firmware and configure directly via browser at flasher.MeshCore.co.uk. Click "Console" after flashing for CLI access.
flasher.meshcore.co.uk →MeshCore config tool
Configure existing repeaters via config.MeshCore.dev - connect via USB and adjust settings in the browser.
config.meshcore.dev →Minimal configuration after flashing
Following MeshCore firmware flashing, these steps are minimally required:
# 1. Set frequency (required for legal operation)
set freq 869.4
# 2. Reboot to apply changes
reboot
# 3. Optional: assign your repeater a name
set name Pennines-Repeater
# 4. Optional: set location for map display
set lat 54.4609
set lon -0.7979
Frequently asked questions about CLI
What distinguishes MeshCore-cli from the serial CLI?
The MeshCore-cli (meshcli) is a Python tool communicating with your companion radio via BLE, TCP, or serial. The serial CLI is built into repeaters and room servers, accessed directly via USB/terminal. Each has distinct commands and use cases.
How do I connect via Bluetooth?
On Linux, first pair your device via bluetoothctl. Then use meshcli -S to select your device. The CLI remembers your choice in ~/.config/MeshCore.
Can I configure repeaters remotely?
Yes! Via the Remote Admin feature you can manage repeaters and room servers over LoRa. This works from MeshCore-cli with repeater commands, or via the mobile app with Remote Management.
Which frequency should I use in Britain?
Use frequencies in the 868 MHz band. Common choices are 869.4 MHz or 869.525 MHz. Never use 915 MHz as that is only permitted in North America and contravenes Ofcom regulations in Britain.
How do I reset my repeater to factory settings?
Via the serial CLI you can use erase to wipe the file system. This removes all settings. You will need to configure frequency again afterwards.
Where can I find all available commands?
For MeshCore-cli: meshcli -h displays all options. For the repeater/room server CLI: help in the serial console. The complete reference is available on the MeshCore GitHub wiki.
Master the command-line
With the MeshCore CLI you gain professional control over your mesh network. Ideal for repeater management, scripting, and advanced configuration.