SNMP printer discovery documentation?

John A. Murdie john at cs.york.ac.uk
Fri Jul 28 02:59:52 PDT 2006


> John A. Murdie <john at cs.york.ac.uk> wrote (Thursday 27 July 2006 17:54):
>
> > What baffled me was that the printer I am sure that I have never
> > added to my CUPS 1.2.2 printers.conf (which was copied from what
> > I'd set up for an experimental installation of CUPS 1.1.23 -
> > definitely not there in the original) didn't come up listed after
> > the style of the first example from your posting of 10:46 on
> > Wednesday, but in the manner of the second example.
>
> I can't find if you have already posted what that printer does
> reveal about itself to the snmp backend when run manually. Can
> you repost it, please?

I'd not previously posted it. The printer is an HP Color LaserJet 4500, IP address 144.32.40.59 - here is the paydirt of:

CUPS_DEBUG_LEVEL=2 backend/snmp 2>&1 | fgrep 144.32.40.59


network ipp://144.32.40.59:631/ipp "HP Color LaserJet 4500" "HP Color LaserJet 4500 144.32.40.59" "MANUFACTURER:Hewlett-Packard;COMMAND SET:PJL,PCL,PCLXL,POSTSCRIPT;MODEL:HP Color LaserJet 4500;CLASS:PRINTER;DESCRIPTION:Hewlet"

> Oh, BTW, you can also run snmp with a single argument: the
> printer's IP address or hostname to just probe that one printer
> (I think it is an undocumented feature of the snmp backend --
> found it by accident):
>
>    /usr/lib/cups/backend/snmp 192.168.1.102

INFO: Using default SNMP Community public
network ipp://144.32.40.59:631/ipp "HP Color LaserJet 4500" "HP Color LaserJet 4500 144.32.40.59" "MANUFACTURER:Hewlett-Packard;COMMAND SET:PJL,PCL,PCLXL,POSTSCRIPT;MODEL:HP Color LaserJet 4500;CLASS:PRINTER;DESCRIPTION:Hewlet"
# CUPS_DEBUG_LEVEL=2  ./snmp.orig 144.32.40.59
INFO: Using default SNMP Community public
DEBUG: Scanning for devices in "public" via "144.32.40.59"...
DEBUG: 0.003 Sending 46 bytes to 144.32.40.59...
DEBUG: SEQUENCE 44 bytes
DEBUG:     INTEGER 1 bytes 0
DEBUG:     OCTET STRING 6 bytes "public"
DEBUG:     Get-Request-PDU 31 bytes
DEBUG:         INTEGER 4 bytes 1154080673
DEBUG:         INTEGER 1 bytes 0
DEBUG:         INTEGER 1 bytes 0
DEBUG:         SEQUENCE 17 bytes
DEBUG:             SEQUENCE 15 bytes
DEBUG:                 OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
DEBUG:                 NULL VALUE 0 bytes
DEBUG: 0.020 Received 55 bytes from 144.32.40.59...
DEBUG: community="public"
DEBUG: request-id=1154080673
DEBUG: error-status=0
DEBUG: SEQUENCE 53 bytes
DEBUG:     INTEGER 1 bytes 0
DEBUG:     OCTET STRING 6 bytes "public"
DEBUG:     Get-Response-PDU 40 bytes
DEBUG:         INTEGER 4 bytes 1154080673
DEBUG:         INTEGER 1 bytes 0
DEBUG:         INTEGER 1 bytes 0
DEBUG:         SEQUENCE 26 bytes
DEBUG:             SEQUENCE 24 bytes
DEBUG:                 OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
DEBUG:                 OID 9 bytes .1.3.6.1.2.1.25.3.1.5
DEBUG: add_cache(addr=ffbeeb98, addrname="144.32.40.59", uri="(null)", id="(null)", make_and_model="(null)")
DEBUG: 0.024 Sending 46 bytes to 144.32.40.59...
DEBUG: SEQUENCE 44 bytes
DEBUG:     INTEGER 1 bytes 0
DEBUG:     OCTET STRING 6 bytes "public"
DEBUG:     Get-Request-PDU 31 bytes
DEBUG:         INTEGER 4 bytes 1154080674
DEBUG:         INTEGER 1 bytes 0
DEBUG:         INTEGER 1 bytes 0
DEBUG:         SEQUENCE 17 bytes
DEBUG:             SEQUENCE 15 bytes
DEBUG:                 OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
DEBUG:                 NULL VALUE 0 bytes
DEBUG: 0.039 Received 68 bytes from 144.32.40.59...
DEBUG: community="public"
DEBUG: request-id=1154080674
DEBUG: error-status=0
DEBUG: SEQUENCE 66 bytes
DEBUG:     INTEGER 1 bytes 0
DEBUG:     OCTET STRING 6 bytes "public"
DEBUG:     Get-Response-PDU 53 bytes
DEBUG:         INTEGER 4 bytes 1154080674
DEBUG:         INTEGER 1 bytes 0
DEBUG:         INTEGER 1 bytes 0
DEBUG:         SEQUENCE 39 bytes
DEBUG:             SEQUENCE 37 bytes
DEBUG:                 OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
DEBUG:                 OCTET STRING 22 bytes "HP Color LaserJet 4500"
DEBUG: 1.057 Probing 144.32.40.59...
DEBUG: 144.32.40.59 supports IPP!
DEBUG: Trying ipp://144.32.40.59:631/ipp (num_uris=0)
DEBUG: ipp://144.32.40.59:631/ipp successful-ok (successful-ok)
DEBUG: printer-info="MANUFACTURER:Hewlett-Packard;COMMAND SET:PJL,PCL,PCLXL,POSTSCRIPT;MODEL:HP Color LaserJet 4500;CLASS:PRINTER;DESCRIPTION:Hewlet"
DEBUG: printer-make-and-model="(null)"
DEBUG: Trying ipp://144.32.40.59:631/ipp/port2 (num_uris=1)
DEBUG: ipp://144.32.40.59:631/ipp/port2 client-error-not-found (client-error-not-found)
DEBUG: 1.163 Scan complete!
network ipp://144.32.40.59:631/ipp "HP Color LaserJet 4500" "HP Color LaserJet 4500 144.32.40.59" "MANUFACTURER:Hewlett-Packard;COMMAND SET:PJL,PCL,PCLXL,POSTSCRIPT;MODEL:HP Color LaserJet 4500;CLASS:PRINTER;DESCRIPTION:Hewlet"

                                                     :-)
>
> Cheers,
> Kurt

Mike (in STR #1835) has sent me a modified, instrumented, backend/snmp. I've run this, and it finds 20 'new' printers (the first time I've seen the "Add this printer" list of the web admin interface except in your screenshot!), almost all of which are already added to printers.conf.

John A. Murdie





More information about the cups mailing list