This is an old revision of the document!
Table of Contents
Meshtastic
CLI
apt install python3-full
mkdir -p ~/.venvs python3 -m venv ~/.venvs/meshtastic
~/.venvs/meshtastic/bin/python -m pip install pytap2 ~/.venvs/meshtastic/bin/python -m pip install meshtastic
Add ~/.venvs/meshtastic/bin to $PATH
meshtastic --port /dev/ttyACM2 --set lora.region EU_868
meshtastic --port /dev/ttyACM2 --noprot
Messages
This setup sends and receives messages on the CLI on a Pi Pico attached to /dev/ttyACM2
Receive
Install
git clone https://github.com/brad28b/meshtastic-cli-receive-text cd meshtastic-cli-receive-text ~/.venvs/meshtastic/bin/python -m pip install -r requirements.txt
Prepend the following the each python script and edit the IP address and/or serial port in each script.
#! /bin/bash "exec" "`dirname $0`/python" "$0" "$@"
Copy scripts into the venv.
chmod +x *.py cp *.py ~/.venvs/meshtastic/bin
Listen
read_messages_serial.py Using serial port: /dev/ttyACM2 Initializing SerialInterface to get node info... Node info retrieved. Parsing node info... Node info parsed. Node List: {'num': '!0342a02e', 'user': {'shortName': 'Pico'}} {'num': '!014fdb61', 'user': {'shortName': 'RPi'}} Subscribed to meshtastic.receive SerialInterface setup for listening. RPi: Hello World!
Send
meshtastic --port /dev/ttyACM2 --dest \!014fdb61 --sendtext "Hi!"
Info
These are some parameters which can be used to sniff the LoRa radio with RTL-SDR.
region=EU_868, name=LongFast freqEnd: 869.4000.250000 MHz numChannels: 1 x 250.000kHz Radio frequency: 869.525024