#!/bin/bash #---------------------------------- # See newer version here: https://pastebin.com/UcF6i5mi # A proof of concept to watch for # messages and respond to Meshtastic # messages over serial (USBserial). # Make sure "Debug log enabled" # is checked to on in the # Radio Configuration->Device menu # of Meshtastic # ~HowToPhil 2024/02/17 #---------------------------------- while [ 1==1 ]; do #configure the USB serial port properly stty -F /dev/ttyUSB0 115200 -echo -icrnl raw #start watching for a command COMMANDRAW=$(grep -a -m1 "@meshbbs" /dev/ttyUSB0| grep "^INFO") #do something with the command echo "GOT $COMMANDRAW" meshtastic --sendtext "$COMMANDRAW" done