OSDN Git Service

am 7e612cb8: (-s ours) am f41c7e0b: Merge remote-tracking branch \'toybox/master...
[android-x86/external-toybox.git] / scripts / minicom.sh
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.