Subject: Measured progress on the laserwriter front
To: port-mac68k mailing list <port-mac68k@netbsd.org>
From: Steve Revilak <revilak@umbsky.cc.umb.edu>
List: port-mac68k
Date: 01/07/1999 00:30:59
Digging up the discussions from a few days ago pertaining to /etc/printcap
and laserwriters.

Mine is a LW IIf.  Besides the localtalk port, it's got a DB-25 rs-232 post
as well.  Through a selector switch on the units back, one can set
configurations.  Settings 0-5 are pre set, 6-9 are user-definable through
the apple laserwriter utility.  Although the switch changes settings for
both ports, the two ports don't necessarily have the same settings.

For example, setting #1 makes the 8-pin port localtalk, while the RS-232
port is 9600 baud, 8N1, DTR, HP PCL4 Emulation.

I made a swing by MicroCenter to look for a mini-din-8 to DB-25 cable (not
a modem cable).  What I found was an ImageWriter I printer cable.  It did
the trick, to an extent.

To start simply, I set the serial port in PCL mode and tried the following:

	ls > /dev/tty01

And pages came out.  Even better, they had the right stuff on them!  (aside
from a control character or two).

However, when trying to print with lp, what comes out are control
characters,
junk

          and
              a
                few
                      lines of
                                 laddering.

This is where I'm guessing the input filter makes the difference.  The only
reference to an input filter in the default printcap is

	/usr/libexec/lpr/lpf

Which I couldn't find any docs for.  Setting 'if' or 'of' to point to this
file gives a flashing activity light (for up to 15 minutes!), but no output.

Enscript with the printer set to PostScript mode (cycled power after
changing settings) just gives a minute or so of the busy light.

Unfortunately, the filters themselves seem to be somewhat of a mystery
topic.  The "Red Book" (Unix Sysadmin's Handbook) doesn't say much about
them, other that it's software that usually comes from the printer
manufacturer.

Here's the printcap ('if' entry has been snipped) --

lw2|laserwriter-IIf|Apple LaserWriter IIf:\
	:lp=/dev/tty01:sd=/var/spool/output/lw2/:lf=/var/log/lpd-errs:\
	:br#9600:rw:fc#0000374:fs#0000003:xc#0:xs#0040040:\
	:mx#0:


Of those who have a postscript printer (or any printer for that matter)..
suggestions on where to look for filters?  What are you using?  Is this a
function that GhostScript can perform?

When I finally get this working, I intend to write a how to.......

Thanks in advance.