Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie: How do I get the MIB ...

234 views
Skip to first unread message

TI news server

unread,
Mar 2, 1999, 3:00:00 AM3/2/99
to
Hello,

Below I have the specification of a printer MIB that I got from the
manufacturer and have been trying to write a perl program to query the
printer for status (paper out, paper jam ...). However, I have been unable
to get the correct sequence of numbers to use to query the printer. Can
anyone help me out to find out what the sequence would be like?


MIB II Object - Object=sysObjectID(2) - Implement=Object ID which indicates
the product identification number,
iso(1).org(3).dod(6).internet(1).private(4).
enterprises(1)EPSON(1248).Printer
Product
Division(1).PrintServer(1).PrintServerProductID(2).Vendor#2(2).PRIFNW1(1)


Regards
Huzefa Ali
Reply to: huz...@ti.com

Andreas Schönbach

unread,
Mar 3, 1999, 3:00:00 AM3/3/99
to
When you take "get", then add ".0" for query the instance.

or

Try "getnext" and in the response you get the right OID.

Mark Wallace

unread,
Mar 3, 1999, 3:00:00 AM3/3/99
to TI news server
TI news server wrote:
> Below I have the specification of a printer MIB that I got from the
> manufacturer and have been trying to write a perl program to query the
> printer for status (paper out, paper jam ...). However, I have been unable
> to get the correct sequence of numbers to use to query the printer.

What do you mean when you say "I have been unable to get the correct sequence of numbers to use to query the printer."? Do you have the MIB file to see what status objects the printer is supposed to support?

Have you verified that you can talk SNMP to the printer yet?

> Can
> anyone help me out to find out what the sequence would be like?
>
> MIB II Object - Object=sysObjectID(2) - Implement=Object ID which indicates
> the product identification number,
> iso(1).org(3).dod(6).internet(1).private(4).
> enterprises(1)EPSON(1248).Printer
> Product
> Division(1).PrintServer(1).PrintServerProductID(2).Vendor#2(2).PRIFNW1(1)
>
> Regards
> Huzefa Ali
> Reply to: huz...@ti.com


--
Mark Wallace
Modus Operandi Inc., Indialantic, Florida, USA
mailto:mwal...@modusoperandi.com, 407/984-3370

Mark Wallace

unread,
Mar 4, 1999, 3:00:00 AM3/4/99
to Huzefa MohamedAli
> > TI news server wrote:
> > > Below I have the specification of a printer MIB that I got from the
> > > manufacturer and have been trying to write a perl program to query the
> > > printer for status (paper out, paper jam ...). However, I have been unable
> > > to get the correct sequence of numbers to use to query the printer.

You shouldn't need the printer's id (e.g. 1.3.6.1.4.1.1248.1.1.2.2.1) to get at its status. The id number, "1.3.6.1.4.1.1248.1.1.2.2.1", is how the printer will identify what kind of device it is. That is, when you query the sysObjectID.0 of the printer, it should return "1.3.6.1.4.1.1248.1.1.2.2.1".

If I were you, I'd first just query the printer to see if you can talk to it at all, by asking for its system group variables--i.e., "walk" the 1.3.6.1.2.1.1 objects. E.g., with my toolset (old MIT tools on Solaris) this looks like:


$ snmpnext -h localhost 1.3.6.1.2.1.1 | one
0 noError 0 1.3.6.1.2.1.1.1.0 OctetString "Sun SNMP Agent, SPARCstation 10"
1 noError 0 1.3.6.1.2.1.1.2.0 ObjectId 1.3.6.1.4.1.42.2.1.1
2 noError 0 1.3.6.1.2.1.1.3.0 TimeTicks "126 days, 17:50:54.66"
3 noError 0 1.3.6.1.2.1.1.4.0 OctetString "Mark Wallace, (407) 984-3370"
4 noError 0 1.3.6.1.2.1.1.5.0 OctetString "orca"
5 noError 0 1.3.6.1.2.1.1.6.0 OctetString "Mark's Room, 1st Floor, SPS, Indialantic, Fl, USA"
6 noError 0 1.3.6.1.2.1.1.7.0 Integer 72
7 noError 0 1.3.6.1.2.1.2.1.0 Integer 2
$

Notice the second line returned. "1.3.6.1.2.1.1.2.0" is the sysObjectID.0, which tells me this is a Sun SNMP agent, basically. In the case of your printer, this value would be "1.3.6.1.4.1.1248.1.1.2.2.1", the ID you specified.

Once you know you can talk to your printer, you can worry about getting the particular status info you want.

To get at actual printer status information, you need to know what objects are supported by this printer, and that's the information which should be available from the MIB your vendor gave you.

Hope this helps,
-Mark

0 new messages