Epson printers on the Sun

Guy Harris auspex!guy at uunet.uu.net
Wed Jan 4 04:21:56 AEST 1989


 >The downside is that we cannot now use 8-bit (RAW mode) communications
 >which makes  graphics a bit  trickier.   One day,  I'll  get round  to
 >writing  a  filter which sets the  interface  in RAW mode  and handles
 >XON/XOFF coming from the printer, but never meddles with any character
 >going out.  Why can't the UNIX tty driver provide such an environment?
 >Surely it must be useful in other circumstances.

It is useful.  In fact, it's so useful that Berkeley implemented it
somewhere between 4.1BSD and 4.2BSD (and, in 4.3BSD, got rid of the bug
that required you to do an extra "ioctl").  It's supported in all SunOS
releases that I know of (*sans* the bug in question).

See the LITOUT mode in TTY(4) (releases up to but not including 4.0), or
either the LITOUT mode in TTCOMPAT(4M) or a variety of modes in TERMIO(4)
(4.0 and later).

LITOUT gives you a full 8-bit output data path, and performs no processing
on output whatsoever (no tab expansion, no NL->CR/LF mapping, no nothing).
It does not, however, turn XON/XOFF processing off.  It's one of the
"local mode bits", so it should be set with the "xc" capability in
"/etc/printcap" (see PRINTCAP(5)).

In 4.0, the "mc" capability in "/etc/printcap" permits you to set the
modes without having to look up (or, haha, remember) what the octal values
for the various bits are; you can give an "stty"-like specification for
the modes.  If you set "cs8" and clear "parenb", you will get 8 bits and
no parity bit on output; if you set "ixon", you will get XON/XOFF flow
control.  You will, unless you turn "opost" off, get output processing
performed (tab expansion, etc.).  Or, if you just want LITOUT, say
"litout" and be done with it. 



More information about the Comp.sys.sun mailing list