1 #!/bin/bash 2 3 # If you want to use toybox netcat to talk to a serial port, use this. 4 5 if [ ! -c "$1" ] 6 then 7 echo "usage: minicom.sh /dev/ttyS0" 8 exit 1 9 fi 10 11 SPEED="$2" 12 [ -z "$SPEED" ] && SPEED=115200 13 14 stty $SPEED -F "$1" 15 stty raw -echo -ctlecho -F "$1" 16 stty raw -echo # Need to do it on stdin, too. 17 ./toybox netcat -f "$1" 18 stty cooked echo # Put stdin back. 19