[sf-lug] network laser printer

Rick Moen rick at linuxmafia.com
Fri May 21 17:22:57 PDT 2010


Quoting Alex Kleider (a_kleider at yahoo.com):

> My mistake for not being more clear. I _did_ configure the printer to have a static IP address (10.0.0.191).

Aha.  You'll want to double-check your DHCP daemon (on your gateway
appliance, presumably) to ensure that 191 isn't within the range _it_
hands out as IP address leases.

> What surprised me is that I never had to tell CUPS what that address
> is. CUPS seemed to have figured it out by itself, presumably via one
> of the mechanisms you discuss.

Oh, I think it just attempts a connection to all valid IPs in the local
IP netmask, looking for IPP devices, or something like that.

   Device discovery; the cups-deviced helper now runs backends in
   parallel for faster discovery and streams the results of discovery as
   the backends provide them.

http://www.cups.org/documentation.php/whatsnew.html

   CUPS supports most network printers using one of three TCP/IP-based
   protocols. Printer discovery is currently accomplished using the SNMP
   protocol, however future versions of CUPS will also include support for
   multicast DNS service discovery as well.

http://www.cups.org/documentation.php/network.html

'Multicast DNS service discovery' means ZeroConf and variations on it
like Apple's Bonjour.

> > _And_, if nothing else, you should go into your workstation's CUPS
> > configuration and _determine_ how it's talking to the printer, just
> > so you know.
> 
> I will study that a bit more but I'm not sure how one can tell 'how'
> the host is 'talking' to the printer. 

So, on my local Debian system, the built-in HTTP interface to CUPS is
http://localhost:631/ .  (There are other front-ends to CUPs, but that
one's always present.)

You select "Manage Printers".  Mine shows exactly one printer object
defined within CUPs:

Description: OpsPrinter
Location: Operations
Printer Driver: HP Color LaserJet 3600 Foomatic/hpijs, hpijs 2.8.6b
Printer State: idle, accepting jobs, published.
Device URI: socket://10.15.14.188:9100


So, there you go.  That's an example of printing directly from CUPS to a
remote JetDirect-equipped HP printer.  Notice the specifier that says
TCP port 9100.

Just to recreate how that got set up, I went back to the main CUPS Web
page (http://localhost:631/), Administration, Add New Printer.  Filled
in:

Name: Test
Location: Test
Description: Test

Device for 'Test":  (Pulldown menu).  Select 'AppSocket/HP JetDirect'.
You see a list of examples:

   Examples:

    http://hostname:631/ipp/
    http://hostname:631/ipp/port1

    ipp://hostname/ipp/
    ipp://hostname/ipp/port1

    lpd://hostname/queue

    socket://hostname
    socket://hostname:9100


So, since I'd gone over and verified at the printer itself that its IP
address was 10.15.14.188, I entered:

socket://10.15.14.188:9100

The ipp: and ldp: schemes would also work, but 'socket:' is the native
method of talking to JetDirect-based print servers.  The docs say that
the http: printing method is a minor variation on IPP.

(The micro-HTTPd built into CUPS provides a lot of helpful docs pages.)






More information about the sf-lug mailing list