laser printers and 8 bit serial

tony tony at hp-sdd.UUCP
Tue Feb 12 05:20:00 AEST 1985


> > > Does anyone know how to make a 4.2 terminal driver send out 8 data bits
> > > and honor x-on/x-off from the device.
> > 
> > Yes, use the "litout" stty mode.
> 
> I tried LLITOUT, it sends 7 bits with even parity on my SUN.
> More importantly, what complete set of flag bits and local mode
> bits did you use?
> Rather than have a reasonable stty (Like System V) where bits in the
> flags essentially control options independent of each other, 4.2 BSD
> gives you a hodgepodge of bits which interact.

It seems that there is a 4.2 bug which doesn't allow LLITOUT to be
set properly in /etc/printcap.  In fact, it you 'stty litout' to
your shell, it changes some things, but you must do it again to get
the full effect.  The same holds in the reverse direction.

I decided that neither RAW or LITOUT were appropriate, because I needed
CRMOD and XTABS to be on also, so I made my own mod to the terminal
driver.  Where it says something like:

if (ttyflags & (RAW | LITOUT))
     flag = BIT8;
  else
     flag = BIT7 | EVEN;

I changed it to include VTDELAY since I didn't notice an unused bit,
and there are no printers hooked up that need VTDELAY, and the
laser printer we use (HP LaserJet) does take a moment do formfeed,
AND, I get CRMOD and XTABS, AND XON/XOFF flow control, etc.  
It now looks more like:

if (ttyflags & (RAW | LITOUT | VTDELAY))
     flag = BIT8;
  else
     flag = BIT7 | EVEN;

This is not syntactically accurate, but it is the same general idea.
And my /etc/printcap entry is:

lpaf|Laser printer:\
	:lp=/dev/tty14:sd=/usr/spool/lpaf:lf=/usr/adm/lpaf-errs:\
        :fc#010:fs#046320:br#9600:pl#60:

Tony Parkhurst {hplabs,sdcsvax,hp-pcd,hpisla,hpfcla}!hp-sdd!tony



More information about the Comp.unix.wizards mailing list