mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
bidir_cmd_herlper.sh: Bidirectional command helper by socat. bidir_cmd_helper.py: Bidirectional command helper by python and netcat. pexpect-ping.py, pexpect-pong.py: Scripts for throwing Ping-Pong between cross-connected tios.
15 lines
332 B
Bash
Executable file
15 lines
332 B
Bash
Executable file
#!/bin/sh
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "Usage: $0 <socket-path> <bidirectional-command>"
|
|
echo "Example: $0 /tmp/tio-socket0 \"sz -b -p sample.bin\""
|
|
echo "Note: Please run \"tio -S <socket-path> <your-serial-device>\" beforehand."
|
|
exit 1
|
|
fi
|
|
|
|
SOCKET_PATH=$1
|
|
BIDIR_CMD=$2
|
|
|
|
socat EXEC:"$BIDIR_CMD" $SOCKET_PATH
|
|
|
|
exit $?
|