how to do 'ptal-pml' like stuff with hplip to monitor button state

Asked by mountaindrummer

Hi,

I use the following ptal-pml command with hpoj on an older system to monitor the status of the scan button state:

ptal-pml $DEV get 1.2.2.1.38

How would I accomplish the same thing using pml.py with hplip?

Thanks!

Ryan

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
dwelch91
Solved:
Last query:
Last reply:
Revision history for this message
mountaindrummer (ryangrow) said :
#1

This is for an hp 1210 multi-function inkjet.

Revision history for this message
Best dwelch91 (dwelch91) said :
#2

You could write a little script and put it in /usr/share/hplip (and create a
link in /usr/bin) [untested!]:

#! /usr/bin/env python

from base.g import *
from base import device, pml

d = device.Device("<DEVICE URI>")
error_code, result = d.getPML(('1.1.3.3', pml.TYPE_STRING)) # Serial number
d.close()

# where <DEVICE URI> is like "hp:/...?serial=..."
# error_codes and pml types (TYPE_STRING, etc) are in pml.py.
# You must know the type to do PML/SNMP with pml.py

That should get you started... if you need more help with this, re-post to
this question.

-Don

On Dec 6, 2007 10:47 AM, mountaindrummer <
<email address hidden>> wrote:

> Question #19478 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/19478
>
> mountaindrummer gave more information on the question:
> This is for an hp 1210 multi-function inkjet.
>
> --
> You received this question notification because you are a member of HP
> Linux Imaging and Printing, which is an answer contact for HPLIP.
>

Revision history for this message
mountaindrummer (ryangrow) said :
#3

Thanks dwelch91, that solved my question.