TCP-to-serial DLMS meter bridge for lab and integration testing
Emulate GPRS/modem DLMS smart meter connections on a single serial port for rapid protocol development and integration validation.
What it is
The DLMS Device Simulator bridges TCP client connections to physical or simulated DLMS smart meters over a serial port. It runs as a standalone TCP server (a configurable port) that accepts modpoll or client commands, discovers meter configurations from the platform database at startup, and routes messages bidirectionally with automatic modem session cycling (15-minute connect periods with 1-minute disconnect/reconnect delays). Built on Java with jSerialComm for cross-platform serial I/O, it eliminates the need for live GPRS/modem infrastructure during early-stage testing.
Key benefits
Rapid protocol validation without live modems
Test DLMS client software and platform polling logic against a simulated meter on your development lab network; no need to provision carrier connections or physical modems.
Bridge real meters to TCP clients
Connect physical DLMS meters via USB/serial adapter and expose them as TCP services; useful for vendor integration testing and compliance labs where meter behavior must be captured end-to-end.
Realistic modem session simulation
Auto-cycles connection state (15-minute active, 1-minute reconnect delay) to mirror GPRS/modem behavior; catches race conditions and reconnection logic bugs during integration.
Database-driven meter discovery
Reads meter configuration (controller ID, device ID, GPRS server address) from the platform database at startup; no code changes to test different meter topologies.
Capabilities
- TCP server on configurable host/port (default localhost:1008); accepts multiple simultaneous client connections
- Discovers DLMS controllers and meters from the platform database (platform tables, platform tables, platform tables tables)
- Routes TCP commands to serial device using jSerialComm 2.10.3; supports all Windows/Linux/macOS serial ports
- Simulates 15-minute GPRS modem sessions with 1-minute disconnect/reconnect cycles
- Per-client connection pairing: modem thread connects first, then modpoll thread joins and communicates through the bridge
- Standalone debug mode (serial meter communication.main()) for serial layer testing without TCP
- Configurable baud rate, COM port, TCP server address via static fields
- Logging via platform database (platform tables); roll-over file output with retention policy
