← All Posts

Modbus RTU to TCP Gateway: Bridge Serial Devices onto Ethernet

Most legacy field devices — power meters, VFDs, temperature controllers, PLCs from the 2000s — speak Modbus RTU over RS-485 serial. Modern SCADA, dashboards, and edge gateways speak Modbus TCP over Ethernet. The two share the same application protocol but different transports, so they cannot talk directly. The bridge between them is a Modbus RTU to TCP gateway.

This guide explains what the gateway does, the typical topology, where latency comes from, and how to choose between a dedicated hardware gateway and a software gateway on a host or edge box. For the protocol background, see Modbus RTU vs TCP.

Why You Need a Gateway

Modbus RTU is a multidrop serial bus: one master, up to ~32 slaves, half-duplex, one transaction on the bus at a time. Modbus TCP is a starred Ethernet network: many clients, each with its own TCP connection, potentially issuing requests in parallel. A gateway reconciles the two:

The unit ID is the routing key. In Modbus TCP, the MBAP unit ID tells the gateway which RTU slave (by Modbus address) the request is for. Unit ID 1 routes to RTU slave 1; the gateway's own address or 0xFF may be treated as the gateway itself.

Typical Topology

  1. RS-485 bus daisy-chained through serial devices (meters, drives).
  2. Bus terminates at the gateway's serial port (A/B, with bias and termination resistors).
  3. Gateway's Ethernet port connects to the plant LAN or an edge switch.
  4. SCADA / dashboard / edge agent opens a Modbus TCP connection to the gateway IP (port 502).
  5. Each poll targets a unit ID that maps to an RTU slave downstream.

Where Latency Comes From

People blame the gateway for slowness, but the dominant factor is almost always the serial bus. At 9600 baud, one RTU round-trip (request + response + inter-frame gaps) takes a handful of milliseconds, and the bus is strictly one-at-a-time. If you poll 30 slaves with 5 registers each, the full sweep takes as long as the sum of those serial round-trips — regardless of how fast the Ethernet side is. Raising the baud rate (38400, 115200) and reducing register counts shrinks the cycle. See RTU troubleshooting for bus tuning.

Hardware Gateway vs Software Gateway

Testing the Bridge

Before pointing production SCADA at the gateway, prove the path with a poll tool: open a Modbus TCP connection to the gateway IP and read a known register from a downstream RTU slave by unit ID. If the read returns valid data, the TCP→RTU translation, unit-ID routing, and serial side all work. MacTools Modbus Poll does this from macOS over TCP, with a slave simulator for cases where the real device is not yet wired. $29.99 one-time.

Test the Gateway Path on macOS

MacTools Modbus Poll — Modbus TCP master (and RTU via USB-RS485) to validate your gateway and downstream slaves before SCADA goes live. No Windows VM.

Get Modbus Poll on the Mac App Store

Frequently Asked Questions

What does a Modbus RTU to TCP gateway do?

A Modbus RTU to TCP gateway accepts Modbus TCP requests from Ethernet clients and forwards them to Modbus RTU slaves on an RS-485 serial bus, then returns the RTU response back to the TCP client. The gateway holds the TCP session and serializes access to the shared serial bus so multiple TCP masters can query the same RTU devices without colliding.

How many RTU slaves can one gateway support?

A single RS-485 segment supports up to 32 unit loads (device nodes) by standard, expandable with repeaters to more. Practically, the limit is set by the bus length, baud rate, and the number of devices that can respond within the polling cycle. Each RTU slave still needs a unique Modbus address (1-247).

Does a Modbus gateway add latency?

Yes, a small amount. The gateway must receive the full TCP request, translate it to an RTU frame, wait for the 3.5-character inter-frame gap, send it, wait for the RTU response, and forward it as TCP. Typical added latency is a few milliseconds per transaction at 9600 baud; most of the delay is the serial round-trip itself, not the gateway processing.

Can software act as a Modbus RTU to TCP gateway?

Yes. A software gateway running on a host with a USB-RS485 adapter (or a Raspberry Pi with a serial HAT) accepts Modbus TCP and translates to RTU on the serial port. This is cheaper and more flexible than a dedicated hardware gateway and lets you add logging, filtering, or protocol bridging in software.

Related: Edge Protocol Gateway

For bridging multiple protocols — Modbus, OPC-UA, S7, EtherNet/IP, DNP3 — behind one API, Voltrus Gateway runs as a single self-hosted binary on Linux, macOS, and ARM. One-time per host.

Further Reading