1
votes

I'm using Net-SNMP 5.5.0-2.x64 on Windows 10 1803. I'm trying to get SNMP values from a Ricoh printer. I've downloaded Printer-MIB and placed it in my C:\usr\share\snmp\mibs folder. I also downloaded and placed IANA-CHARSET-MIB and IANA-PRINTER-MIB. I also double checked snmp.conf to make sure they're in the right mibdirs folder.

I'm trying to access the value for black toner. I found some OIDs here, which I was trying to use for my example.

When I try to access the value for black toner:

snmpwalk -v 1 -c public -m Printer-MIB x.x.x.x 1.3.6.1.4.1.367.3.2.1.2.24.1.1.5.1

I get

SNMPv2-SMI::enterprises.367.3.2.1.2.24.1.1.5.1 = INTEGER: 80

I get the same result when I try -m ALL as well. Also if I try added Printer-MIB::printmib at the end, I get the same exact message. When I try the command:

snmptranslate -IR -Td Printer-MIB::prtMarkerSuppliesLevel.1.1

I get

Printer-MIB::prtMarkerSuppliesLevel.1.1
prtMarkerSuppliesLevel OBJECT-TYPE
  -- FROM       Printer-MIB
  SYNTAX        Integer32 (-3..2147483647)
  MAX-ACCESS    read-write
  STATUS        current
  DESCRIPTION   "The current level if this supply is a container; the remaining
        space if this supply is a receptacle.  If this supply
        container/receptacle can reliably sense this value, the value
        is reported by the printer and is read-only; otherwise, the
        value may be written (by a Remote Control Panel or a Management
        Application).  The value (-1) means other and specifically
        indicates that the sub-unit places no restrictions on this
        parameter.  The value (-2) means unknown.  A value of (-3) means
        that the printer knows that there is some supply/remaining
        space, respectively."
::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) printmib(43) prtMarkerSupplies(11) prtMarkerSuppliesTable(1) prtMarkerSuppliesEntry(1) prtMarkerSuppliesLevel(9) 1 1 }

So doesn't that mean SNMP sees the file and can parse it?

Edit:

I was able to get the MIB file to work, but the OID values are confusing me. I ran snmpwalk -v 1 -c public x.x.x.x Printer-MIB::printmib and now the values with their MIB tags print. However, when I come across the value for black ink, the OID doesn't match the one I had found online, but they return the same value.

C:\usr\bin>snmpwalk -v 1 -c public x.x.x.x Printer-MIB::prtMarkerSuppliesLevel.1.1
Printer-MIB::prtMarkerSuppliesLevel.1.1 = INTEGER: 80

and

C:\usr\bin>snmpwalk -v 1 -c public x.x.x.x 1.3.6.1.4.1.367.3.2.1.2.24.1.1.5.1 Printer-MIB::printmib
SNMPv2-SMI::enterprises.367.3.2.1.2.24.1.1.5.1 = INTEGER: 80

If I run snmptranslate, I get a completely different OID than the one I had been using before:

C:\usr\bin>snmptranslate -On  Printer-MIB::prtMarkerSuppliesLevel.1.1
.1.3.6.1.2.1.43.11.1.1.9.1.1

Not sure why the OID I found online works to retrieve the value, but not to work with the MIB file. Some sort of mix between proprietary and public MIB data?

1
Observe the OID listed in that definition. It's completely different from the one you're requesting in your snmpwalk. Why did you choose 1.3.6.1.4.1.367.3.2.1.2.24.1.1.5.1? - Lightness Races in Orbit
@LightnessRacesinOrbit Sorry, I had used that value in snmpwalk just to show that net-snmp could at least read the file. I updated it to match the data value I was trying to get. However, in doing this, I found that there was an OID mismatch between the OID I found online, and the OID I eventually found in snmpwalk. Not sure why, but I updated the original post. - Emilio Garcia
I think you need to talk to the vendor. - Lightness Races in Orbit

1 Answers

0
votes

Try the right OID

snmpwalk ... 1.3.6.1.2.1.43.5.1.1.16