Python API
import meshtastic
import meshtastic.serial_interface
iface = meshtastic.serial_interface.SerialInterface()
# Apply via prefs object
prefs = iface.localNode.localConfig
# Then set fields from config JSON above
iface.localNode.writeConfig("lora")
Meshtastic CLI
meshtastic --set-owner "My Node" \
--set lora.region EU_868 \
--set lora.modem-preset LONG_FAST \
--set lora.tx-power 27
JSON Import (Web UI)
Download the JSON above and import via:
meshtastic.local → Admin → Import Config
Or use the Meshtastic Python CLI with --configure config.json
Role Quick Reference
CLIENTStandard end-device, sends/receives
ROUTERDedicated mesh relay node
REPEATERRebroadcast only, no display
TRACKERPosition-focused, frequent GPS tx
SENSORTelemetry sender, minimal rx