Polling USB and parallel HP printers via HP SNMP proxy agent

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
IlPini
Posts: 33
Joined: Thu Jun 05, 2008 11:52 am
Location: Rome, Italy

Polling USB and parallel HP printers via HP SNMP proxy agent

Post by IlPini »

I think I've found something useful.

I've searched the forum for references to this, but didn't find any, so I'd like to contribute.
Maybe this post should be in the Windows specific category, I'm not sure.

I was making a little research on Hewlett-Packard MIB files and I stumbled upon Web JetAdmin, an administration suite partially based on SNMP. It's free, as in "gratis".
An optional component is the HP SNMP Proxy Agent, i.e. a little Windows software that piggy-backs on the standard Windows SNMP service and provides SNMP data on the default HP printer connected to a computer via USB or parallel cable.
Maybe it works even for serial cable, infrared, bluetooth and the like, I didn't have the time to verify that. I did verify USB and parallel.

Cacti can use that, too. 8)

The data you get is more or less the same data you'd get if the same printer was directly connected via Ethernet.
Exposed SNMP data come from the Printer-MIB (.1.3.6.1.2.1.43) and private.enterprises.hp (.1.3.6.1.4.1.11) branches. I didn't notice any other additional branches.
When you poll your computer, its SNMP service responds as if it was both the computer and the printer at the same time. Your computer also appears to the poller as a JetDirect interface.

Some printers are smarter than others... you'll get significant data from the smarter models, less significant data from the dumber ones.
For example, from my own LaserJet 1200, toner level and max are both exposed as -2 (minus two), meaning "unknown". Maybe it's because it has a non-HP, chipless toner cartridge inside (can't remember if the original *has* a chip), maybe not: I have other printers at work, both older and younger, which present the same behaviour, and they all have original cartridges.

This software is slow. When you do an snmpwalk, you can see a very noticeable speed difference between computer data and printer data.
I guess it shouldn't be a problem, though, since printers usually get polled for a few OIDs only and not for whole branches.

This software is unreliable as well. Better said, it's not completely reliable.
When you do an snmpwalk, sometimes you get the private.enterprises.hp branch, sometimes you don't. If you need HP-specific data, this could be a drawback.
I didn't have the time to test this thoroughly.
Printer-MIB data seems to come out regularly.
Moreover, some computer/printer combinations seem to throw everything out of whack, and every time you poll for printer-specific data you get an SNMP error:

Code: Select all

Error in packet.
Reason: (genError) A general failure occured
Guess what?.. I didn't have time to test this. :-) But I can say it's not only the printer's fault, as I have another printer of the same model connected to another computer and it doesn't throw the genError.

This software is limited to one printer per computer only, even if the computer is connected to several printers. If I got this right, the printer the software cares for is your default printer. Documentation says this limitation will go away in the future.

Installation is a breeze. You have .exe and .msi files. The .msi especially should be useful for group policy-based installation in a Windows domain environment. I did not test this, but I did test remote installation using Sysinternals' psexec: installed flawlessly in less than half a minute, user didn't notice anything. A reboot is not necessary.

Cacti seems to have intermittent difficulties polling such a composite device using SNMP v2c, while everything seems OK using SNMP v1. I have devices polled as computers with v2c and as printers with v1... no trouble so far. I just added another device to the list and treated it as a printer, even if its IP address is a computer's.

My generic SNMP-enabled printer templates worked without a hitch. The only printers I could not graph were some dumber printers exposing worthless data (see above).
I've been keeping an eye on USB and parallel printers for a few days now, and I have no significant problems to report.
Oh, of course either your print-server computers stay awake all day, or you get gaps in your graphs. :-) I have both. You choose.

YMMV.
IlPini
Posts: 33
Joined: Thu Jun 05, 2008 11:52 am
Location: Rome, Italy

Re: Polling USB and parallel HP printers via HP SNMP proxy a

Post by IlPini »

IlPini wrote:Moreover, some computer/printer combinations seem to throw everything out of whack, and every time you poll for printer-specific data you get an SNMP error
A few days ago I've found out cause and cure for the SNMP genError. 8)

Short story: uninstall the printer from the print-server PC throwing the genError and reinstall it using the full software installation, usually coming on CD-ROM with the printer. Unfortunately, for a few models this doesn't work.

Long story follows.
The HP SNMP Proxy Agent uses the DOT4 protocol to communicate with the printer, so it expects to find a DOT4 port. If the printer was not installed using the complete software installation (e.g.: the installation setup you used included the driver only), usual communication between PC and printer happens using an LPT or USB port, a DOT4 port did not get installed and the proxy agent doesn't work. Et voila, genError.
DOT4 is a "software" port, so to speak. It implements communication protocol IEEE 1284.4 (dot four), enabling command of many functions of a device using just one hardware channel. "Under" the DOT4 port there generally is a physical USB or LPT port.
If I got this right, the protocol was born a dozen years ago to control industrial machines, while today it is mainly used for multifunction printers. If on the contrary your printer is monofunction, in theory you don't need the protocol. In practice, it appears you want it when monitoring your printer with Cacti.
A few enlightening (if not completely related) links:
HP LaserJet Products - DOT4 Port Printer Not Visible or Print Driver Is Using the Windows USB Port
HP Easy Printer Care Software - Communication Issues with Direct-Connect Printers
HP Easy Printer Care Software - Frequently Asked Questions (FAQ) (search the text for the word "DOT4"; last I checked, it was under the second question)

N.B.: I wasn't able to apply the solution to a USB-connected Color LaserJet CP1215, so the genError still happens. Apart from the dumb printers I referred to in my previous message, this one remains the only printer in my site I still can't monitor. As far as I can tell, this printer's software doesn't include a DOT4 port. If anyone knows better, feel free to chime in.
Rockstar789456123
Posts: 1
Joined: Tue Aug 06, 2013 9:13 am

Re: Polling USB and parallel HP printers via HP SNMP proxy a

Post by Rockstar789456123 »

Heey I am wrking on same thing...

r u still alivee... :lol:
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests