Is SNMP4J incompatible with MIB Brower?

Mib Brower can pick up and display details when I use command line trap enter image description here

enter image description here

However, when I trap using SNMP4J, Mib Brower does not show details. Are they incompatible?Or is there something wrong with my trap code?

  public void test () throws IOException {

TransportMapping transport = new DefaultUdpTransportMapping();
transport.listen();

CommunityTarget cTarget = new CommunityTarget();
cTarget.setCommunity(new OctetString("public"));
cTarget.setVersion(SnmpConstants.version2c);
cTarget.setAddress(new UdpAddress("192.168.**.***" + "/" + 162));
cTarget.setRetries(2);
cTarget.setTimeout(5000);

PDU pdu = new PDU();
pdu.add(new VariableBinding(SnmpConstants.sysUpTime,new OctetString(new Date().toString())));
pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, new OID("1.3.6.1.4.1.48183")));
pdu.add(new VariableBinding(SnmpConstants.snmpTrapAddress, new IpAddress("172.24.8.132")));
pdu.add(new VariableBinding(new OID("1.3.6.1.4.1.48183.1"), new OctetString("Major")));
pdu.setType(PDU.NOTIFICATION);

Snmp snmp = new Snmp(transport);
System.out.println("Sending V2 Trap... Check Wheather NMS is Listening or not? ");

snmp.send(pdu, cTarget);
snmp.close();

} enter image description here

Using this code can receive information on the command line, but mib Brower cannot display it enter image description here

With SNMP4J you are sending SNMPv2c but with NET-SNMP command line tool you are sending SNMPv3. Maybe that makes the difference?

On the other hand, you are using a notification ID that is not recommended (backward compatible to SNMPv1).

I found that sysupTime setting error caused mibBrowser not resolved to

I found that sysupTime setting was wrong and mibBrower could not parse。It worked when I used the following method

:+1: That’s right, sysUpTime OBJECT-TYPE has the syntax TimeTicks. Using OCTET-STRING (OctetString) instead will cause problems with nearly all SNMP notification receivers and would violate the SNMP standards.