Files
pnoker dc2164f46e fix(driver): repair boot, scheduling and registration regressions
a live-stack sweep of all 36 drivers surfaced five sdk-level defects
that left reads dead or the whole fleet unbootable:

- drop the empty spring.main stub in the shared driver profile; the
  boot 4.1 binder rejects null-valued keys and every driver died at
  startup with a bind exception
- rename the schedule enable flag to enable to match what every driver
  application.yml actually spells; with the old enabled key the read
  and custom quartz jobs were silently never scheduled
- treat proto3 zero-versions as unset when reconciling registration
  so a driver restart re-registers instead of failing the optimistic
  lock with 'driver version conflict'
- ignore the driver's own registration event that can be consumed
  before applymetadata finishes instead of logging an error
- initialize jdbc/serial connection maps eagerly: the registration
  event handler invalidates pools and nped on a lazy-null map
- ble: exclude the guava 18 pin dragged in by bluetooth-manager
- kafka: use the starter (boot 4 split autoconfigurations out of the
  bare jar) and read the compose-provided bootstrap variable
- lwm2m: pin californium to the 3.x api leshan m14 needs and
  configure an explicit coap endpoint
- mqtt: replace the orphaned spring-integration gateway with a paho
  publisher so the send path exists again
- boot sweep result: 36/36 drivers start, 0 errors
2026-09-18 09:48:19 +08:00
..

DC3 Driver SNMP

Overview

dc3-driver-snmp is the SNMP driver of the IoT DC3 platform. It communicates with SNMP-enabled devices using the SNMP4J library over UDP, supporting SNMP v1 and v2c. Point reads issue an SNMP GET against a configured OID, and write commands issue an SNMP SET, with one SNMP session cached per device.

Module Information

  • Group ID: io.github.pnoker
  • Artifact ID: dc3-driver-snmp
  • Driver Name: SNMP Driver

Driver Attributes (Device-level)

Attribute Code Type Default Description
Host host STRING 127.0.0.1
Port port INT 161
Version version STRING v2c SNMP version (v1/v2c)
Community community STRING public
USM Username usmUsername STRING SNMPv3 USM username (not used in v1/v2c)
USM Auth Protocol usmAuthProtocol STRING MD5 SNMPv3 auth protocol (MD5/SHA)
USM Auth Password usmAuthPassword STRING
Timeout timeout INT 5000 Request timeout in milliseconds
Retries retries INT 1

Point Attributes

Attribute Code Type Default Description
OID oid STRING SNMP object identifier (e.g. 1.3.6.1.2.1.1.1.0)
SNMP Type snmpType STRING OCTET_STRING SNMP data type (INTEGER/GAUGE32/COUNTER32/OCTET_STRING/TIMETICKS/IPADDRESS/OID)

Command Attributes (write)

Attribute Code Type Default Description
OID oid STRING
SNMP Type snmpType STRING OCTET_STRING

The module application.yml is authoritative for attribute codes, types, default values, scheduling, health, and local buffering. Keep this README aligned when those user-facing settings change.

Prerequisites

A reachable SNMP agent. The agent host/port, SNMP version, community string, and per-point OIDs are supplied through the driver and point attributes above. The driver attributes include SNMPv3 USM fields, but the current implementation supports SNMP v1 and v2c.

Running Locally

1. Start Infrastructure and Center Services

make up-db
make up-dev GROUP=core

2. Build and Run

mvn -s .mvn/settings.xml -pl dc3-driver/dc3-driver-snmp -am package
java -jar dc3-driver/dc3-driver-snmp/target/dc3-driver-snmp.jar

Testing

Run the module tests from the repository root:

mvn -s .mvn/settings.xml -pl dc3-driver/dc3-driver-snmp -am test
  • dc3-common-driver — Driver SDK for registration, scheduling, and RabbitMQ integration