I have used SNMP4J and SNMP4J-Agent to implement a SNMP agent running on an embedded system. I have used AGENPro to generate my MIB file for my custom application and then went in and implemented the isValueOk(), getValue() and setValue() functions for each datapoint. I am at the point now where I need to set the read-only and read-write community passwords, but I am not sure where to start. The Read communtiy password can be the default “public” but I need the read-write password to be based on another password internal to the system. I also need a way to change this password dynamically, if the user decides to change the password on the machine.
I can post my source if necessary, but the gist is I have impmented a class called Agent that implements VariableProvider, and have a custom Modules.java file that contains my custom MIBS.