Subject: Re: HP Deskwriter
To: Louis-Philippe Lessard <yayay@mac.com>
From: John Valdes <valdes@uchicago.edu>
List: port-mac68k
Date: 11/06/2000 00:51:46
On Sun, Nov 05, 2000 at 10:54:55AM -0500, Louis-Philippe Lessard wrote:
> 
> Does anyone managed to get an original HP Deskwriter working?

Yup.  Here's what I use.  In /etc/printcap:

dw|lp|HP DeskWriter w/ GhostScript:\
	 :lp=/dev/tty01:br#57600:ms=raw,-clocal,cs8,-parenb,-echoctl,cdtrcts:\
	 :sh:mx#0:sd=/var/spool/output/dw:\
	 :lf=/var/spool/output/dw/log:af=/var/spool/output/dw/acct:\
	 :if=/usr/local/libexec/lpd/gsif:

The main things to note there are the serial port (tty01, the printer
port), the serial port settings (57600 baud, raw, 8-bit, no parity,
hardware handshaking), and the input filter ("gsif").

In the input filter, don't open the serial port yourself; let lpd do
this with the settings in /etc/printcap.  lpd will then call the filter
with the file to be printed on stdin and the serial port open on
stdout.  My gsif script is a little (overly) complicated, but
basically it boils down to:

  PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin  # and so on...
  device=djet500
  ...

    gs -q -dSAFER -dNOPAUSE -sDEVICE=$device -sOutputFile=- -

The only real difference between mine and yours is that I use device
djet500 rather than cdjmono, I output to stdout instead of piping to
the serial port, and I don't bother w/ the "setcolortransfer"
postscript snippet (I believe the code you listed sets a gamma for
color devices, which is unnecessary for the b/w DeskWriter).

John