Note: please don't spam any of the e-mail addresses which you see here. Follow this link if you want some addresses to misuse.
From: Damian Ivereigh <damian@cisco.com>
Date: Tue, 06 Feb 2001 14:24:00 +1100
Subject: Re: PPR: SNMP support in tcpip interface
If your printer is an HP you can get a fair amount of info from this
OID in HP's private MIB:-
.1.3.6.1.2.1.25.3.5.1.1.1
Which is nice because it is just a string.
The more official place to get it from is from the Printer MIB (most
printers support this these days) then it is a bit trickier.
The place to get them from is
.1.3.6.1.2.1.25.3.5.1.1.1
and
.1.3.6.1.2.1.25.3.5.1.2.1
However they need some decoding....
Here is the extract from the Printer-MIB
> hrPrinterEntry OBJECT-TYPE
> SYNTAX HrPrinterEntry
> MAX-ACCESS not-accessible
> STATUS current
> DESCRIPTION
> "A (conceptual) entry for one printer local to the
> host. The hrDeviceIndex in the index represents the
> entry in the hrDeviceTable that corresponds to the
> hrPrinterEntry.
>
> As an example of how objects in this table are named,
> an instance of the hrPrinterStatus object might be
> named hrPrinterStatus.3"
> INDEX { hrDeviceIndex }
> ::= { hrPrinterTable 1 }
>
> HrPrinterEntry ::= SEQUENCE {
> hrPrinterStatus INTEGER,
> hrPrinterDetectedErrorState OCTET STRING
> }
>
> hrPrinterStatus OBJECT-TYPE
> SYNTAX INTEGER {
> other(1),
> unknown(2),
> idle(3),
> printing(4),
> warmup(5)
> }
> MAX-ACCESS read-only
> STATUS current
> DESCRIPTION
> "The current status of this printer device."
> ::= { hrPrinterEntry 1 }
>
> hrPrinterDetectedErrorState OBJECT-TYPE
> SYNTAX OCTET STRING
> MAX-ACCESS read-only
> STATUS current
> DESCRIPTION
> "This object represents any error conditions detected
> by the printer. The error conditions are encoded as
> bits in an octet string, with the following
> definitions:
>
> Condition Bit #
>
> lowPaper 0
> noPaper 1
> lowToner 2
> noToner 3
> doorOpen 4
> jammed 5
> offline 6
> serviceRequested 7
> inputTrayMissing 8
> outputTrayMissing 9
> markerSupplyMissing 10
> outputNearFull 11
> outputFull 12
> inputTrayEmpty 13
> overduePreventMaint 14
>
> Bits are numbered starting with the most significant
> bit of the first byte being bit 0, the least
> significant bit of the first byte being bit 7, the
> most significant bit of the second byte being bit 8,
> and so on. A one bit encodes that the condition was
> detected, while a zero bit encodes that the condition
> was not detected.
>
> This object is useful for alerting an operator to
> specific warning or error conditions that may occur,
> especially those requiring human intervention."
> ::= { hrPrinterEntry 2 }
I believe you can get the entire MIB from the Printer Working Group at
http://www.pwg.org
I hope this helps.
Damia
David Chappell wrote:
>
> For the next minor release of PPR, I have added code to the tcpip
> interface program so that if the connection is refused it makes an SNMP
> query and then prints an appropriate "%%[ status: xxx ]%%" message.
> What I am having trouble figuring out, is what SNMP keys should be be
> examining to detect conditions such as a paper jam. Note that retriving
> the display message is not a correct solution since it breaks if the
> user changes the display language.
>
> If anyone has experience with this, please refer me to helpful documents
> or describe SNMP keys that work and what printers they work on.
- --
Damian Ivereigh
CEPS Team Lead
http://wwwin-print.cisco.com
Desk: +61 2 8446 6344
Mob: +61 418 217 582