Developing PySNMP based agent with Custom MIB

pysnmp-over-oids-logo

Let’s face it – PySNMP documentation is not very clear and well organized, yet for those of you willing to implement SNMP agent easily and efficiently, without the need to extend complicated C++ libraries (e.g. net-snmp) with dynamically loaded libraries, PySNMP might be a good start.

I followed Neal Charbonneau’s great tutorial and found it very helpful, but I needed an ability to define writable (SNMP SET) objects. The following code is more or less copy of Neal’s code, with ability to set testCount object from SNMP manager:

 

read more

Installing PySNMP on Beaglebone

Beaglebone Angstrom installation is missing some required python packages needed

  1. Run

    or download those packages from here (if you are offline): http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/python/
  2. Continue with original installation instructions: http://pysnmp.sourceforge.net/download.html

Compiling and installing net-snmp on BeagleBone

The easiest way to control our Beaglebone device using SNMP is to install net-snmp package.

The following tutorial assumes you have angstrom toolchain installed as described here and you are running vanilla Angstrom distribution on your Beagle

Download net-snmp source from here and untar it Configure the package as the following: run “make” run “make install DESTDIR=<explicit temp dir path>” install files to BeagleBone using SSH:   To test your installation, create snmpd.conf file by running: and run snmpd in shell: (use ip address you wish to listen on)

You can check /var/log/snmpd.log for errors

Good luck!