Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles Path: utzoo!utcs!lsuc!pesnta!hplabs!hp-pcd!hp-sdd!tony From: tony@hp-sdd.UUCP (tony) Newsgroups: net.unix-wizards Subject: Re: laser printers and 8 bit serial Message-ID: <6500002@hp-sdd.UUCP> Date: Mon, 11-Feb-85 14:20:00 EST Article-I.D.: hp-sdd.6500002 Posted: Mon Feb 11 14:20:00 1985 Date-Received: Thu, 21-Feb-85 02:56:19 EST Organization: Hewlett-Packard - San Diego, CA Lines: 46 Nf-ID: #N:hp-sdd:6500002:000:1697 Nf-From: hp-sdd!tony Feb 11 11:20:00 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