[SNMP4J] Need help:Unable to run sample snmp code with OIDs

Jaideep Barde jaibarde at gmail.com
Mon Feb 7 12:34:56 CET 2011


Hello All,
I am working on a college assignment and have just started using this SNMP4J
package to work on it. I have been trying to get the following example
application working and am unable to get it working. I am running the
example with IP address as "udp:127.0.01/161" OID as

PDU pdu = new PDU();
   pdu.add(new VariableBinding(new OID(new int[] {1,3,6,1,2,1,1,1})));
   pdu.add(new VariableBinding(new OID(new int[] {1,3,6,1,2,1,1,2})));
   pdu.setType(PDU.GETNEXT);

I am getting the response PDU  as null.Can you help me understand what could
be wrong here? Do I need to do any prior setting on my windows XP box before
running this sample code? Also, I am not quite sure on what these OIDs
correspond to, I mean I wanted to understand what information I am getting
on these requested OIDs in the example.

Thanks in advance,
~jaideep



More information about the SNMP4J mailing list