I’m trying to read into openHAB for Raspberry Pi the number of printed pages of my printer using the SNMP binding with no success.
I’ve found the right OID by using snmpwalk, but when I replace into the item definition the same OID nothing happens. The strange thing is that if I try to read other OIDs, they are read correctly. TCPDUMP displays noSuchName when no data is read. I attach in the following more detailed informations.
Do you have some suggestions on how I can try to debug this issue?
Thank you
LionHe
Working example
- Command line
snmpwalk -v 1 -c public 192.168.27.7 1.3.6.1.2.1.1.1.0
iso.3.6.1.2.1.1.1.0 = STRING: "HP ETHERNET MULTI-ENVIRONMENT"
- OpenHAB item
Number HP5520_Prints "Printed Pages [%s]" {snmp="<[192.168.27.7:public:.1.3.6.1.2.1.1.1.0:10000]"}
- tcpdump output
sudo tcpdump -v port 1234
tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:21:23.489154 IP (tos 0x0, ttl 64, id 34001, offset 0, flags [DF], proto UDP (17), length 71)
raspberrypiWLAN.fritz.box.1234 > Stampante.fritz.box.snmp: { SNMPv1 { GetRequest(28) R=966145838 system.sysDescr.0 } }
23:21:23.497885 IP (tos 0x0, ttl 64, id 6219, offset 0, flags [none], proto UDP (17), length 100)
Stampante.fritz.box.snmp > raspberrypiWLAN.fritz.box.1234: { SNMPv1 { GetResponse(57) R=966145838 system.sysDescr.0="HP ETHERNET MULTI-ENVIRONMENT" } }
Non Working example (in OpenHAB not in the command line)
- Command line
snmpwalk -v 1 -c public 192.168.27.7 1.3.6.1.2.1.43.10.2.1.4
iso.3.6.1.2.1.43.10.2.1.4.0.1 = Counter32: 2582
- OpenHAB item
Number HP5520_Prints "Printed Pages [%s]" {snmp="<[192.168.27.7:public:.1.3.6.1.2.1.43.10.2.1.4:10000]"}
- tcpdump
sudo tcpdump -v port 1234
tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:24:53.622299 IP (tos 0x0, ttl 64, id 45386, offset 0, flags [DF], proto UDP (17), length 75)
raspberrypiWLAN.fritz.box.1234 > Stampante.fritz.box.snmp: { SNMPv1 { GetRequest(32) R=966145879 43.10.2.1.4.0.1 } }
23:24:53.629965 IP (tos 0x0, ttl 64, id 6239, offset 0, flags [none], proto UDP (17), length 75)
Stampante.fritz.box.snmp > raspberrypiWLAN.fritz.box.1234: { SNMPv1 { GetResponse(32) R=966145879 noSuchName@1 43.10.2.1.4.0.1= } }