Applications / Protocol Bridges / DLMS TCP-to-Serial Bridge
Protocol Bridges

Pipe DLMS TCP connections to real serial meters

A transparent TCP-to-serial bridge for testing and integrating optical-probe-connected meters with DLMS polling infrastructure.

What it is

The DLMS TCP-to-Serial Bridge is a lightweight protocol bridge that forwards TCP traffic to a serial port and back with zero protocol interpretation. It enables a remote DLMS client (such as a production meter-polling service) to communicate with real DLMS meters connected via optical probe on a local test or integration system. No database lookups, no emulation, no framebacking—just a transparent byte pipe. Single-client enforcement prevents serial-port conflicts during concurrent test scenarios.

Key benefits

Swap simulator for real hardware instantly

Stop the Gurux DLMS simulator, start this bridge, and redirect your poller's TCP connection from localhost to the integration test rig. No code changes, no redeploy required.

De-risk optical-probe integration

Validate real meter communication on a lab bench before shipping to the field. Hex-dump logging shows every frame in both directions, making protocol issues visible immediately.

Test exclusivity and error handling

Verify that your polling service gracefully handles serial-port contention. The bridge rejects a second client instantly, letting you confirm your app's reconnection logic works.

Run on Windows, Linux, or macOS

Portable Java runtime; serial device names adapt to the host OS. Same test lab bridge can run on any developer workstation or CI system.

Capabilities

  • TCP accept loop with one active client at a time; concurrent connection attempts are logged and rejected
  • Virtual-thread data pumps for TCP-to-serial and serial-to-TCP forwarding with no protocol awareness
  • Configurable TCP listen port (default 4059), serial device (a serial port, /dev/ttyUSB0, etc.), baud rate, parity, data/stop bits, and read timeout
  • Three-layer configuration precedence: bundled defaults → optional config file → command-line overrides
  • Hex-dump logging on stdout with HH:mm:ss.SSS timestamps and direction labels (TCP→SER, SER→TCP) for protocol troubleshooting
  • Semi-blocking serial reads with 200ms timeout to detect TCP socket closure promptly
  • Standalone Gradle build with native executable (.bat on Windows, shell script on Linux/macOS)
  • Cross-platform serial support via jSerialComm library (Windows COM*, Linux /dev/ttyUSB*, macOS /dev/tty.*)

Put DLMS TCP-to-Serial Bridge to work on your estate.

Request a demo →