Python notes

Using the python CLI (command line interface) allows you to directly interact with units via serial (usb) wifi (TCP) or bluetooth (BLE).

Most reliable is of course serial, and this is the best way to configure one or many devices, as you can use the python scripts to load many settings at once.

Below are some of the commands I use frequently:

Installing meshtastic on linux, mac or other terminal:

Install meshtastic CLI:

Serial connection: e.g. "meshtastic -s" or simply "meshtastic" at the command line:

These can also be used on a meshtasticd unit like a pi with a HAT:

Meshtasticd configuration: also works with  RP2040 boards in serial mode (-s flag)

  • meshtastic --host 127.0.0.1 --set lora.region US
  • meshtastic --host 127.0.0.1 --set lora.hop_limit 7
  • meshtastic --host 127.0.0.1 --set mqtt.enabled true
  • meshtastic --host 127.0.0.1 --set security.admin_key base64:<your key here>
  • meshtastic --host 127.0.0.1 --set device.role ROUTER
  • meshtastic --host 127.0.0.1 --set store_forward.enabled true
  • meshtastic --host 127.0.0.1 --set store_forward.history_return_max 1000
  • meshtastic --host 127.0.0.1 --set store_forward.history_return_window 1000
  • meshtastic --host 127.0.0.1 --set store_forward.is_server true
  • meshtastic --host 127.0.0.1 --set store_forward.records 1000


My usual config steps with USB connection:

  1. flash via USB-C
  2. set bluetooth to none
  3. set lora to us-7-ok MQTT
  4. clone channels with set-URL via meshtastic CLI
  5. MQTT enable map, JSON



Migrated from Apple Server Wiki. Original page ID: 62H6s3W9


Revision #2
Created 2026-09-29 15:59:48 UTC by Admin
Updated 2026-09-29 16:22:43 UTC by Admin