MESHCORE-CLI(1)
π¦ MESHCORE-CLI(1) π¦
okay bestie, listen β this is the manual for meshcore-cli, living in section 1 of the Amateur Radio manual. Its other name is meshcli, and it's literally the same thing, so don't @ me. π
β¨ NAME β¨
meshcore-cli β the CLI interface to the MeshCore companion app over BLE, TCP or Serial. π«Ά
πΈ SYNOPSIS πΈ
meshcore-cli [options] [commands...]
meshcli [options] [commands...]
π DESCRIPTION π
meshcore-cli (you can also call it meshcli, they're the same girl) connects to a MeshCore companion radio node over BLE, TCP or serial, and lets you vibe with it from your terminal through a command line interface. no cap. π
You can yeet commands in as arguments on the command line (perfect for scripting or one-shot use), or just type them in interactively when you don't pass any command at all. When you're in interactive mode (aka chat mode) you can pick a contact β another client, a repeater, a sensor or a room β and interact with it. For clients that means sending and receiving messages; for repeaters, rooms and sensors you get the remote CLI directly (tho you can still send messages to rooms using the msg command or a double-quote prefix π).
There's also a dedicated serial repeater mode, and you turn it on with -r. It connects straight to repeater hardware over UART, and it adds line editing, history, completion, clock sync and region file transfer. iconic behaviour, honestly. π
β οΈ heads up bestie: most MeshCore companion nodes are compiled with only one transport interface (BLE, serial, or TCP), so you must use the matching connection option. pick wrong and she simply will not answer. π
π OPTIONS π
-hβ Print help and exit. π-vβ Print version and exit. β-jβ JSON output mode. Also disables init file execution (so your init file gets benched for this run).-Dβ Enable debug output. π we love a diagnostic queen.-Sβ Scan for BLE/serial devices and show an interactive device selector. π¦-lβ List available BLE/serial devices and exit. π-Ttimeout β Timeout in seconds for the BLE scan (used with-Sand-l). Default is2seconds. β³-aaddress β Specify device address or name to connect to.-dname β Filter MeshCore devices by name or address.-Pβ Force pairing via the OS. π€-thostname β Connect via TCP/IP to the given hostname.-pport β TCP port number. Default is5000.-sport β Use the given serial port.-bbaudrate β Set the serial baud rate.-rβ Serial repeater mode. Connects directly to repeater firmware via UART, and adds line editing, history, completion, clock sync and region file transfer. β¨-Cβ Toggle classic mode for the prompt. π-con|offβ Disable most colour output when set tooff.
π COMMANDS π
Commands go after the options on the command line, and yes, you can chain them like a little braid. π§ Many commands have short aliases. Prefix a command with . (a dot) to force JSON output for that command, no matter what the global -j flag says β it's giving main character energy. β¨ And if you need extra help on a specific command, use ?cmd.
πΈ General πΈ
chatβ Enter interactive (chat) mode. π¬chat_tocontact β Enter chat mode with the named contact.scriptfilename β Execute commands from a file. πinfos(alias:i) β Print information about the node.self_telemetry(alias:t) β Print your own telemetry. πcard(alias:e) β Export this node's URI.ver(alias:v) β Show firmware version. βrebootβ Reboot the node. π bye bestie 4 a secsleepsecs (alias:s) β Sleep for the given number of seconds. π΄wait_key(alias:wk) β Wait until the user presses Enter. β¨οΈapply_tofilter commands (alias:at) β Send commands to all contacts matching filter. See BATCH OPERATIONS below. π―
π Messaging π
msgname message (alias:m, shorthand{) β Send a message to a node by name.wait_ack(alias:wa, shorthand}) β Wait for an acknowledgement of the last sent message. β³channumber message (alias:ch) β Send a message to number channel.publicmessage (alias:dch) β Send a message to the public channel (channel0). π’recv(alias:r) β Read the next message.wait_msg(alias:wm) β Wait for a message and read it.sync_msgs(alias:sm) β Fetch all unread messages from the node. π§Ήβ¨msgs_subscribe(alias:ms) β Display messages as they arrive (subscribe mode). πget_channelsβ Print information about all channels.get_channeln β Get info for a channel by number or name.set_channeln name key β Set channel info (number, name, key). π§remove_channeln β Remove a channel by number or name.scopes β Set the node's flood scope.
π Management π
advert(alias:a) β Send an advertisement now. π£floodadvβ Flood advertisement. πgetparam β Get a parameter value. Useget helpfor the available parameters.setparam value β Set a parameter value. Useset helpfor the available parameters.timeepoch β Set the device time to the given Unix epoch. π°οΈclockβ Get the current device time.clock sync(alias:st) β Synchronise the device clock to the host time.node_discoverfilter (alias:nd) β Discover nodes filtered by type. π
π«Ά Contacts π«Ά
contacts/list(alias:lc) β List all contacts. πreload_contacts(alias:rc) β Force a reload of all contacts.contact_infocontact (alias:ci) β Print information for the named contact.contact_timeoutcontact value β Set a temporary default timeout for a contact.share_contactcontact (alias:sc) β Share a contact with others.export_contactcontact (alias:ec) β Get a contact's URI.import_contactURI (alias:ic) β Import a contact from its URI.remove_contactcontact β Remove a contact from this node.pathcontact β Display the path to a contact. π£οΈdisc_pathcontact (alias:dp) β Discover a new path and display it.reset_pathcontact (alias:rp) β Reset the path to a contact to flood.change_pathcontact path (alias:cp) β Change the path to a contact.change_flagscontact flags (alias:cf) β Change contact flags (tel_l|tel_a|star).req_telemetrycontact (alias:rt) β Print telemetry data for the contact as JSON. πreq_mmacontact (alias:rm) β Request min/max/average values from a sensor.req_aclcontact β Request the access control list for a sensor.pending_contactsβ Show the list of pending contacts. πadd_pendingcontact β Manually add a pending contact.flush_pendingβ Flush the pending contact list. ποΈ
π₯ Repeater Commands (Client Mode) π₯
The commands below send MeshCore protocol messages to a repeater via the companion node (that's BLE/TCP/serial without -r).
loginname password (alias:l) β Log into a repeater with the given password. πlogoutname β Log out of a repeater.cmdname command (alias:c, shorthand[) β Send a raw command to a repeater (no acknowledgement β she will not confirm, she's mysterious like that π ).wmt8(shorthand]) β Wait for a message reply with a timeout.req_statusname (alias:rs) β Request status from a node.req_neighboursname (alias:rn) β Request the neighbour list in binary form.tracepath β Run a trace; path is a comma-separated list of nodes. π§
π§ INTERACTIVE MODE π§
Interactive (chat) mode just kinda happens automatically when you don't give a command. β¨ It gives you a prompt with the node name, plus command history and tab completion β so fancy.
The to command picks the recipient for everything you do next:
todest β Enter dest (node or channel).to /orto ~β Return to the root (your own node). πto ..β Switch to the previously visited node (1-deep history).to !β Switch to the node from which the last message was received. π¬
When you're inside a chat node, the default action is just send messages. Inside a repeater or room server, your input gets forwarded as commands instead. Wanna send a message to a room anyway? Prefix it with " (double-quote) or use the msg command. π¬
The / character bypasses whatever node is currently selected:
/cmdβ Issuecmdon the root node./node/cmdβ Sendcmdto the named node./dest msgβ Send msg to dest (channel or node).
π Flood Scope π
Flood scope (available from firmware v1.10.0) limits packet propagation to named regions. The moment you enter interactive mode, the scope gets reset to * (that's classic flood). Want to change it? Use the scope command, or postfix the to command with %scope. You can also slap a scope on a single command by prepending %scope β e.g. login%#Morbihan. πΊοΈ
π’ Channel Echoes π’
When you enable it with /set channel_echoes on, all channel messages get printed together with the SNR and the path taken. Sent messages show repeats from zero-hop repeaters; received messages show all path instances that reached your node. fr fr, it's giving full receipts. π
π‘ REPEATER COMMANDS π
okay bestie so here's the tea: meshcore-cli can slide into a repeater through two completely different paths. Two doors, same house, very versatile of it fr fr.
π Serial Direct Mode (-r -s port)
This one plugs the USB straight into the repeater hardware. The CLI talks to the firmware's text CLI over UART. No mesh, no radio, just vibes through a cable. πͺ’
π¦ Client Mode (to <repeater>)
Here you connect to the companion node first β BLE, TCP, or serial without -r β and then you send commands across the mesh radio using encrypted MeshCore cmd messages. Spicy, indirect, iconic. π
π«Ά Commands Available in Both Modes
ver,board,clockβ the information commands. Just asking the node "who are you, what are you running, what time is it" πstats-core,stats-radio,stats-packets,clear statsβ statistics, babes. Numbers about how it's doing. πneighbors,neighbor.remove n,discover.neighbors,advertβ network management, aka the social life of the mesh. π―log start/log stopβ turn packet logging on or off. Heads up: in client mode, log data comes back asRX_LOG_DATAevents with rich packet parsing (gorgeous). In serial mode it's just printed as raw firmware text. Same switch, different energy. β¨get param/set param valueβ get or set configuration parameters. The full param list is:name,role,radio,freq,tx,af,repeat,public.key,lat,lon,advert.interval,flood.advert.interval,flood.max,guest.password,allow.read.only,owner.info,acl,rxdelay,txdelay,direct.txdelay,bridge.enabled,bridge.delay,bridge.source,bridge.baud,bridge.secret. That's a long list, memorize at your own pace. πregion [sub-command]β region management. Sub-commands:save,home,get,put,remove,allowf,denyf. πΊοΈgps on|off,gps sync,gps setloc,gps advert none|share|prefsβ all the GPS control bestie π°οΈsensor list/sensor get/sensor setβ sensor management. π¬password pwd,powersaving on|off,setperm keypermtime epoch,reboot,eraseβ miscellaneous commands. A little grab bag, a little sampler platter. π
π§ Serial-Only Commands (-r)
These only work when you're hardwired in, bestie. Cable energy only. π
logβ dump the stored log file to the console.log eraseβ yeet the stored log file. πregion upload file(alias:region load file) β upload a regions configuration from a local file to the node.region download fileβ download the regions configuration from the node to a local file.region listβ list allowed and denied regions.tempradioβ temporary radio configuration. Temporary, like everything. π«script fileβ execute a local script file (lines get sent one by one over serial).clock syncβ sync the repeater clock to the host time. Slight drama here:meshcore-cliintercepts this one and sendstime epochto the firmware instead. π°οΈ
π Client-Mode-Only Commands
Radio-route exclusives, no cable required, so slay. π»
login pwd(alias:l) β log into the repeater. πlogoutβ log out of the repeater. bye bestie πreq_status(alias:rs),req_neighbours(alias:rn)req_regions(alias:rr),req_owner(alias:ro)req_clock,req_acl(alias:ra) β these are all binary protocol requests.trace(alias:tr),dtrace(alias:dt) β path tracing via the mesh. Following the breadcrumbs π- Contact operations:
contact_info,path,disc_path,reset_path,change_path,change_flags,share_contact,export_contact,req_telemetry,forget_password,set timeout,get timeout. clkreboot,start ota,get telemetry,get status,get aclβ special operations. π: cmdβ force-send something as a raw cmd message (e.g.:ver).send msg/"msgβ send a text message to the repeater or room. π
π― BATCH OPERATIONS
apply_to filter commands
This sends commands to all contacts matching filter. And the filter? It's a comma-separated list of conditions. Let's go through them one by one:
u<timestamporu>timestampβ match by modification time relative to a timestamp. You can appendd,h, ormfor days, hours or minutes ago (e.g.u<2d).t=typeβ match by type:1client,2repeater,3room,4sensor.h=n/h<n/h>nβ match by number of hops.dβ direct contacts only (equivalent toh>-1).fβ flood contacts only (equivalent toh<0orh=-1).
Commands should be written as in interactive mode. And when you're writing them from the command line, use commas to delimit filter fields clearly β that's how it knows where one field ends and the next begins. β¨
Chainable commands include contact_name (alias cn), reset_path (alias rp), forget_password (alias fp), and sleep. π
βοΈ CONFIGURATION
Configuration files live in $HOME/.config/meshcore. π
If that directory exists, the default BLE address and your command history get stored there. Cute little memory box.
If a file named init exists in this directory, it's executed automatically β right before any commands given on the command line, and after option parsing. Sneaky but useful.
Per-device init files named device-name.init are also supported. These are genuinely handy for setting per-contact timeouts with contact_timeout for contacts sitting behind bridges. π
π EXAMPLES
okay this is the fun part, bestie. copy these and go.
Get information from the first BLE MeshCore device found:
meshcore-cli -d "" infos
Get the current device time:
meshcli -a C2:2B:A1:D5:3E:B6 clock
Get the time as JSON:
meshcli -j -a C2:2B:A1:D5:3E:B6 clock
Chain commands: reboot, then sync and verify the clock:
meshcli -j clock "clock sync" clock | jq -c
Send a message and wait for acknowledgement:
meshcli msg Techo_fdl "Hello T-Echo" wa
Fetch all unread messages from a specific device:
meshcli -d Techo sm
Enter interactive chat mode:
meshcli chat
Remove all clients not seen in the last 2 days:
meshcli at u<2d,t=1 remove_contact
Connect to a repeater directly over serial:
meshcli -r -s /dev/ttyUSB0 clock
π FILES
$HOME/.config/meshcore/β the configuration directory. It's created manually;meshcore-cliwill use it if present. ποΈ$HOME/.config/meshcore/initβ global init script executed before command-line commands.$HOME/.config/meshcore/<device-name>.initβ per-device init script.
π SEE ALSO
bluetoothctl(1), python3-meshcore(3) π«Ά
π AUTHORS
meshcore-cli was written by the MeshCore developers. legends, honestly.
This manual page was written for the Debian project by Patrick Winnertz <winnie@debian.org>. π
aaaand that's the whole page bestie!! this was meshcore-cli version 1.5.7, dated 2026-05-02. now go forth and slay some repeaters π
β¨π¦
π¦ where this page comes from
- ubuntu stonking: meshcore-cli 1.5.7-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms