I am trying to query a device for specific sensors, and get ASN1_ERROR_ERR depending on the number of oids that I specify. My code looks like:
target.setObjectIDList(objID);
resultArray = target.snmpGetVariableBindings();
The 'target' variable is a com.adventnet.snmp.beans.SnmpTarget and the objID is String array of oids. The oids are all coming from the same MIB table. When I specify 8 of them, it works: resultArray is non-null, contains the expected values, and target.getErrorCode() returns 0 (No Error). When I specify 9 oids, resultArray is null and target.getErrorCode() is 50 (which is ASN1_ERROR_ERR: 'SNMP ASN1Error encountered due to Illegal SNMP packet received from [my device's ip]). It doesn't seem to matter which oids I specify, and each work if specified on their own.
To answer my own question, the problem has to do with the firmware on the device. Because of the way the firmware is implemented, it can only support so many oids in a single request.
Leave a comment on Jessica's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic