Subject: Re: Some Help Debugging lpd with MacOS 9 printing.
To: Bob Nestor <rnestor@augustmail.com>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-mac68k
Date: 10/26/2001 09:55:28
OK, let me try to clarify.

At 9:11 PM -0500 10/25/01, Bob Nestor wrote:
>On 10/25/01 7:58 PM, Henry B. Hotz (hotz@jpl.nasa.gov) wrote:
>
>>I create a desktop printer under OS9 with the desktop printer
>>utility;  tell it that it's an lpr printer with queue RAW at the
>>right IP address.  I've done this with HP JetDirect interfaces and it
>>works.  I've done this with Solaris 2.5 and it doesn't because it
>>doesn't know it's a Postscript file instead of a text file, but it's
>>OK otherwise.
>>
>>In this case the Mac opens the connection, sends 6 bytes of data and
>>the NetBSD server closes the connection.  No print job log, no
>>nothing.
>
>I'm confused about what you're trying to do, probably because I have
>something working.
>
>My printer has an ethernet interface and I've given it a static IP
>address.  My NetBSD system has /etc/printcap set up to handle both text
>and postscript files and lpr spools files to the printer successfully.
>
>Under OS8x, OS9x and OSX I've used the Printer Desktop Utility to create
>a Desktop printer which accesses the printer via it's static IP address. 
>All versions of MacOS can successfully print to the printer.  I've done
>the same thing with Windows-95/98 and it also works.

In my case I have a printer connected directly to a NetBSD machine. 
I didn't want to pay the extra $200 for a network interface.  (That's 
what the NetBSD PC cost a couple of years ago.)  Since MacOS 9 is 
supposed to support the lpr protocol and NetBSD likewise it seemed 
natural to try to make them talk that way.  Why install an extra 
package (that was pretty recalcitrant under Solaris the last time I 
used it)?

What I discovered when I tried the lpr approach was that lpd hangs up 
the connection before anything happens.  How do I dump the pitiful 
little data that is exchanged -- or otherwise debug what happens? 
This failure happens so quickly that it must not be very complicated.

In fact maybe I should compile lpd with debugging on and run it from 
gdb.  I'm going to need to look at the lpr protocol sometime, I 
suspect.
-- 
The opinions expressed in this message are mine,
not those of Caltech, JPL, NASA, or the US Government.
Henry.B.Hotz@jpl.nasa.gov, or hbhotz@oxy.edu