Giter VIP home page Giter VIP logo

Comments (3)

etingof avatar etingof commented on May 22, 2024

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.

turboc1208 avatar turboc1208 commented on May 22, 2024

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.

etingof avatar etingof commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.