2 #(c) Tomas Mudrunka 2022
5 echo "Usage: $0 /dev/ttyTX [/dev/ttyRX]"
9 port_tx
="${1:-/dev/ttyUSB0}"
10 port_rx
="${2:-$port_tx}"
12 testdata
="${RANDOM}d82b2ae45432e7c80699852ab557b279c42180a379711aae85487bda0cc58602f65c0ab5af0d510d6ac1606c52f887f3332052f67c45212dbbf2730${RANDOM}"
14 echo "Running loopback test on $port_tx -> $port_rx"
16 stty
-F "$port_tx" raw
-echo
17 stty
-F "$port_rx" raw
-echo
28 [ "$line" != "$testdata" ] && {
30 echo -e "$(date +'%D %T')\t$errcnt\tError receiving data $port_tx -> $port_rx"
This page took 0.263703 seconds and 4 git commands to generate.