mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 01:22:25 +00:00
14 lines
390 B
Bash
Executable File
14 lines
390 B
Bash
Executable File
#!/bin/sh
|
|
# com-wr.sh tty time command parser
|
|
# example com-wr.sh /dev/ttyMSM1 1 "\x01\x1D\xFC\x01\x00" | hexdump.sh --> send "\x01\x1D\xFC\x01\x00" to /dev/ttyMSM1 and then hexdump receive data until 100ms timeout
|
|
#command example "\x7E\x03\xD0\xAF und normaler Text"
|
|
tty=$1
|
|
time=$2
|
|
command=$3
|
|
parser=$4
|
|
stty -F $tty time $time
|
|
exec 99< $tty
|
|
echo -en $command > $tty
|
|
cat $tty
|
|
exec 99<&-
|