Just installed this one, went straight to the V3 and configured a Mikrotik router as the SNMP host.
System immediately connected and tags came up. This was with SHA-1 and AES-128 on a private community.
Nice work.
When is the code going on GitHub?
org.snmp4j.MessageException: Network is unreachable
at org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:680)
at org.snmp4j.Snmp.sendMessage(Snmp.java:1075)
at org.snmp4j.Snmp.send(Snmp.java:975)
at org.snmp4j.Snmp.send(Snmp.java:957)
at org.snmp4j.Snmp.send(Snmp.java:925)
at com.mussonindustrial.embr.snmp.devices.SnmpDeviceImpl.read(SnmpDeviceImpl.kt:100)
at com.mussonindustrial.embr.snmp.opc.OidAddressSpace.read(OidAddressSpace.kt:72)
at com.mussonindustrial.embr.snmp.opc.OidAddressSpace.read(OidAddressSpace.kt:42)
at org.eclipse.milo.opcua.sdk.server.util.SubscriptionModel$ScheduledUpdate.lambda$null$1(SubscriptionModel.java:170)
at org.eclipse.milo.opcua.sdk.core.util.GroupMapCollate.lambda$groupMapCollate$3(GroupMapCollate.java:47)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.toArray(Unknown Source)
at org.eclipse.milo.opcua.sdk.core.util.GroupMapCollate.allOf(GroupMapCollate.java:77)
at org.eclipse.milo.opcua.sdk.core.util.GroupMapCollate.groupMapCollate(GroupMapCollate.java:68)
at org.eclipse.milo.opcua.sdk.server.util.SubscriptionModel$ScheduledUpdate.run(SubscriptionModel.java:156)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Network is unreachable
at java.base/sun.nio.ch.DatagramChannelImpl.send0(Native Method)
at java.base/sun.nio.ch.DatagramChannelImpl.sendFromNativeBuffer(Unknown Source)
at java.base/sun.nio.ch.DatagramChannelImpl.send(Unknown Source)
at java.base/sun.nio.ch.DatagramChannelImpl.send(Unknown Source)
at java.base/sun.nio.ch.DatagramChannelImpl.blockingSend(Unknown Source)
at java.base/sun.nio.ch.DatagramSocketAdaptor.send(Unknown Source)
at java.base/java.net.DatagramSocket.send(Unknown Source)
at org.snmp4j.transport.DefaultUdpTransportMapping.sendMessage(DefaultUdpTransportMapping.java:128)
at org.snmp4j.transport.DefaultUdpTransportMapping.sendMessage(DefaultUdpTransportMapping.java:46)
at org.snmp4j.MessageDispatcherImpl.sendMessage(MessageDispatcherImpl.java:270)
at org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:657)
... 25 common frames omitted
Do you have multiple SNMPv3 devices to test with? I haven’t been able to test that the authentication works for multiple SNMPv3 devices connected at the same time. SNMPv3 authoritative engine stuff is… interesting.
It’s currently under the feat/snmp-module branch.
Just the string containing the address including the colons, I have a feeling there could be a typical parsing error where the colon gets assumed to denote a port mumber.
I tried with both the same username and different usernames, also the same auth and priv encryption as well as different. It also seems to not reset something, so if I delete the second connection, the first still stays disconnected. All I get is no response logs, even with TRACE level.
I have a feeling this is actually an issue because docker doesn't have IPv6 support enabled by default. Also IPv6 addresses should work if added in the host field as:
Add tag address notation that changes the snmp method called:
ns=1;s=[MyDevice]get:1.3.6.1.2.1.1.5.0 snmpGet(1.3.6.1.2.1.1.5.0) ns=1;s=[MyDevice]walk:1.3.6.1.2.1.1.5.0 snmpWalk(1.3.6.1.2.1.1.5.0) as a Json Document ns=1;s=[MyDevice]table:1.3.6.1.2.1.1.5.0 tableUtils.getTable(1.3.6.1.2.1.1.5.0) as a Dataset Tag
On device creation or changed settings, perform a snmpWalk of the root node, and populate the browsable OIDs in the tag browser.
Upload MIB files to the gateway, and then you can use either symbolic names or OIDs. On tag creation or update, a symbolic name can be converted to the corresponding OID in the tag provider backend. Adding to this, the MIBs could be used to translate the browsable OIDs that match from the initial browse.
Add scripting functions into the module for manual event triggers.