How to choose Modbus gateway and serial server, and what are the differences between them?

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

How to choose Modbus gateway and serial server, and what are the differences between them?缩略图

Source: Modbus Chinese Network (modbus. cn) - a leading Modbus communication protocol technology community in China

This article: Differences and Selection between Modbus Gateway and Serial Server · Author: Modbus Technical Team · Published on July 1, 2026

Absrtact: Serial port server, Modbus gateway and edge computing gateway are often confused, but in fact they are essentially different in protocol processing depth, data acquisition mode and engineering positioning. This article decomposes the differences among the three from four dimensions: device essence, protocol hierarchy, connection management, and data flow, and provides a selection decision framework and configuration schemes for three typical scenarios. Keywords: serial server, Modbus gateway, edge computing gateway, protocol conversion, RS-485 to Ethernet, Internet of Things gateway.


There is a quite typical conversation:

Boss, 8 Modbus RTU instruments on site need to be connected to the cloud. Is buying a serial server enough

Enough. Transparent transmission is enough, the server will parse the protocol

Three months later, the server ran to 90% CPU due to polling 8 instruments every 500ms. Later, when two more devices were added, the data began to be lost directly. Upon inspection, the TCP connection of the serial server was overwhelmed by high-frequency packets.

Replaced with a Modbus gateway and implemented polling logic locally on the gateway side, while the server only periodically retrieves cached data. The CPU dropped from 90% to 15%, and communication packet loss disappeared.

In this story, the serial server did nothing wrong - it carefully transmitted every byte. The problem is that it doesn't understand what it's transmitting. Modbus gateway understands protocol semantics, so it can do things that serial servers cannot do. Let's break it down and explain it clearly below.


1、 The essential positioning of three-layer equipment

Let's put aside the binary opposition of 'serial server vs Modbus gateway' first - in fact, we should distinguish three levels:

Device TypeDepth of protocol processingTypical hardwarecore competency
serial port serverPhysical layer+Transport layerRS-232/485 ↔ TCP/UDPTransparent transmission without parsing protocol content
Modbus gatewayPhysical layer+Transport layer+Modbus application layerRTU/ASCII ↔ TCP+master/slave modeIdentify function codes, address mapping, caching
Edge computing GatewayFull stack+edge processingMulti protocol+rule engine+local databaseProtocol conversion, data cleaning, network disconnection and transmission continuation

The serial server is a 'mailman', responsible for delivering packages from point A to point B regardless of what is written inside. The Modbus gateway is a "sorting center" that unpacks packages to see the address and function code, and decides who to send them to, whether to give them, and whether to cache them. The edge computing gateway is a "local dispatching console" - it can not only forward, but also judge "this temperature value is abnormal, local alarm first, and then report".


2、 Serial Server: Transparent Transmission of All

2.1 Working principle

The core function of a serial server can be summarized in one sentence: to transport every byte on the RS-232/RS-485 serial port intact into TCP or UDP network packets, and vice versa. It doesn't care if these bytes are Modbus RTU frames, ASCII commands, or custom binary protocols.

Data flow path:

Serial Port Device → RS-485 bus → serial port server(Serial port)↔Ethernet encapsulation → TCP/UDP Internet → Server

There are usually three types of packaging methods:

TCP Server ModeThe serial server listens on a TCP port, and the remote host actively connects as a client. After the connection is established, both parties perform bidirectional transparent transmission.

TCP Client ModeThe serial server actively connects to the designated IP and port of the remote server. 4G DTUs and most on-site devices without a public IP address follow this mode - the server must have a fixed public IP address and open ports.

UDP modeThe serial server encapsulates serial data into UDP datagrams and sends them to the specified remote IP and port, while receiving UDP datagrams from the remote end. UDP has no connection management overhead, but there will be no retransmission mechanism in case of packet loss - suitable for non critical data transmission within the same LAN.

2.2 Physical specifications

