From: Aaron Michael Cohen (acohen@world.std.com)
Date: 03/18/93


From: acohen@world.std.com (Aaron Michael Cohen)
Subject: Serial printer overrun question
Date: Thu, 18 Mar 1993 16:49:18 GMT

I need to know how linux handles I/O buffering and the serial port
control lines.

What I am doing is sending some bit mapped graphics to my serial printer
by redirecting the output of a filter to /dev/ttyS1. This usually works
pretty well at 9600 baud, but when the graphics are very 'dense' the printer
goes crazy and stops printing graphics and starts to print characters.

I've checked the code pretty closely, and I'm sure that this is due to
some characters being dropped between the serial port and the printer.
When characters get dropped in the escape sequences.. poof! Garbage!

So what I need to know is how the serial ports buffer characters, what the
maximum buffer size is (if any), and how to set up the serial ports for
DTS/CTS flow control. This is made even more complicated because the printer
is an Apple Imagewriter II with a 5 pin DIN plug, going to a PC mini type
9 pin serial port. So I'm not sure that all the control lines are brought
out properly.

Another option would be to set up the printer to use X-on X-off flow control,
once I find out how to set up the serial port. This has the disadvantage of
not working correctly when I use the printer with my Macintosh. So I'd have
to open up the printer and flip the DIP switches alot.

Any advice in setting up the serial port and printer for proper flow
control would be greatly appreciated.

Thank you in advance,

Aaron Michael Cohen
acohen@world.std.com