Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # web UI https://client.meshtastic.org/
- #device="/dev/ttyACM0"
- #device="/dev/ttyUSB0"
- # Set Device Port
- l="$(ls /dev/tty*|grep -e USB -e ACM|wc -l)"
- [[ $l -eq 1 ]] && device="$(ls /dev/tty*|grep -e USB -e ACM)"
- [[ $l -gt 1 ]] && device="$(ls /dev/tty*|grep -e USB -e ACM|fzf --prompt="Select a Device: ")"
- [[ $device ]] || exit
- meshtastic --port $device --set-owner metalx1
- meshtastic --port $device --set-owner-short met1
- meshtastic --port $device --set lora.region US
- meshtastic --port $device --get lora.region
- meshtastic --port $device --ch-longfast
- meshtastic --port $device --sendtext "Hey there"
- # Add Channels
- meshtastic --port $device --ch-add admin
- meshtastic --port $device --qr-all
- # add created channels to new device
- meshtastic --port $device --seturl <URL from Above Command>"
- meshtastic --port $device --set lora.region US
- #list nodes
- meshtastic --port $device --nodes
- # Enable Bluetooth
- #Because the device will reboot after each command is sent via CLI, it is recommended when setting multiple values in a config section that commands be chained together as one.
- #Example:
- meshtastic --port $device --set bluetooth.enabled true --set bluetooth.fixed_pin 111111
- 
- #Enable/Disable Bluetooth Module
- meshtastic --port $device --set bluetooth.enabled true
- meshtastic --port $device --set bluetooth.enabled false
- 
- #Set a fixed pin
- meshtastic --port $device --set bluetooth.mode FIXED_PIN
- meshtastic --port $device --set bluetooth.fixed_pin 111111
- # Send Direct message
- # node id starts with an ! and can be seen in the app
- # node id can also be seen in serial shell as "from" in Received messages (see below)
- meshtastic --sendtext 'Hellor' --dest '<node-id>'
- # Serial monitoring
- stty raw -echo < $device
- cat $device
- # monitoring incoming messages
- strings $device|grep "^Received"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement