Advertisement
howtophil

Meshtastic BBS .000000001 Proof Of Concept.sh

Feb 17th, 2024 (edited)
711
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.74 KB | None | 0 0
  1. #!/bin/bash
  2. #----------------------------------
  3. # See newer version here: https://pastebin.com/UcF6i5mi
  4. # A proof of concept to watch for
  5. # messages and respond to Meshtastic
  6. # messages over serial (USBserial).
  7. # Make sure "Debug log enabled"
  8. # is checked to on in the
  9. # Radio Configuration->Device menu
  10. # of Meshtastic
  11. # ~HowToPhil 2024/02/17
  12. #----------------------------------
  13.  
  14. while [ 1==1 ]; do
  15.         #configure the USB serial port properly
  16.         stty -F /dev/ttyUSB0 115200 -echo -icrnl raw
  17.  
  18.         #start watching for a command
  19.         COMMANDRAW=$(grep -a -m1 "@meshbbs" /dev/ttyUSB0| grep "^INFO")
  20.  
  21.         #do something with the command
  22.         echo "GOT $COMMANDRAW"
  23.         meshtastic --sendtext "$COMMANDRAW"
  24. done
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement