Overview
This guide provides instructions on how to configure a Robustel router to function as a TCP server for transparent serial data transmission. This setup is ideal for scenarios where you need to connect a legacy serial device (like a PLC, sensor, or industrial machine) to an IP network. The router will listen for incoming TCP connections from a client application and facilitate a two-way, transparent data stream between the TCP client and the serial device, effectively acting as a "Serial Device Server".
What You'll Need
To successfully complete this configuration, ensure you have the following:
- 1 x Robustel Router with a serial port (e.g., R1520, R2011, R3000)
- 1 x Serial device (or a PC equipped with serial software and a serial cable.)
- 1 x PC for router configuration and TCP client testing
- 1 x Power supply for the router
- 1 x Ethernet Cable
- RobustOS Firmware: V5.3.2 or newer
- A TCP client service application
- Testing Software(Optional): A serial terminal emulator (e.g., Hercules, PuTTY) and a TCP client tool (e.g., Hercules, SocketTest). (For use when a physical serial device and TCP client service application are not 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 walk you through enabling the serial port, setting the correct communication parameters, and configuring it to operate in TCP Server mode.
If your Robustel OS device does not support this function, please skip this step.
- Navigate to Interface -> Serial Port.
- 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.
- In the Serial Port Settings table, identify the serial port you are using (e.g., COM1) and click the edit icon (✎) on the right.
- In the pop-up configuration window, first configure the Serial Port Application Settings.
- Toggle Enable to ON.
- Set the Baud Rate, Data Bits, Stop Bits, and Parity to match the exact settings of your connected serial device.
- Next, configure the Server Setting section.
- Set Application Mode to Transparent.
- 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 that the router will listen on for incoming TCP connections (e.g., 9999). This port must not be in use by another service.
- Click Submit to save the changes for the serial port.
- Finally, click Save & Apply at the top right of the main page to apply all pending changes.
Verification & Testing
To confirm that the configuration is working correctly, you can simulate both the serial device and the TCP client using a utility tool like Hercules.
- Serial Device Simulation: Connect a PC to the router's serial port using a USB-to-Serial adapter. Open a serial terminal (Hercules in Serial mode), select the correct COM port, and set the Baud Rate and other parameters to match what you configured in the router. Click "Open".
- TCP Client Connection: On another PC connected to the router's LAN, open a TCP client (Hercules in TCP Client mode). Enter the router's WLAN IP address (e.g., 192.168.58.139) and the Local Port you configured (e.g., 9999). Click "Connect". The client should establish a connection.
- Test Transmission and Check the Result:: In the serial terminal window, type a message (e.g., "Data from the serial device") and press Send. The message you typed should instantly appear in the log or window of your TCP client tool. This confirms that the gateway is correctly converting the serial data and transmitting it to the TCP client.
Troubleshooting / FAQ
- Q: My TCP client cannot connect to the router.
- A: Verify that the PC running the client is on the same network subnet as the router's LAN. Check that you are using the correct LAN IP address and port number for the router. Ensure no firewall on your PC or network is blocking the connection to that specific port.
- Q: The TCP client connects, but I don't see any data from my serial device.
- A: Double-check all physical connections. Most importantly, ensure the Baud Rate, Data Bits, Stop Bits, and Parity settings in the router perfectly match the settings of your physical serial device. A mismatch in any of these parameters will prevent successful communication.
- Q: Can multiple TCP clients connect to the serial port at the same time?
- A: In TCP Server mode, the router typically allows multiple clients to connect. However, how the data from multiple clients is handled (e.g., interleaved, broadcast) depends on the specific implementation. For most transparent applications, it is recommended to have only one active TCP client connected at a time to avoid data conflicts.
Revision History
Version | Date | Author | Notes |
1.0 | 2025-10-08 | Jens Zhou | Initial release |