Can't get specific OID to work with SNMP Binding

Hi,

I’m getting quite frustrated due to a specific OID which just doesn’t seem to work in OH.
I’m using this item:

String Test "Status [%s]" { snmp="<[192.168.1.14:public:.1.3.6.1.2.1.25.3.5.1.2:1000]" }

Which should retrieve a printer error state from an HP printer. If I test in “iReasoning MIB Browser”, then I get a OctetString back with the status.
Running it in OH, results in:

2018-10-17 22:52:23.265 [DEBUG] [ab.binding.snmp.internal.SnmpBinding] - SNMP: Send PDU 192.168.1.14/161 GET[requestID=0, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.2.1.25.3.5.1.1 = Null]]
2018-10-17 22:52:23.266 [DEBUG] [ab.binding.snmp.internal.SnmpBinding] - Received PDU from '192.168.1.14/161' 'RESPONSE[requestID=1744328088, errorStatus=No such name(2), errorIndex=1, VBS[1.3.6.1.2.1.25.3.5.1.1 = Null]]'

This happens with a few OID’s, others work fine. Any ideas to why this happens?

Can you run an snmpwalk on that OID to determine all values that could be associated to it? I’ve noticed that while a hardware vendor says use this, the result you may be looking for is actually further in the MIB tree due to auto generation of things.

To get a better idea check out my post - Leveraging SNMP to detect your mobile device

The Cisco OID while valid, generated a different string to query for the result I wanted/needed.

I think you’re right. I ran an SNMP walk and found the individual OID’s, which isn’t the same as in the MIB. Next challenge is that they almost return as described in the MIB… But something also differs when testing with other applications compared with OH. Just can’t figure out what.