python - How do I implement a custom MIB in PySNMP? -


i have mib text file (do need make .py file somehow??). trying use pysnmp (not net-snmp). have been able connect device , print out info, info not helpful (just objectname, objectidentifier, etc). want able communicate device (send commands change , read values), of tutorials have seen seem of little help. know how can use custom mib communicate device? sites missing? http://pysnmp.sourceforge.net/ ok, need else...

to use mibs pysnmp should first convert mib pysnmp format (which collection of python objects). conversion done pysnmp/tools/build-pysnmp-mib shell script in following manner:

$ sh build-pysnmp-mib -h build-pysnmp-mib: illegal option -- h convert mib text file pysnmp-compliant module, see http://pysnmp.sf.net. usage: build-pysnmp-mib [-o pysnmp-mib-file ] [ mib-text-file ] 

make sure have libsmi installed (pysnmp scripts use smidump tool libsmi distribution).

unless put new pysnmp mib file pysnmp/smi/mibs/ (which not idea), have point pysnmp location own mibs are. done explained here.

once done mib, can use scripts explained here.

you make quick check how new mib works invoking pysnmpget/pysnmpset tools shipped pysnmp-apps package.

btw, chances mib need work converted pysnmp format , distributed pysnmp-mibs package.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -