printer connections on Suns

George D M Ross mcvax!lfcs.ed.ac.uk!gdmr at uunet.uu.net
Fri Jan 27 14:08:52 AEST 1989


xilinx!sol!kevin at uunet.uu.net (Kevin Kelleher) writes:
>I have been having similar with problems with my printer dropping pieces
>of files on an HP Laserjet printer to my Sun 3/280 under OS 4.0.1.  After
>some experimentation I have decided it is probably a tty driver problem.

We came to much the same conclusion when we upgraded to 4.0 -- printers
and plotters would lose the end of files sent to them.  After some
experimentation with cat and dumb terminals we decided that XON/XOFF was
being zapped when the final close of the device was done.  To test it,
hang a terminal on a serial port and cat a largish file to it.  Observe
that flow control works while the cat is executing but not for the tail of
the file which is still in the output buffer after the cat terminates.  If
you then try again, but this time cat from the terminal as well as to it
you will find that flow control works all the way through.  We "solved"
the problem by having our output filters wait around a while (device
dependent) after the last of the output has gone before closing the output
device.  There may be some option settings which we missed which would fix
this -- we didn't try too hard as we had a filter which did more-or-less
the right job.  An alternative for dumb printers might be to cat the
device to /dev/null in your rc file (we didn't bother trying this, but
based on our tests it seems plausible).  When we come to installing our
laser printers we'll probably have to write some trivial program which
simply opens the device and then sleeps forever, as the two suggestions
above either won't be feasible or won't work.

George D M Ross					..!mcvax!ukc!ecsvax!gdmr
Department of Computer Science			gdmr at ecsvax.ed.ac.uk
Edinburgh University				+44 31 667-1081 x2730



More information about the Comp.sys.sun mailing list