Overview
In industrial and IoT environments, it's common to have legacy devices that communicate using the Modbus RTU protocol over a serial connection (RS232/RS485). However, modern monitoring and control systems typically operate over IP networks using Modbus TCP. This guide will walk you through configuring a Robustel router to act as a Modbus Gateway, seamlessly converting Modbus RTU from a serial device into Modbus TCP, making it accessible over an IP network.
What You'll Need
- 1 x Robustel Router with a serial port (e.g., R2011, R3000)
1 x Modbus RTU Slave Device (or a PC equipped with Modbus Slave software and a serial cable.)
- 1 x PC for configuration and testing
- 1 x Power Supply for the router
- 1 x Ethernet Cable
Modbus testing software (optional, for testing):
- Modbus TCP Client (e.g., Modbus Poll)
- Modbus RTU Slave simulator (e.g., Modbus Slave) - This can be used for testing if you do not have a physical Modbus RTU device available.
- Ensure your PC is connected to the gateway's LAN port via an Ethernet cable.
- Log in to the Router's web interface. The default IP address is typically
http://192.168.0.1.
Step-by-Step Configuration Guide
This guide will show you how to configure the serial port on the router to listen for Modbus RTU requests and serve them to a Modbus TCP client.
If your Robustel OS device does not support this function, please skip this step.
- Navigate to Interface -> Serial Port in the router's web interface.
- Click on the Port Type tab.
- Under the General Settings section, Select serial port type as needed.
- Click Submit
- click Save & Apply.
- Navigate to Interface -> Serial Port.
- Click on the Serial Port tab.
- Under the Serial Port Settings section, identify the physical COM port your Modbus RTU device is connected to (e.g., COM1) and click the Edit icon on the right.
- In the pop-up window, configure the Serial Port Application Settings.
- Toggle Enable to the ON position.
- Set the Baud Rate, Data Bits, Stop Bits, and Parity to match the exact serial configuration of your Modbus RTU device.
- Next, configure the Server Setting section.
- Set Application Mode to Modbus RTU Gateway.
- Set Protocol to TCP Server.
- Leave the Local IP field blank. This allows the router to accept connections on any of its IP addresses (LAN or WAN).
- Set the Local Port. The standard port for Modbus TCP is 502, but you can use another port if needed.
- Click Submit.
- Finally, click Save & Apply at the top right of the main page to apply all changes to the router's configuration.
Verification & Testing
To verify the configuration, we will use Modbus simulation software.
- Modbus Slave will simulate the RTU device connected to the router's serial port.
- Modbus Poll will act as the Modbus TCP client connecting to the router over the network.
- Setup the RTU Slave: Connect the router's serial port to a COM port on your PC. Run Modbus Slave, and use the software's default slave ID, function codes, and registers. (Note: The Baud Rate, Data Bits, Stop Bits, and Parity values here must be the same as those configured on the router.)
- Setup the TCP Client: Run Modbus Poll on a PC connected to the router's LAN or WAN.
- Go to Connection -> Connect.
- Select Modbus TCP/IP.
- Enter the Router's IP Address, (e.g., its LAN IP
192.168.0.1 or its WAN IP). In the example, the IP address used is the IP from the WiFi connection. - Enter the Server Port you configured (e.g.,
502). - Click OK.
- Check the Connection: Once connected, Modbus Poll should successfully read the register data from the Modbus Slave application, with data flowing through the Robustel router. The "Tx" and "Rx" counters increasing in both applications confirms a successful data exchange.

Troubleshooting / FAQ
- Q: I cannot establish a connection. What should I check first?
- Physical Connection: Ensure your serial cable is correctly wired (e.g., TX to RX, RX to TX for RS232; A to A, B to B for RS485).
- Serial Parameters: Double-check that the Baud Rate, Data Bits, Stop Bits, and Parity in the router's configuration perfectly match the settings on the physical Modbus RTU device.
- Router Configuration: Verify that the correct COM port is Enabled and the Application Mode is set to Modbus RTU Gateway.
- Firewall: Check if any firewall rules on the router (Network -> Firewall) or your PC are blocking the TCP port you configured.
- Q: Which IP address should my Modbus TCP client connect to?
- A: By leaving the Local IP field blank during configuration, the router will listen for Modbus TCP connections on all of its active IP addresses. You can use its LAN IP (default
192.168.0.1) for local connections or its WAN IP (from Cellular, Wi-Fi, or Ethernet) for remote access.
- Q: The connection is established, but I see "Timeout" errors in my client.
- A: This usually indicates a problem with the serial side communication. Verify that the Modbus Slave ID in your client's request matches the ID of the connected RTU device. Also, confirm the physical serial connection is stable.
Revision History
Revision | Date | Author | Notes |
1.0 | 2025-09-27 | Jens Zhou | Initial Release |