The hardware differences of serial servers mainly lie in the number of serial ports and physical interface types:

  • Single port type1 RS-485 or 1 RS-232, suitable for single device networking.
  • Multi port type2, 4, 8, and even 16 mixed RS-232/RS-485/RS-422 access, each serial port works independently and does not affect each other.
  • WiFi type: Serial port to WiFi, supports AP (device self built hotspot), STA (connected to existing WiFi), and AP+STA hybrid mode.
  • Wide pressure/work specificationsSupport DC 9-48V wide voltage, operating temperature from -35 ° C to 75 ° C, and protection level above IP30.

Pay attention to a key indicator when selecting:Transparent transmission delayThe cheap serial server uses several layers of software buffering internally, and the end-to-end delay may reach 100-200ms. For the response timeout of the Modbus master, an additional delay of 200ms means that you have lost at least 200ms of polling window. The end-to-end latency of industrial grade serial servers should be within the range of 10-50ms.

2.3 Boundary of Serial Server

Things that serial servers cannot do:

  • I don't know where a Modbus RTU frame starts and ends (it doesn't perform a 3.5-character interval judgment)
  • Unrecognized slave address, unable to distribute data to different TCP clients based on address
  • Not verifying CRC/LRC verification - erroneous frames will also be transmitted
  • Cannot initiate Modbus queries proactively
  • Cannot do polling, the server must manage the read and write timing of all slave stations by itself

3、 Modbus Gateway: A Hub for Protocol Awareness

3.1 Working principle

The Modbus gateway adds a layer of protocol engine on top of the serial server. It can recognize the structure of Modbus RTU/ASCII/TCP packets - address code, function code, register address, data area, and CRC/LRC - and make intelligent decisions based on it.

Typical functional modes:

Mode 1: Transparent Conversion (Slave Mode/Slave Mode)

This is the most basic mode of the gateway, which behaves like a serial server, but with an additional step: stripping the CRC/LRC checksum from Modbus RTU/ASCII frames, adding MBAP message headers, and converting them into Modbus TCP frames to send to the server. For the server side, the gateway behaves as a Modbus TCP Server. Conversely, when the server sends a Modbus TCP request, the gateway removes the MBAP header, calculates and attaches a CRC, and converts it into an RTU/ASCII frame to be sent to the serial port slave.

SCADA/上位机(TCP Client)
    │ Modbus TCP 请求
    ▼
Modbus 网关(TCP Server → RTU Master 转发)
    │ Modbus RTU 请求 + CRC
    ▼
RS-485 总线 → 从站 01, 02, 03...


How to choose Modbus gateway and serial server, and what are the differences between them?插图

Mode 2: Active polling+caching (host mode/master mode)

This is the core function that distinguishes Modbus gateways from serial servers. As a Modbus RTU Master, the gateway actively queries the slave devices on the serial port at regular intervals based on the built-in polling table, and stores the returned data in the local cache. The network side server does not need to manage polling by itself - it can directly read the latest data from the gateway's cache.

Benefits:

  • Multiple upper computers/cloud platforms can simultaneously read the same batch of register data without preempting the RS-485 bus
  • The polling frequency is controllable, and the gateway is responsible for managing 3.5-character frame intervals, timeout retries, and CRC checks
  • The network focuses on ensuring that it does not interfere with serial communication - when the server times out and rereads, the gateway directly returns data from the cache

Mode 3: Proactive Reporting (Publish Mode)

The gateway actively pushes register data to the server according to preset rules (timing, data changes, threshold triggering). In this mode, the server does not need to poll - this is particularly useful in MQTT access scenarios, where the gateway acts as an MQTT client and actively PUBLISH data to the broker's specified topic.

3.2 Cache storage mechanism

The cache of Modbus gateway maintains a register mapping table in memory. When configuring, the administrator defines a series of 'collection points':

collection point 1:slave address 01,function code 03,starting address 0000,Length 4,Period 1s
collection point 2:slave address 02,function code 04,starting address 0000,Length 2,Period 5s
...

The gateway polls these collection points according to their respective cycles and refreshes the data to the internal cache. When multiple TCP clients read simultaneously, the gateway directly returns cached data without triggering serial communication. The shorter the acquisition cycle, the more real-time the data, but the RS-485 bus load is also higher - a balance needs to be found between real-time performance and bus capacity.

