Comments (3)
You are using SNMP v2c protocol, it does not indicate nonexistent OIDs with errorStatus
. Instead it uses special sentinel value in oid-value pairs (pysnmp prints out that value as an error message). That hopefully explains why errorStatus
is noError
. You can switch to SNMP v1 and see the difference.
Now the question is why your printer does not return the OID-value pairs you expect it to return. Besides probably useless hint of replacing localhost
with the IP address of your printer, I'd also check with printer's documentation to make sure it supports SNMP v2c, uses public
community and has all that enabled.
Try sending your printer a single OID -- some embedded SNMP implementations are known to behave strangely in a non-straightforward settings.
Since I imagine your code is slightly different from the paste above, I'd advise you to enable pysnmp debugging in your script and take a look at the SNMP messages going towards your printer and back. May be you'd spot some suspicious things there. You are welcome to paste them in here for me to take a look as well.
Finally, I'd suggest you switching over to the latest release pysnmp version and base your code on its hlapi interface.
from pysnmp.
Thanks for the quick feedback. What's so strange is it's just the magenta cartridge. The others work great. I don't believe it is a problem with pysnmp, I actually found a unresolved notice out on one of the linux boards where someone was having the exact same problem with magenta. I guess printers don't like magenta or something.
My concern with pysnmp was that if there is one oid in the list that has a problem, it reports the problem for all the items, even though the others would work fine if the problem oid is taken out.
I was using the hlapi interface, but it seemed more complex and confusing at the time. I'll go back and look at it.
Thanks again.
from pysnmp.
Failing all OIDs in presence of a single failed OID may represent some sort of compromise in embedded SNMP implementation. My theory is based on the design of SNMP v1 which has a single index (e.g. error-index) for pointing out failing OID. If more than one OID fail, SNMP v1 has no way to communicate that back to client. When implementing SNMP v2c on top of existing v1 implementation, they may have decided to leave SNMP v1 logic in place just replacing error-index pointer with noSuchObject sentinel.
But that's just a theory, no hard evidence... ;-)
The hlapi thing was designed to remediate pysnmp usage complications. That gives me hope that it should be easer for you to accommodate. Here's a quick link to respective documentation page.
from pysnmp.
Related Issues (20)
- Sporadic Timeout using set HOT 2
- <lambda>() takes 3 positional arguments but 4 were given HOT 5
- Project URL now redirects to Suspicious/Malware Site HOT 1
- Sending requests from specific interface not working.
- Get no result of getCmd HOT 4
- Attempted "__hash__" operation on ASN.1 schema object HOT 13
- pysnmp doesn't support IPv6 link-local addresses HOT 1
- Hello there, new to python and pysnmp. HOT 2
- AttributeError: 'UdpTransportTarget' object has no attribute 'contextName' HOT 2
- snmpget retry HOT 1
- Some authentication/privacy combinations are not working correctly? HOT 1
- .snmprec Generation HOT 1
- pysnmp usinng with SNMP V3 HOT 3
- Strange error when running the code given HOT 4
- Incomplete OID Retrieval: SNMP Walk (nextCmd/bulkCmd) Fails to Capture All OIDs HOT 6
- This project is dead please open issues with a fork HOT 1
- MibCompiler error when node name is 'as',the key world change to 'pysmi_as'
- Pysnmp HOT 1
- Python 3.12 compatibility - deprecated asyncore HOT 2
- Identical communities for read and write HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysnmp.