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.
| Mode | How it works | Use |
|---|---|---|
| Real COM / virtual COM | A driver on the PC creates COM ports that tunnel to the device | Legacy Windows software that only knows COM ports |
| TCP server | Device listens on a port; client connects and exchanges raw bytes | SCADA drivers with "TCP/serial encapsulation" |
| TCP client | Device connects out to a server | Data collection to a central host |
| UDP | Datagrams to one or more hosts | Broadcast-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
- Check serial settings (baud, parity, stop bits) and 2-wire/4-wire mode on the device.
- Use the device's port monitor / traffic log to see whether requests go out and answers come back.
- Confirm the client sends the right framing: RTU-over-TCP to a transparent server, Modbus TCP to a gateway.
Connections
Open in Knowledge Graph →Loading the map…
Sources
- NPort 5000 Series User Manual — Moxa
- MODBUS Messaging on TCP/IP Implementation Guide — Modbus Organization
Updated 2026-10-04