i'm looking for some commandline program which I can use to send and receive data to/from serial port. I would like to automate my testing process - start test script which will send file to ttyPC
, receive output
to file and then compare results.
First I tried with cat
with two processes :
# output
echo "Output"
cat /dev/ttyPC > ./out/out${fileNumber}.txt &
outputPID=$!
#input
echo "Input"
cat ./in/in${fileNumber}.txt > /dev/ttyPC
But this is not stable. Sometimes it's sending data constantly or have problem "file previously opened" or second tty opening closes first cat
.
Then I tried with minicom (script.txt is sending data) minicom -D /dev/ttyPC -b 115200 -8 -C log1.txt -S script.txt
but i cannot set parity from commandline.
Is there something better?
cu