Subject: Re: printcap flag entries
To: Brook Milligan <brook@trillium.nmsu.edu>
From: Christoph Kukulies <kuku@gilberto.physik.rwth-aachen.de>
List: netbsd-help
Date: 01/19/1996 09:48:52
> 
> I am still having problems getting lpd on a 1.1/i386 box to properly
> drive a QMS-410 laser printer through the serial port (this worked
> perfectly under 1.0).  The printer is set up to interpret postscript
> files and the serial port on the printer is set for 9600 bps, no
> parity, 8 data bits, 1 stop bit, xon/xoff flow control.  It seems to
> respond just fine to communications via kermit, but not to lpd.
> 
> My printcap entry is:
> 
> qms-410|QMS PS-410 laser printer:\
>         :br#9600:\
>         :fc#030:fs#0303:\
>         :lf=/var/log/lpd-errs:\
>         :lp=/dev/printer-ps:\
>         :rw:\
>         :sd=/var/spool/output/lpd/qms-410:\
>         :sh:\
>         :xc#0:xs#010010000000:
> 
> To me the obvious place to check is the setup of the serial port on
> the host.  As understand it, the fc/fs and xc/xs flags are used to set
> the flags in the four termios registers c_iflag, c_oflag, c_cflag, and
> c_lflag.  I even understand that /usr/include/sys/ioctl_compat.h
> defines the various bits that go into making up the flag values.

I'm fighting presently with the same problem, only I have a 
DEC LN03r ScriptPrinter (PS). It used to work fine at a
DS3100 but now I'm trying it to run from my FreeBSD box
and I'm only halfway through.

I have configured it with /etc/printcap the following way and it works
such that it can print a page or any Postscript file
through the lpr command. But I don't have the smart filters that
Dec has (ln03rof). Thus it happens that the download led (6)
stays active until I send the printer a ^D (manually at present).

Anyway, this is another problem but if someone reads it here and has an 
answer I'd be grateful.
Since FreeBSD and NetBSD aren't that different (don't know for
sure if /usr/include/sys/termios is the same WRT flags) I post my working
/etc/printcap now here:

#       @(#)printcap    5.3 (Berkeley) 6/30/90
lp0|lp|local laser printer:\
        :lp=/dev/cuaa2:\
        :fc#0xffffffff:fs#0x8600:br#38400:\
        :if=/usr/local/bin/lpif:\
        :of=/usr/local/bin/lpof:\
        :mx#0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:

lpif and lpof are yet to write filters.

> 
> One thing I don't understand is how the values of fc/fs and xc/xs are
> translated to values of the termios flags.  For example, if I identify
> some function in ioctl_compat.h that I wish to try, how do I know
> whether to clear/set the bit using fc/fs or xc/xs?
> 
> Finally, is anyone else using the 1.1 lpd to drive a serial printer?
> I don't suspect my printer is particularly unusual, I'd like to see
> printcap entries that work for printers using a similar serial
> communication protocol.
> 
> By the way, this is with the patched 1.1 kernel.
> 
> Any help welcome.
> 
> Cheers,
> Brook
> 

--Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de