How to send I/O ports status as SNMP traffic

I’m trying to develop a python application that allows me to use a telemetry card 2 on a DigiWR41 to collect information about the status of the I/O ports and send it as SNMP traffic to a remote device connected to the router. Any thoughts on how to approach this?

Use the digihw module to monitor your gpio
https://www.digi.com/wiki/developer/index.php/Transport_Python_Programmer’s_Guide
http://www.digi.com/wiki/developer/index.php/Module:digihw
http://ftp1.digi.com/support/documentation/AN_49_Digi_TransPort_Fleet_card.pdf

Then use the sarcli module to run the “setevent” command
FORMAT “SETEVENT [ [trapcode]]”

This will write the event to the eventlog.

Then use the built in settings of the transport to send the SNMP trap from the user event code:

http://ftp1.digi.com/support/documentation/QN36_Configure_SNMP_traps.pdf

1 Like