How to choose Modbus gateway and serial server, and what are the differences between them?插图1

3.3 Protocol Conversion Capability

Typical protocol conversion paths supported by Modbus gateways:

Modbus RTU  ←→  Modbus TCP
Modbus ASCII ←→  Modbus TCP
Modbus RTU   ←→  Modbus RTU(Cross network segment routing)
Modbus TCP   ←→  MQTT(Some advanced gateways)

Note: Only the conversion from one Modbus mode to another is within the scope of a 'standard Modbus gateway'. Once the gateway is able to convert Modbus ↔ Non Modbus protocols such as MQTT/HTTP/OPC UA/Profinet have actually entered the field of "protocol converter" or "edge computing gateway".


4、 Edge computing Gateway: a complete platform for IoT

4.1 Beyond Protocol Forwarding

Edge computing gateway is a "full body evolution" of serial port server and Modbus gateway. It not only completes protocol conversion, but also provides local data processing and decision-making capabilities. Core competencies include:

  • Simultaneous access to multiple protocolsOn an RS-485 bus, there are both Modbus RTU devices and DL/T645 meters. The gateway simultaneously parses both protocols and converts them to MQTT/HTTP for upload
  • Local Rule EngineIF temperature>80 ° C THEN local relay disconnection+platform alarm, no need to rely on cloud decision-making
  • Data PreprocessingMean filtering, rate of change calculation, and unit conversion (such as raw value multiplied by 0.1=actual temperature) are completed on the gateway side
  • resume broken transferWhen 4G/WiFi is disconnected, data is cached to the local Flash/SD card; Automatic retransmission after network recovery
  • Edge storageLocal SQLite/TSDB, supports querying historical data for 7-30 days

The essential difference between 4.2 and Modbus gateway

Many people think that "my gateway supports MQTT upload, even if it is a edge computing gateway". In fact, supporting MQTT transparent transmission does not count as edge computing - in essence, it is transparent transmission, but a protocol package has been changed.

The real edge computing gateway needs to doData model conversion: Transfer a string of Modbus register data(01 03 04 00 10 00 20 00 30)Parse to structured JSON data({"temperature": 16.0, "humidity": 32.0, "pressure": 48.0})Push it back to the cloud platform. This process involves mapping register addresses to physical quantities, unit conversion, data type conversion, and data validity verification - it's not just about "stuffing Modbus frames into MQTT messages".


5、 Engineering comparison of operating modes

From the perspective of engineering deployment, the three types of devices have different topological roles in the network:

Dimensionserial port serverModbus gatewayEdge computing Gateway
Requirements for serversHigh (server polling)Low (read gateway cache)Minimum (only accept processing results)
Serial port polling executorServer (remote polling)Gateway (local polling)Gateway (local polling+preprocessing)
Number of TCP connections1-8 (limited by hardware)8-32+Depends on hardware configuration
Number of serial devicesUnrestricted (only transparent transmission)Suggestion: ≤ 32 per routeSuggestion: ≤ 32 per route
Multi site supportNot supported (serial exclusive)Support (read cache does not trigger serial port)Support
Offline worknot supportednot supportedSupport (offline continuation)
computing powerLimited (Protocol Analysis)Yes (data processing+rule engine)
Installation complexity
Typical price100-500 yuan300-1500 yuan800-5000+yuan

6、 Selection Decision: When to Use Which

6.1 Scenarios of using serial port servers

  • There are only 1-2 Modbus devices on the bus, with simple polling logic and mature Modbus drivers on the server side
  • Not using Modbus protocol (custom binary protocol, manufacturer proprietary protocol), no protocol parsing required
  • Pure LAN usage, stable network latency, and sufficient server processing capacity
  • The budget is tight, we can handle it for a few hundred yuan

6.2 Scenarios for Using Modbus Gateway

  • 4+Modbus RTU devices need to be connected through an IP address
  • Multiple upper computers/engineering PCs need to access the same batch of devices simultaneously
  • Need to reduce the polling pressure on the server side and sink Modbus queries to the field side
  • Remote access (4G/cross network segment), high network latency, timeout retry should not cross the public network
  • Active reporting mode is required (timed push or change triggered push)

