HOW DO I UNBLOCK A SERIAL LINE ON SUN3?

charles at sifvx6.sinet.slb.com charles at sifvx6.sinet.slb.com
Wed Oct 25 22:53:00 AEST 1989


I have a problem on a SUN3/60 OS3.5 serial link from /dev/ttya to a plotter
which uses XON/XOFF for flow control. If someone cycles the plotter power in
mid-plot (eg to unblock the paper feed), the serial line hangs because the SUN
is waiting for XON (^Q) and the plotter is not clever enough to send XON when
power is restored. I use the following script to send files...

	(stty -even;stty -odd;stty -echo;cat $1) > /dev/ttya

where $1 is the file name. If I kill the process, it does not unblock the
serial line. If I do a 

	kill -1 1

it does not clear the buffer. Nothing works except reboot or disconnect
/dev/ttya and reconnect to a terminal and type SPACE,RETURN or ^Q, which
empties the buffer onto the screen. Any ideas on clearing the buffer from the
SUN end or improving the script would be much appreciated.



More information about the Comp.unix.questions mailing list