Every device. One tool. Pay once. Modbus · BACnet · Siemens S7 · one-time licence · also from us: BACManager ↗

Modbus RTU over TCP vs Modbus TCP — Which One Your Converter Needs

An RS-485 device behind an Ethernet converter can be reached two ways, and they are not interchangeable. Modbus TCP puts a 7-byte MBAP header in front of the request and drops the CRC. Modbus RTU over TCP sends the serial frame exactly as it would travel on the wire — slave address, request, CRC — inside a TCP connection. Send the wrong one and the device never answers, with no error that says why. Here is how to tell which one you need, and how to test it from Windows.

ModbusManager connected in RTU/TCP mode, status Connected (RTU/TCP), reading 20 holding registers from slave 1 behind a serial-to-Ethernet converter
ModbusManager reading slave 1 in RTU/TCP mode: the status line says Connected (RTU/TCP).

The Same Read, Two Framings

Read 20 holding registers (function 03) from address 0 of slave 1. These are the bytes on the TCP connection:

FramingRequest bytesWhat is in it
Modbus TCP00 01 00 00 00 06 01 03 00 00 00 14MBAP header: transaction 1, protocol 0, length 6, unit 1 — then function, address, quantity. No CRC.
RTU over TCP01 03 00 00 00 14 45 C5Slave 1, function, address, quantity, CRC-16 (low byte first). No header.

A transparent converter copies bytes from TCP to RS-485 and back without looking at them. Give it a Modbus TCP frame and the first thing on the bus is 00 01 — slave 0, function 1 — followed by bytes whose CRC never matches; every device on the line ignores it, and the master times out. A protocol gateway does the opposite: it expects Modbus TCP and builds the RTU frame itself, so an RTU frame sent to it is malformed and gets no answer either.

Which One Do You Need?

The converter is…Typical wording in its settingsUse
A serial device server in raw / transparent modeTCP Server, Raw socket, Transparent, Data mode, Virtual COMRTU over TCP (port: the converter's TCP server port, often not 502)
A Modbus gatewayModbus TCP to RTU, Modbus gateway, Protocol conversionModbus TCP (port 502, unit ID = the RS-485 slave address)
Set to ASCII on the serial sideModbus ASCII devices, 7 data bitsASCII over TCP
Using UDP instead of TCPUDP mode, datagramRTU over UDP or ASCII over UDP

If the documentation is no help, try both: Modbus TCP first on port 502, RTU over TCP on the converter's data port. The one that returns values is right. The converter's own web page also tells you — a serial port configured in TCP Server mode with no Modbus settings is transparent.

Connect in RTU over TCP Mode

ModbusManager Connection settings, RTU/TCP tab: IP address 192.168.1.50, port 4001, timeout 3000 ms
  1. Open Connect and choose the RTU/TCP tab (or ASCII/TCP, RTU/UDP, ASCII/UDP for the other framings).
  2. Enter the converter's IP address and its data port.
  3. Set the Slave ID in the toolbar to the RS-485 device's address — it travels in the frame, the converter does not change it.
  4. Allow for the serial line in the timeout: at 9600 baud a 20-register reply takes about 50 ms on the wire before the converter even sends it back. 1000 ms is a safe start.
  5. Read. If the TX/RX log shows only timeouts, check baud rate, parity and stop bits on the converter's serial port before suspecting the framing.
One request at a time. RTU over TCP has no transaction ID, so a reply cannot be matched to anything but the last request. ModbusManager waits for each answer before sending the next; do not let two masters share one converter port either.
Version note: before ModbusManager Standard 1.4.11, Pro 1.9.6 and BACManager 1.4.6 the RTU/TCP tab sent Modbus TCP framing by mistake, so a transparent converter never answered. Update if you saw timeouts there.

Other Framings over the Network

TabTransportFrame on the wire
TCP/IPTCPMBAP header + request (Modbus TCP)
RTU/TCPTCPRTU frame with CRC
ASCII/TCPTCP: + hex + LRC + CR LF; a reply split across packets is put back together
UDPUDPMBAP header + request, one datagram
RTU/UDPUDPRTU frame with CRC, one datagram
ASCII/UDPUDPASCII frame, one datagram
TCP-SECTLS over TCPMBAP + request inside TLS, port 802 — see Modbus TCP Security

Test your converter with ModbusManager

All framings in both editions, from $49 one-time. Free 14-day trial. No credit card. Windows 10/11.

Download Free Trial

Frequently Asked Questions

What is the difference between Modbus RTU over TCP and Modbus TCP?

Modbus TCP sends a 7-byte MBAP header (transaction ID, protocol ID, length, unit ID) and the request, without a CRC. RTU over TCP sends the serial RTU frame unchanged — slave address, request and CRC-16 — inside a TCP connection. A device or converter understands only one of them.

When do I use RTU over TCP?

When an RS-485 device sits behind a serial device server in transparent, raw or TCP-server mode, which copies bytes between the network and the serial line without converting the protocol. A Modbus gateway that converts the protocol wants plain Modbus TCP instead.

Why does my converter not answer Modbus TCP?

If it is in transparent mode, the MBAP header goes out on RS-485 as if it were a frame for slave 0, the CRC never matches, and the devices ignore it. Switch the master to RTU over TCP, or switch the converter to its Modbus gateway mode.

Which port does RTU over TCP use?

Whatever data port the converter listens on for its serial channel — set on the converter, often not 502. Modbus TCP gateways usually use 502.

Can ModbusManager do ASCII over TCP and UDP?

Yes: ASCII/TCP, RTU/UDP and ASCII/UDP are separate tabs in the connection dialog, next to Modbus TCP, UDP and Modbus TCP Security (TLS).

Sources

Frame bytes: captured from ModbusManager in each mode and checked against a device that answers only RTU frames (the automated test test-net-framings). Modbus Organization, MODBUS Messaging on TCP/IP Implementation Guide and MODBUS over Serial Line: MBAP header and RTU CRC.

// once it answers

Scan the line behind the converter

When the framing is right, the rest of the RS-485 line is one scan away: ModbusManager finds which slave addresses answer and which registers each one has, through the same converter.

Modbus scanner →