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’s_Guide

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:

1 Like