Subject: Re: Printing from MacOS
To: Bill Studenmund <wrstuden@netbsd.org>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-macppc
Date: 10/22/2001 23:34:38
Well, thanks for the suggestions.  I guess I'm closer. . .

At 7:50 AM -0700 10/21/01, Bill Studenmund wrote:
>On Mon, 22 Oct 2001, Henry B. Hotz wrote:
>
>>  For some time MacOS Laserwriter 8 has had the ability to create
>>  "Desktop Printers" which point at an lpr print server.  This works
>>  fine with HP JetDirect print servers:  You give it the IP address and
>>  specify the "RAW" queue and you're done.
>>
>>  So I set up a RAW queue on a PC running NetBSD lpd to /dev/lpa0 and
>>  it doesn't quite work.  The Mac job sends all its data just fine, and
>>  then gives me an error at the end.  Nothing seems to happen on the
>>  PC.  The printer activity light doesn't blink (it's an HP 1200) and
>>  lpq -PRAW shows nothing afterward.
>
>I think you can turn on logging in lpd. Try that. or try tcpdump'ing the
>printer tcp port (capturing the lpr transfer).

Tried both, got the following:

22:58:08.267353 taliesin.local.721 > gate.local.printer: S 
3886329590:3886329590(0) win 32768 <mss 1460,wscale 0,nop> (DF)
22:58:08.267780 gate.local.printer > taliesin.local.721: S 
631010326:631010326(0) ack 3886329591 win 16384 <mss 1460,nop,wscale 
0>
22:58:08.269441 taliesin.local.721 > gate.local.printer: P 1:6(5) ack 
1 win 32768 (DF)
22:58:08.284408 gate.local.printer > taliesin.local.721: P 1:62(61) 
ack 6 win 17515
22:58:08.284596 gate.local.printer > taliesin.local.721: F 62:62(0) 
ack 6 win 17520
22:58:08.285103 taliesin.local.721 > gate.local.printer: . ack 63 win 
32768 (DF)
22:58:08.285613 taliesin.local.721 > gate.local.printer: F 6:6(0) ack 
63 win 0 (DF)
22:58:08.285786 gate.local.printer > taliesin.local.721: . ack 7 win 17520
22:58:12.235288 taliesin.local.721 > gate.local.printer: S 
3886834068:3886834068(0) win 32768 <mss 1460,wscale 0,nop> (DF)
22:58:14.113950 taliesin.local.721 > gate.local.printer: S 
3886834068:3886834068(0) win 32768 <mss 1460,wscale 0,nop> (DF)
22:58:14.114347 gate.local.printer > taliesin.local.721: S 
842253131:842253131(0) ack 3886834069 win 16384 <mss 1460,nop,wscale 
0>
22:58:14.116085 taliesin.local.721 > gate.local.printer: P 1:6(5) ack 
1 win 32768 (DF)
22:58:14.130674 gate.local.printer > taliesin.local.721: P 1:62(61) 
ack 6 win 17515
22:58:14.130857 gate.local.printer > taliesin.local.721: F 62:62(0) 
ack 6 win 17520
22:58:14.131407 taliesin.local.721 > gate.local.printer: . ack 63 win 
32768 (DF)
22:58:14.131898 taliesin.local.721 > gate.local.printer: F 6:6(0) ack 
63 win 0 (DF)
22:58:14.132072 gate.local.printer > taliesin.local.721: . ack 7 win 17520

There were *no* entries in the lpd log.  This records two attempts 
with the same print job (hit the "Try again" button in the error 
dialog).  It obviously dies pretty quickly, not at the end of the job 
like the MacOS display suggested.

>  > The printer seems to work fine with enscript -PRAW on the NetBSD
>>  side, but the activity light continues to blink for some time after
>>  the job is done.  There doesn't seem to be any way to lock the
>>  printer into Postscript-only mode, but I'm still looking at the
>  > documentation since I can't print it.  ;-)

There's something non-printing at the end.  Sometimes it accepts a ^D 
and sometimes a showpage.  Haven't found any consistency yet.  I 
suspect it's something spurious like a trailing blank line.  Probably 
not a problem.

The documentation says I should have the printer port in ECP mode, so 
I did, but I'm still using the lpa0 driver until I get the MacOS/LPR 
connection working.