Key judgment criteriaIf the server needs to deploy a timed polling program to manage RS-485 slaves, and the gateway can handle it - then use a Modbus gateway.

6.3 Scenarios of edge computing Gateway

  • Multiple protocols (Modbus+DL/T645+M-Bus+custom protocol) need to be integrated on-site and converted to standard IoT protocols
  • Real time local decision-making is required (immediately disconnect the device if the temperature is too high, cannot wait for the server's 500ms polling cycle)
  • The on-site network is unstable (4G signal is poor, WiFi frequency is interrupted), and network caching and data transmission need to be disconnected
  • Data needs preprocessing (denoising, compensation, format conversion) before uploading
  • Need for edge side alarm push and local human-machine interaction (HMI screen/indicator light linkage)

one-sentence summary

  • Just transparent transmission → serial server
  • Manage Modbus devices → Modbus gateway
  • Create local intelligent node → edge computing gateway

7、 Typical Engineering Scheme Example

Option 1: Small scale agricultural greenhouse (4 sensors+1 PLC)

scene:4 Temperature and humidity sensor(RS-485 Modbus RTU)+ 1 Taiwan PLC
Communication:LAN WiFi,The server is 50 The duty room outside the meter
Device:serial port server(WiFi Type,As USR-W610)
Architecture:sensor → RS-485 bus → serial port server → WiFi → LAN → Server(Running) Modbus TCP Master Drive)
reason:Insufficient equipment、Low LAN latency、Low budget

Option 2: Remote monitoring of pump station (8 frequency converters+electricity meters)

scene:8 Taiwan frequency converter(RS-485 Modbus RTU)+ 3 Electric power meter
Communication:4G,The server is in the cloud
Device:Modbus gateway(4G Type,As USR-G780)
Architecture:Variable Frequency Drive+instrument → RS-485 bus → Modbus gateway(Host mode),1s Polling cache)
       → 4G → cloud server(MQTT Broker,Subscription gateway cache data)
Polling table:
  Collection point 1:Station 01, 03code, Address 0x1000, Length 8, Period 1s (Operating parameters of frequency converter)
  Collection point 2:Station 02, 03code, Address 0x2000, Length 4, Period 1s (Voltage and current of electric meter)
  Collection point 3:Station 01, 03code, Address 0x1100, Length 4, Cycle 10s (Frequency converter alarm record)
reason:Multiple devices、remote 4G High latency、Multiple data collection points require different polling cycles、Cloud only requires subscribing to cache

Plan 3: Factory energy consumption monitoring (50+meters+local display)

现场:50+ 台三相电表(Modbus RTU)+ 4 路水表(M-Bus)
通信:企业内网,数据需同时推本地 SCADA 和云端
设备:边缘计算网关(如华为 AR650 系列)
架构:
  电表 → RS-485 总线 1(Modbus RTU 轮询)→
  水表 → M-Bus 转 RS-485 模块 → RS-485 总线 2 → 边缘计算网关
  ├→ 本地 SCADA(Modbus TCP Slave)
  ├→ 云平台(MQTT JSON,含电量、功率、需量等预处理数据)
  └→ 本地 SQLite(30 天历史)
规则引擎:
  IF 某回路功率 > 额定值 × 1.2,持续 5 分钟 → 本地声光报警 + MQTT 告警推送
理由:多协议、数据处理量大、需本地历史存储、需联动告警

Many online sources equate or confuse serial servers with Modbus gateways. Essentially, the core of selection is not to look at what device calls itself, but to look at itLocation of protocol processing depth——Is protocol processing done on the device side or on the server side. The closer the processing is to the site, the easier the server is and the better the system scalability. But in simple scenarios with few devices and good network conditions, the simplicity of serial servers is actually an advantage - there is no additional delay in protocol parsing, nor is there a management burden of cache consistency. It's not the more expensive the better, it's the right thing to do.

Let's talk if there are any issues.

Related Tags
Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.