Redirecting input and output to serial port

Redirecting input and output to serial port

Post by galor » Wed, 06 Mar 2002 06:09:53



Pl help:
With no keyboard attached to an Ultra, serial port I/O
is being redirected to ttya. I am able to view the
output by using VT100 terminal emulation software in
a PC. However, it is not accepting any input from
my PC keyboard. so i am not able to login at login prompt.
I have set the correct parameters for VT100term:
9600baud, 8N1
What are the other things to be checked here?
thanks in advance
 
 
 

Redirecting input and output to serial port

Post by TJE » Thu, 07 Mar 2002 03:27:35



> Pl help:
> With no keyboard attached to an Ultra, serial port I/O
> is being redirected to ttya. I am able to view the
> output by using VT100 terminal emulation software in
> a PC. However, it is not accepting any input from
> my PC keyboard. so i am not able to login at login prompt.
> I have set the correct parameters for VT100term:
> 9600baud, 8N1
> What are the other things to be checked here?
> thanks in advance

Get a keyboard, and run 'printenv' at the ok prompt (bootprom).  Take a
look at the 'input-device'.   Set it to your console if its set as
'keyboard'.

-tje-

 
 
 

1. Redirecting Serial port input to a file

Hi,

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
Redirection and
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
target:

1) Take standard input from a file and direct standard input back to a
file:
    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
environment?

"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?

Thanks,
John Bahr

2. KDE speed !!

3. HELP: 3-Serial Ports ("Input/output error")

4. TZ setting of Hongkong ?

5. Redirecting serial output to tcp port

6. using zip disk on sparc5 and linux

7. Trapping output/input from serial port

8. Update URL for NBD.

9. serial console - lilo serial= no serial port input

10. redirecting input to output

11. Help: redirecting process input/output

12. How to redirect input/output to local&remote display

13. Redirecting output of one device to the standard input of another