📡 Industrial Protocols — 2.4
Developer HubModule 2: Industrial Protocols2.4
Reading12 min

DNP3: Utility SCADA Communication

📡 Module 2: Industrial Protocols

DNP3: Utility SCADA Communication

DNP3 (Distributed Network Protocol 3) is the dominant SCADA protocol in North American utilities and is widely used in the Middle East, Australia, and parts of Asia. It was designed in the early 1990s to solve problems that Modbus could not: event-driven reporting, time-stamped data, and reliable delivery over unreliable links.

Architecture

DNP3 uses a master-outstation architecture:

  • Master: The SCADA host or control center that polls outstations and issues commands
  • Outstation: The remote device (RTU, IED, or gateway) that collects field data

Communication can be over TCP/IP (port 20000 by default), serial, or radio links.

Data Types (Point Types)

DNP3 defines specific point types:

TypeCodeDescriptionExample
Binary InputBISingle-bit statusBreaker open/closed
Binary OutputBOSingle-bit controlTrip/close command
Analog InputAI16/32-bit measured valueVoltage, current, power
Analog OutputAO16/32-bit setpointTap position, power setpoint
CounterCTAccumulated valueEnergy (kWh), operations count

Each point has associated flags (online, restart, comm_lost, remote_forced, over_range, etc.) providing data quality information.

Event-Driven Reporting (Unsolicited Responses)

Unlike Modbus where the master must poll every register, DNP3 outstations can send unsolicited responses when values change. The outstation maintains an event buffer and sends events based on:

  • Deadband: Analog values are reported when they change by more than a configurable threshold (e.g., voltage changes by > 0.5 V)
  • Class assignments: Points are assigned to Class 1 (high priority), Class 2 (medium), or Class 3 (low). The master can poll by class.

This dramatically reduces bandwidth on constrained links. A typical DNP3 poll sequence:

Master -> Outstation: Integrity Poll (Class 0 - all current values)
Master -> Outstation: Event Poll (Class 1,2,3 - only changed values)
Outstation -> Master: Unsolicited Response (critical events)

Secure Authentication (SA)

DNP3 Secure Authentication (SA, defined in IEEE 1815-2012) adds challenge-response authentication to prevent unauthorized commands. This is critical because DNP3 was originally designed with no security.

SA v5 uses HMAC-SHA-256 with pre-shared keys:

  1. Master sends a control command
  2. Outstation responds with an Authentication Challenge (challenge sequence number + random data)
  3. Master computes HMAC over the original command + challenge data and sends an Authentication Reply
  4. Outstation verifies the HMAC and executes the command if valid

DNP3 vs. IEC 61850

FeatureDNP3IEC 61850
Data modelFlat point listsHierarchical object model
Time stampsPer-event, 1 ms resolutionPer-event, 1 ms resolution
Unsolicited reportingYesYes (MMS reports)
Peer-to-peerNoYes (GOOSE)
ConfigurationManual point mappingSCL file import
Primary useWAN SCADASubstation LAN

EnergyAtIt Integration

In EnergyAtIt, DNP3 communication is handled via a sidecar gateway pattern: a Python-based DNP3 master (using pydnp3/OpenDNP3) exposes a REST API that the Node.js application calls. This avoids the complexity of native C++ FFI bindings in Node.js while maintaining full DNP3 protocol support.

Node.js App  --(HTTP)--> DNP3 Gateway (Python/Flask)  --(DNP3 TCP)--> Outstation

Log in to track your progress and earn certifications.