Your call to Net::SNMP->session() should contain "-translate => 0".

The "translate" "feature" causes the data to be formated in a way which depends on the data. It's on by default, so you have to turn it off.

Who thinks these things up?

-Rick

Ryan Novosielski wrote:
I'll tell you what it was -- it's actually rather interesting. Maybe you can be of help here since you obviously have experience with coding for these printers (I haven't tried your stuff yet -- has some odd dependancies that I don't plan to satisfy :)).

'snmp_printer_status', the LPRng/ifhp tool to get printer status (surprise ;)) retrieves the status and prints it out in a PJL like format. Everything's great with that under most circumstances. HOWEVER, occaisionally the Xerox printer will return a status message with high ASCII in it. Here is an example:

OK:

STATUS= Ready to Print.

BAD:

STATUS= 0x526561647920546f205072696e742e20547261792032205061706572204973204c6f7720507265737320b6

<developer>
ARGH! ARGH! Vivian just showed me this email, and it is fixed in the next release
of ifhp snmp_printer_status. The fix is pretty simple:
s/(..)/chr hex(\1)/eg if( s/^0x// );
- put this in at the appropriate locations.
Patrick ("Hats off to Ryan for finding this") Powell
</developer>


..the second message says, if my memory serves me correctly, something like:

Ready to Print.
Tray 2 Paper Low.
For Help Press (i)

..where in this case, the (i) is ASCII 182. Net::SNMP sees that char and returns the whole thing in hex. Lovely, if you aren't trying to read it as a textual string. I don't know enough Perl to really know how to fix that. ANYWAY, that was the problem. Any kind of condition that would cause the printer to write back and include that (i) (or, while printing, a right-justify character to make it say "Tray 2" all the way at the right).

Anyways, this probably warrants some attention, as the 4500 is the replacement for the now-out-of-production 4400 (which seems to be a rather big hit on this list).

Believe me -- long and winding road to this point, heh.

----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRng MAILING LIST The address you post from or your Reply-To address MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.
To subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  call Patrick Powell or one of the friendly
staff at Astart Technologies for help.  Astart also does support for LPRng.
Also, check the Web Page at: http://www.lprng.com for any announcements.
Astart Technologies  (LPRng - Print Spooler http://www.lprng.com)
6741 Convoy Court
San Diego, CA 92111
858-874-6543 FAX 858-751-2435
-----------------------------------------------------------------------------

Reply via email to