Serial device servers vs protocol gateways

When to use a serial device server (Real COM, TCP server/client, UDP) and when a Modbus gateway (RTU ↔ TCP), with timing, multiple-master and troubleshooting notes.

Two kinds of devices put serial equipment on Ethernet — and they are often confused.

Serial device server (transparent)

Forwards bytes between a serial port and the network without understanding the protocol.

ModeHow it worksUse
Real COM / virtual COMA driver on the PC creates COM ports that tunnel to the deviceLegacy Windows software that only knows COM ports
TCP serverDevice listens on a port; client connects and exchanges raw bytesSCADA drivers with "TCP/serial encapsulation"
TCP clientDevice connects out to a serverData collection to a central host
UDPDatagrams to one or more hostsBroadcast-style data, low overhead

Because the device does not understand Modbus, a SCADA must send Modbus RTU frames (with CRC) over TCP — this is "RTU over TCP", not Modbus TCP.

Protocol gateway (Modbus TCP ↔ RTU)

Understands the protocol and converts Modbus TCP (MBAP header, no CRC) to Modbus RTU and back. The unit ID in the MBAP header selects the serial slave address. Use a gateway when the client speaks standard Modbus TCP (most PLCs, SCADA, OPC servers).

Timing and multiple clients

  • Serial links are slow: at 9600 bit/s one 8-byte request + 25-byte response takes ≈ 35–40 ms (10–11 bits per character) plus device processing. Set client timeouts accordingly (e.g. 500–1000 ms) and do not poll faster than the line allows.
  • Several TCP clients on one serial line must be queued; gateways do this, transparent servers may interleave bytes and corrupt frames.
  • Configure the "packing"/delimiter settings so frames are not split into several TCP segments.

Troubleshooting

  1. Check serial settings (baud, parity, stop bits) and 2-wire/4-wire mode on the device.
  2. Use the device's port monitor / traffic log to see whether requests go out and answers come back.
  3. Confirm the client sends the right framing: RTU-over-TCP to a transparent server, Modbus TCP to a gateway.

Loading the map…

Sources

  1. NPort 5000 Series User Manual — Moxa
  2. MODBUS Messaging on TCP/IP Implementation Guide — Modbus Organization

Updated 2026-10-04