MESHCORE-CLI(1)

πŸ“¦ version 1.5.7, in ubuntu stonking

πŸ¦‹ 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. πŸ“‹
  • -T timeout β€” Timeout in seconds for the BLE scan (used with -S and -l). Default is 2 seconds. ⏳
  • -a address β€” Specify device address or name to connect to.
  • -d name β€” Filter MeshCore devices by name or address.
  • -P β€” Force pairing via the OS. 🀝
  • -t hostname β€” Connect via TCP/IP to the given hostname.
  • -p port β€” TCP port number. Default is 5000.
  • -s port β€” Use the given serial port.
  • -b baudrate β€” 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. πŸ’…
  • -c on|off β€” Disable most colour output when set to off.

πŸŽ€ 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_to contact β€” Enter chat mode with the named contact.
  • script filename β€” 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 sec
  • sleep secs (alias: s) β€” Sleep for the given number of seconds. 😴
  • wait_key (alias: wk) β€” Wait until the user presses Enter. ⌨️
  • apply_to filter commands (alias: at) β€” Send commands to all contacts matching filter. See BATCH OPERATIONS below. πŸ‘―

πŸ’Œ Messaging πŸ’Œ

  • msg name 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. ⏳
  • chan number message (alias: ch) β€” Send a message to number channel.
  • public message (alias: dch) β€” Send a message to the public channel (channel 0). πŸ“’
  • 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_channel n β€” Get info for a channel by number or name.
  • set_channel n name key β€” Set channel info (number, name, key). πŸ”§
  • remove_channel n β€” Remove a channel by number or name.
  • scope s β€” Set the node's flood scope.

πŸ‘‘ Management πŸ‘‘

  • advert (alias: a) β€” Send an advertisement now. πŸ“£
  • floodadv β€” Flood advertisement. 🌊
  • get param β€” Get a parameter value. Use get help for the available parameters.
  • set param value β€” Set a parameter value. Use set help for the available parameters.
  • time epoch β€” 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_discover filter (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_info contact (alias: ci) β€” Print information for the named contact.
  • contact_timeout contact value β€” Set a temporary default timeout for a contact.
  • share_contact contact (alias: sc) β€” Share a contact with others.
  • export_contact contact (alias: ec) β€” Get a contact's URI.
  • import_contact URI (alias: ic) β€” Import a contact from its URI.
  • remove_contact contact β€” Remove a contact from this node.
  • path contact β€” Display the path to a contact. πŸ›£οΈ
  • disc_path contact (alias: dp) β€” Discover a new path and display it.
  • reset_path contact (alias: rp) β€” Reset the path to a contact to flood.
  • change_path contact path (alias: cp) β€” Change the path to a contact.
  • change_flags contact flags (alias: cf) β€” Change contact flags (tel_l|tel_a|star).
  • req_telemetry contact (alias: rt) β€” Print telemetry data for the contact as JSON. πŸ“Š
  • req_mma contact (alias: rm) β€” Request min/max/average values from a sensor.
  • req_acl contact β€” Request the access control list for a sensor.
  • pending_contacts β€” Show the list of pending contacts. πŸ•
  • add_pending contact β€” 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).

  • login name password (alias: l) β€” Log into a repeater with the given password. πŸ”
  • logout name β€” Log out of a repeater.
  • cmd name 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_status name (alias: rs) β€” Request status from a node.
  • req_neighbours name (alias: rn) β€” Request the neighbour list in binary form.
  • trace path β€” 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:

  • to dest β€” Enter dest (node or channel).
  • to / or to ~ β€” 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 β€” Issue cmd on the root node.
  • /node/cmd β€” Send cmd to 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 as RX_LOG_DATA events 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 keyperm
  • time 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-cli intercepts this one and sends time epoch to 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<timestamp or u>timestamp β€” match by modification time relative to a timestamp. You can append d, h, or m for days, hours or minutes ago (e.g. u<2d).
  • t=type β€” match by type: 1 client, 2 repeater, 3 room, 4 sensor.
  • h=n / h<n / h>n β€” match by number of hops.
  • d β€” direct contacts only (equivalent to h>-1).
  • f β€” flood contacts only (equivalent to h<0 or h=-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-cli will 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