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.
Read 20 holding registers (function 03) from address 0 of slave 1. These are the bytes on the TCP connection:
| Framing | Request bytes | What is in it |
|---|---|---|
| Modbus TCP | 00 01 00 00 00 06 01 03 00 00 00 14 | MBAP header: transaction 1, protocol 0, length 6, unit 1 — then function, address, quantity. No CRC. |
| RTU over TCP | 01 03 00 00 00 14 45 C5 | Slave 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.
| The converter is… | Typical wording in its settings | Use |
|---|---|---|
| A serial device server in raw / transparent mode | TCP Server, Raw socket, Transparent, Data mode, Virtual COM | RTU over TCP (port: the converter's TCP server port, often not 502) |
| A Modbus gateway | Modbus TCP to RTU, Modbus gateway, Protocol conversion | Modbus TCP (port 502, unit ID = the RS-485 slave address) |
| Set to ASCII on the serial side | Modbus ASCII devices, 7 data bits | ASCII over TCP |
| Using UDP instead of TCP | UDP mode, datagram | RTU 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.
| Tab | Transport | Frame on the wire |
|---|---|---|
| TCP/IP | TCP | MBAP header + request (Modbus TCP) |
| RTU/TCP | TCP | RTU frame with CRC |
| ASCII/TCP | TCP | : + hex + LRC + CR LF; a reply split across packets is put back together |
| UDP | UDP | MBAP header + request, one datagram |
| RTU/UDP | UDP | RTU frame with CRC, one datagram |
| ASCII/UDP | UDP | ASCII frame, one datagram |
| TCP-SEC | TLS over TCP | MBAP + request inside TLS, port 802 — see Modbus TCP Security |
All framings in both editions, from $49 one-time. Free 14-day trial. No credit card. Windows 10/11.
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 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.
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.
Whatever data port the converter listens on for its serial channel — set on the converter, often not 502. Modbus TCP gateways usually use 502.
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).
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.
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 →We use Google Analytics cookies to see how the site is used. You can accept or decline — declining keeps analytics off. See our Privacy Policy.