How to configure serial to TCP client transparent transmission on RobustOS Devices?

How to configure serial to TCP client transparent transmission on RobustOS Devices?

Overview

When you have a serial device (like a sensor, PLC, or data logger) that needs to send data over a network to a central server, you can configure a Robustel gateway to act as a bridge. This guide will show you how to set up the gateway to convert serial data into TCP packets and transmit them to a specific TCP server. This process, known as "Serial to TCP Client Transparent Transmission," is useful for remotely monitoring and managing legacy serial equipment without needing to modify the end device's software.

What You'll Need

Hardware List:

  • 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

Software/Firmware:

  • RobustOS firmware (This guide is based on RobustOS v5.3.2)
  • A TCP Server application running on a PC or server. For testing, you can use a TCP server simulator (e.g., TCP/UDP Test Tool, Hercules).
  • Testing Software(Optional): A serial terminal emulator (e.g., Hercules, PuTTY) and a TCP server tool (e.g., Hercules, SocketTest). (For use when a physical serial device and TCP server service application are not available)

Prerequisites:

  • 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

Step1: Configure the Serial port type

If your Robustel OS device does not support this function, please skip this step.

  1. Navigate to Interface -> Serial Port.
  2. Click on the Port Type tab.
  3. Under the General Settings section, Select serial port type as needed.
  4. Click Submit
  5. click Save & Apply.


Step 2: Configure the Serial Port Parameters

  1. Navigate to Interface -> Serial Port.
  2. Click on the Serial Port tab.
  3. In the Serial Port Settings table, identify the serial port you are using (e.g., COM1) and click the edit icon on the right.
  4. 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.
  1. Next, scroll down to the Server Setting section.
    • Set Application Mode to Transparent.
    • Set Protocol to TCP client.
    • Server Address: Enter the IP address of your TCP server (e.g., 192.168.58.170).
    • Server Port: Enter the port number your TCP server is listening on (e.g., 9999).
  1. Click Submit to save the changes for the serial port.
  2. Finally, click Save & Apply at the top right of the main page to apply all pending changes.

Verification & Testing

To verify the configuration, we will use two simulator tools: a serial terminal to act as the end device and a TCP server tool to act as the receiving platform.

  1. Setup the Serial Device Simulator: Connect your PC to the router's serial port using a proper cable. Run a serial terminal emulator (like PuTTY). Configure it with the exact same serial parameters (Baud Rate, Data Bits, etc.) that you set in the router.
  1. Setup the TCP Server Simulator: On the computer designated as your server (192.168.58.170), run a TCP server tool and set it to listen on the configured port (9999).

  1. 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 server tool. This confirms that the gateway is correctly converting the serial data and transmitting it to the TCP server.

Troubleshooting / FAQ

  • Q: My data is not appearing on the TCP server. What should I check?
    • A:
    1. Physical Connections: Ensure the serial cable is securely connected to both the device and the router.
    2. Serial Parameters: Double-check that the Baud Rate, Data Bits, Stop Bits, and Parity in the router configuration exactly match the settings of your physical serial device.
    3. Network Connectivity: From the router's web interface (System > Tools > Ping), try to ping the TCP server's IP address to ensure there is a network path.
    4. Firewall: Check if any firewall on the server or network is blocking the TCP port you are using.
    5. IP/Port: Verify that the Server Address and Server Port entered in the router's serial configuration are correct.
  • Q: Can I use a domain name instead of an IP address for the Server Address?
    • A: Yes. The "Server Address" field supports both IP addresses and domain names. Ensure the gateway has a working DNS server configured to resolve the domain name.
  • Q: The router has both RS232 and RS485 ports. How do I select which one to use?
    • A: For some models, the serial port type can be selected in the software. Navigate to Interface -> Serial Port and check for a Port Type setting at the top of the page.

Revision History

Date

Version

Notes

2025-09-29

1.0

Initial release