I am trying to test serial throughput in Linux. I have two machines
connected with a null modem serial cable and have successfully tested
communication via minicom. (FWIW: Source machine is a i686 running
Redhat 7.0 and the target machine is an ARM running an embedded version
of Royal Linux)
I have read the Advanced Bash Scripting HOWTO's section on I/O
I am sending an ASCII text file (100 lines with the numbers 1 through
100 on their respective line) from the source computer like so:
cat sent.txt > /dev/ttyS0
I am attempting, from bash, to redirect the serial port data coming into
the target to a text file. I have tried all of the following on the
1) Take standard input from a file and direct standard input back to a
exec < /dev/ttyS0 > received.txt (This causes the lines in the
file to be "executed" as commands, a blank received.txt to be received,
and my session logs out.)
2) cat /dev/ttyS0 > received.txt (This causes 3 or 4 lines
to be placed in received.txt : blank, some number, some greater number
and then the file is closed and I get a prompt back.)
3) Run, from within a shell script:
exec cat /dev/ttyS0 > received.txt (This has the same effect as
case 2 above be the script exits.)
You can't, of course, just do a /dev/ttyS0 > received.txt.
I am running at a mere 9600 baud. Could I be seeing receive buffer full
overruns? Why would that cause case 2 and 3 to exit from their
"exec" seems to be what I need since without it, the command completes.
"exec" seems to cause the statement to keep redirecting the input.
I know I could write two little programs to do this but I thought since
redirection is so powerful...
This is all slightly complicated by the fact that sometime I can't break
out of a running task, and have to reboot the target, thus flushing my
RAM disk. :-(
Has anyone done this kind of thing before?
2. KDE speed !!