SEARCH
TOOLBOX
LANGUAGES
modified on 20 June 2010 at 01:10 ••• 7,491 views

Eagle enet snmp Example

From Manuals

Jump to: navigation, search

Ethernet with Snmp (enet_snmp)

Compatibility Eagle 50E, 100

SNMP and WebServer Application using lwIP.

The lwIP private MIB (enterprises.26381) currently has 10 sensor IDs defined but can be easily changed to support many more.

The demo currently uses the first 4 sensor IDs:


enterprises.26381.1.1.1.1.

0 - LED at PE1 (read/write

1 - User button at PA6 (read only)

2 - Nibble PB0-3 configured as input (read only)

3 - Nibble PC4-7 configured as output (read/write)


Representative commands (board at 192.168.1.220):

snmpwalk -v 1 -c public 192.168.1.220

List all base MIBs

snmpwalk -v 1 -c public 192.168.1.220 enterprises

List all private MIBs

snmpget -v 1 -c public 192.168.1.220 sysContact.0

Get contact information

snmpset -v 1 -c public 192.168.1.220 sysContact.0 s " support@micromint.com "

Set contact information

snmpget -v 1 -c public 192.168.1.220 enterprises.26381.1.1.1.1.0

Get current LED state

snmpset -v 1 -c public 192.168.1.220 enterprises.26381.1.1.1.1.0 i 0

Turn LED off

snmpset -v 1 -c public 192.168.1.220 enterprises.26381.1.1.1.1.0 i 1

Turn LED on

snmpset -v 1 -c public 192.168.1.220 enterprises.26381.1.1.1.1.3 i 10

Set nibble PC4-7 to '1010'


References:

To execute the sensor IDs you can use the command line net-snmp tools for Windows from

http://www.net-snmp.org/download.html