Difference between revisions of "RS232 ETH PLUS"

From Diustou Wiki
 
Line 37: Line 37:
  
 
== Product Selection ==
 
== Product Selection ==
*[[File:ETH_产品选型.png|1200px]]
+
*[[File:ETH_产品选型.png|1600px]]
  
 
== User Instructions ==
 
== User Instructions ==

Latest revision as of 15:42, 6 February 2025

RS232 ETH PLUS
RS232 ETH PLUS 示意图.png
Information

Categories: RS232 ETH

Brand: Diustou

Description
Features
  • RS232 ETH PLUS

Interfaces

RS232 ETH

Related products

Product Features

  • Utilizes the original CH9120 chip, which internally incorporates the Ethernet Media Access Control (MAC) layer and Physical (PHY) layer.
  • Enables bidirectional transparent transmission of RS232 serial port data and RJ45 Ethernet port data.
  • Supports 10M, full-duplex/half-duplex adaptive Ethernet interface, compatible with the 802.3 protocol.
  • Supports MDI/MDIX automatic line conversion, allowing for arbitrary connection of crossover or straight-through cables with automatic switching.
  • Supports DHCP for automatic IP address acquisition and DNS domain name access.
  • Allows configuration of chip working mode, ports, IP, and other network parameters through host computer software or serial port commands.
  • Supports four working modes: TCP CLIENT, TCP SERVER, UDP CLIENT, and UDP SERVER.
  • Supports the KEEPALIVE mechanism.
  • Supports serial port baud rates ranging from 300bps to 150000bps.
  • Equipped with on-board TVS (Transient Voltage Suppressor) to effectively suppress surge voltages and transient spike voltages in the circuit, protecting downstream circuits and equipment.
  • Equipped with on-board GDT (Gas Discharge Tube) to discharge powerful lightning currents into the ground, protecting subsequent circuits and equipment from surge impacts and damage.
  • Equipped with on-board digital isolators, featuring excellent performance characteristics and reliability for signal isolation, resulting in more stable signal transmission.
  • Equipped with on-board DC/DC power isolation, providing stable isolated voltage and output short-circuit protection, with no additional power supply required for the isolated end.
  • Equipped with three types of indicator lights:
    • Power indicator light (red): Remains on as long as the power supply is connected normally.
    • TX transmission indicator light (green): Flashes when data is received via the RJ45 Ethernet port.
    • RX reception indicator light (blue): Flashes when data is received via the RS232 interface.

Product Selection

  • ETH 产品选型.png

User Instructions

Function Introduction

  • CH9120 is a network-to-serial transparent transmission chip that enables bidirectional transparent transmission of serial data and network data. It supports four working modes: TCP CLIENT/SERVER and UDP CLIENT/SERVER. The serial port baud rate supports a range of 300bps to 921600bps. Before use, the network and serial port parameters of the chip need to be configured through host computer software. Once configured, CH9120 saves the configuration parameters to its internal storage space. After resetting, CH9120 will operate according to the saved configuration values.
  • The basic parameters of CH9120 include: name, MAC address display, automatic IP address acquisition setting, manual IP address setting (including CH9120 IP address, subnet mask, default gateway), and serial port negotiation configuration. The name is mainly for convenient management of CH9120 modules within the local area network, with a length not exceeding 20 bytes. The MAC address field displays the MAC address of the currently selected module. CH9120 has two ways to set network parameters:
    • 1) DHCP, which automatically obtains network parameters from a gateway device with DHCP SERVER functionality;
    • 2) Manual setting. The serial port negotiation configuration function refers to the ability to enter the serial port configuration mode through serial port handshaking, which is disabled by default.
  • The port parameters of CH9120 include: network mode, local port, target IP/domain name, destination port, serial port baud rate/data bits/stop bits/parity bits, network cable disconnection handling, RX packet length, RX packet timeout interval, and network connection operation. Network mode (TCP SERVER/CLIENT, UDP SERVER/CLIENT), destination IP address, and local/destination port are the basic parameters for network communication. The destination IP address can also be accessed using a domain name.
  • The serial port baud rate range of the chip is 300bps to 921600bps (the baud rate error of the serial port transmission signal is less than 0.5%, and the allowed baud rate error of the serial port reception signal is not less than 2%). It supports 5, 6, 7, or 8 data bits, as well as 1 or 2 stop bits. It supports odd, even, no parity, space 0, and mark 1 parity modes.
  • Network cable disconnection handling refers to whether CH9120 actively closes the connection internally or takes no action when the network cable is disconnected.
  • The RX packet length range is 1 to 512. When the serial port of CH9120 receives data of the set length, CH9120 will immediately package the serial port data and send it out through the network. The timeout setting range is 0 to 200, with a timeout unit of approximately 5ms. For example, when the timeout is set to 1, if the data length in the serial port reception buffer does not reach the RX packet length and no new data is received within 5ms, a serial port timeout occurs. After the serial port timeout, CH9120 will send the data received by the serial port out through the network. When the timeout is set to 0, an internal hardware timeout (no new data received for more than 4 data times) mechanism is enabled, which is suitable for scenarios with high real-time requirements and large-scale data transmission and reception.
  • The setting for clearing the serial port buffer refers to how to handle data received by the serial port before the network connection is established. It can be cleared (discarded) or retained when a TCP connection is established.

Default Configuration

  • ETH 默认配置.png

Product Testing

Note: If you encounter issues with Ethernet port connectivity, please try the following steps:

  • Disable the firewall and antivirus software on your computer (usually found in the Control Panel), and also close any security software such as Safe Guard if installed.
  • Check the hardware connections for any errors, such as ensuring the Ethernet port is securely connected and the Ethernet cable is functioning properly.
  • Verify that the IP address of your computer is on the same subnet as the IP address of the module.

Hardware Preparation

  • Type-C data cable x1
  • Ethernet cable x1
  • PC x1
  • USB to RS232 or RS232 serial cable x1
  • RS232 ETH PLUS x1

Testing Method

Direct Connection with Computer
  • Hardware Connection:
    • Connect the RJ45 interface of the RS232 ETH PLUS module to the Ethernet port of the computer using a network cable.
    • Connect the RS232 interface of the RS232 ETH PLUS module to the computer via a USB-to-RS232 module or an RS232 serial cable (crossover wiring: TXD (pin 2) - RXD, RXD (pin 3) - TXD, GND (pin 5) - GND).
    • Connect the Type-C interface of the RS232 ETH PLUS module to the USB port of the computer using a Type-C data cable for power supply.
    • RS232 ETH PLUS 硬件连接1.png

Note: If there is no RS232 serial module or cable, you can short-circuit pins 2 and 3 (TXD and RXD) together for self-transmission and reception testing after powering the module via a Type-C data cable or a 5V power module.

  • DB9-PIN.png
  • Install Driver:
  • Check Module Configuration:
    • Open the Network Configuration Software, click "Search Device", and the searched devices will appear in the dialog box above. Double-click the found device, and the configuration information of the corresponding device will appear below and to the right of the software.
      • Note: If it doesn't appear, try clicking "Refresh Network Card" and then "Search Device" again. If it still doesn't appear, please check the hardware connection.
      • ETH 产品测试4.png
  • Modify Computer IP Address:
    • Control Panel (File Explorer) -> Network and Internet -> Network and Sharing Center -> Double-click the network adapter -> Properties -> Internet Protocol Version 4 (TCP/IPv4) -> Properties -> Use the IP address below, configure the computer's IP address, subnet mask, and default gateway, then click OK.
      • IP Address: Set it to an IP in the same segment as the module. Here, use the module's default destination IP of 192.168.1.100.
      • Subnet Mask: Use the default setting.
      • Default Gateway: Set it according to the IP address.
      • ETH 产品测试1.png
      • ETH 产品测试14.png
    • After setting, you can check if the computer's IP is successfully set by going to Control Panel (File Explorer -> Network and Internet -> Network and Sharing Center -> Double-click the network adapter -> Details.
      • ETH 产品测试1.png
      • ETH 产品测试15.png
  • Communication Test:
    • Open the Serial Port Debugging Assistant, select the corresponding port (viewable through Device Manager), set the serial port baud rate (default for the module is 9600), stop bits (default is 1), data bits (default is 8), and parity (default is None), then open the serial port.
      • ETH 产品测试8.png
      • ETH 产品测试9.pngETH 产品测试10.png
    • Open the Network Debugging Assistant, configure the network parameters, click Open to establish a connection.
      • Protocol Type: Configure according to the module's working mode. The default working mode of the module here is TCP CLIENT, so set the protocol type to TCP Server.
      • Local Host Address: Set it according to the actual computer IP address. Here, the computer IP is 192.168.1.100.
      • Local Host Port: Set it according to the destination port number configured when setting up the module. The default here is 1000.
      • ETH 产品测试16.png
    • Use the network debugging assistant and serial port debugging assistant to send data respectively, and check if the data is correctly received on the other end.
      • ETH 产品测试18.png
      • ETH 产品测试17.png
Connecting to the Router
  • Hardware Connection:
    • Connect the Ethernet port of the RS232 ETH PLUS module and the Ethernet port of the computer to the same router using Ethernet cables.
    • Connect the RS232 interface of the RS232 ETH PLUS module to the computer via a USB-to-RS232 module or an RS232 serial cable (crossover wiring: TXD (pin 2) - RXD, RXD (pin 3) - TXD, GND (pin 5) - GND).
    • Connect the Type-C interface of the RS232 ETH PLUS module to the computer's USB port using a Type-C data cable for power supply.
    • RS232 ETH PLUS 硬件连接2.png

Note: If there is no RS232 serial module or cable, you can perform a self-transmission test by shorting pins 2 and 3 (TXD and RXD) together after powering the module via a Type-C data cable or a 5V power module.

  • DB9-PIN.png
  • Checking the Computer's IP Address:
    • Control Panel (File Explorer -> Network & Internet -> Network and Sharing Center -> Double-click the network adapter -> Details -> View the computer's IP address (e.g., 192.168.0.37)
      • ETH 产品测试1.png
      • ETH 产品测试2.pngETH 产品测试3.png
  • Installing the Driver:
  • Changing Module Configuration:
    • Open the Network Configuration Software, click "Search Device", and the searched devices will appear in the dialog box above. Double-click the searched device, and the configuration information of the corresponding device will appear below and to the right of the software.
      • Note: If it doesn't appear, try clicking "Refresh Network Card" and then "Search Device" again. If it still doesn't appear, please check the hardware connection.
      • ETH 产品测试4.png
    • Modify the device IP, gateway, destination IP, and destination port number. After making the changes, click "Configure Parameter Settings" and wait for the setup to complete.
      • Device IP: Set it to an IP in the same subnet as the computer. Here, the computer's IP is 192.168.0.37, so set the module's IP to 192.168.0.200. Also, ensure that the IP address is not already in use when setting it.
      • Gateway: Set the corresponding gateway based on the IP address.
      • Destination IP: Set it based on the actual IP address of the connected computer. Here, the computer's IP is 192.168.0.37.
      • Destination Port Number: Modify as needed. The default value of 1000 is used here.
      • ETH 产品测试6.pngETH 产品测试5.png
    • After configuration, click "Search Device" again, double-click the searched device, and check if the configuration was successful.
      • ETH 产品测试7.png
  • Communication Test:
    • Open the Serial Port Debugging Assistant, select the corresponding port (viewable via Device Manager), set the serial port baud rate (default is 9600), stop bits (default is 1), data bits (default is 8), and parity (default is None), and then open the serial port.
      • ETH 产品测试8.png
      • ETH 产品测试9.pngETH 产品测试10.png
    • Open the Network Debugging Assistant, configure the network parameters, click "Open" to establish a connection.
      • Protocol Type: Configure according to the module's working mode. The module's default working mode here is TCP CLIENT, so set the protocol type to TCP Server.
      • Local Host Address: Set it based on the actual computer IP address. Here, the computer's IP is 192.168.0.37.
      • Local Host Port: Set it based on the destination port number configured when setting up the module. The default value here is 1000.
      • ETH 产品测试11.png
    • Use the network debugging assistant and serial port debugging assistant to send data respectively, and check if the data is correctly received on the other end.
      • ETH 产品测试12.png
      • ETH 产品测试13.png

Mode Description

TCP SERVER

  • TCP Server refers to a TCP server. In TCP Server mode, the module listens on a local port, accepts and establishes a connection for incoming connection requests, and communicates data. When data is received on the module's serial port, it simultaneously sends the data to the client device connected to the module. This is typically used for communication with TCP clients within a local area network. Like TCP Client, it distinguishes between connected and disconnected states to ensure reliable data exchange.
  • When the module operates as a TCP Server, it first listens on the locally set port, responds to connection requests, and establishes connections. Upon receiving data on the serial port, it sends the data to the device connected to the RS232 ETH PLUS network port. It can accept up to 1 TCP Client connection.
  • When the module operates as a TCP Server, it actively listens on the local port number and does not monitor the connected IP addresses or port numbers. When the number of connections exceeds the maximum, it proactively disconnects the oldest connection.
  • Application Example:
    • Set the module's operating mode to TCP Server, with a local port number of 2000 and a remote port number set to random. Click to configure device parameters, and after setting, search for the device. Once the module is found, verify that the settings are correct.
      • ETH 模式说明2.png
    • Connect the module's network port to a PC's network debugging assistant, set the protocol type to TCP Client, with the PC's IP as 192.168.1.100 and the remote host address as 192.168.1.200:2000, and establish a connection.
    • Set the correct serial port parameters, click to open the serial port, click to send, and receive bi-directional data transmission.
    • ETH 模式说明3.png

TCP CLIENT

  • TCP Client refers to a TCP client. It initiates connections and connects to a server to facilitate data exchange between the serial port and the server. According to TCP protocol specifications, TCP Client distinguishes between connected and disconnected states to ensure reliable data exchange. It is commonly used for data exchange between devices and servers and is the most commonly used networking communication method.
  • When the module operates as a TCP Client, it needs to connect to a TCP Server. Key parameters to consider are the destination IP and destination port number, where the destination IP is for devices on the same local network.
  • When the module operates as a TCP Client, it actively connects to the target IP's target port and does not accept other connection requests.
  • When the module operates as a TCP Client, the local port number of the RS232 ETH PLUS should be set to random. This allows the RS232 ETH PLUS to access the server using a random port number, resolving issues where the server may block reconnection requests from the RS232 ETH PLUS due to abnormal connection status judgments.
  • Application Example:
    • Set the module's operating mode to TCP Client, with a destination IP of 192.168.1.100, a remote port number of 1000, and a local port number set to random. Click to configure device parameters, and after setting, search for the device. Once the module is found, verify that the settings are correct.
      • ETH 产品测试4.png
    • Connect the module's network port to a PC's network debugging assistant, set the protocol type to TCP Server, with the PC's IP as 192.168.1.100 and the listening port number as 1000. The network debugging software displays connection information: 192.168.1.200:2093 (randomly assigned port number).
    • Set the correct serial port parameters, click to open the serial port, click to send, and receive bi-directional data transmission.
    • ETH 模式说明1.png

UDP SERVER

  • UDP Server refers to a mode where, based on standard UDP, it does not verify the source IP address. After receiving a UDP data packet, it changes the destination IP to the source IP and port number. When sending data, it sends to the most recently communicated IP and port number.
  • This mode is typically used in network scenarios where multiple network devices need to communicate with the module, and due to high speed and frequency, TCP data transmission is not preferred.
  • Application Example:
    • Set the module's operating mode to UDP Server, with a destination IP of 192.168.1.100, a remote port number of 1000, and a local port number of 2000. Click to configure device parameters, and after setting, search for the device. Once the module is found, verify that the settings are correct.
      • ETH 模式说明4.png
    • Connect the module's network port to a PC's network debugging assistant, set the protocol type to UDP, with the PC's IP as 192.168.1.100 and the listening port number as 1000, and establish a connection.
    • Set the correct serial port parameters, click to open the serial port, click to send via serial port, and the network debugging assistant receives serial port data. The remote host then changes to the module's IP and port. Click to send via network, and send data to the serial port.
    • ETH 模式说明5.png

UDP CLIENT

  • UDP Client is a connectionless transport protocol that provides simple, unreliable message delivery services for transactions. It does not require establishing or disconnecting connections; it only needs to specify the IP and port to send data to the recipient. It is typically used in data transmission scenarios where packet loss rate is not a concern, data packets are small, transmission frequency is high, and data needs to be sent to a specific IP.
  • In UDP Client mode, the module only communicates with the target IP's target port number. If data does not come from this channel, it will not be received by the RS232 ETH PLUS.
  • Application Example:
    • Set the module's operating mode to UDP Client, with a destination IP of 192.168.1.100, a remote port number of 1000, and a local port number of 2000. Click to configure device parameters, and after setting, search for the device. Once the module is found, verify that the settings are correct.
      • ETH 模式说明6.png
    • Connect the module's network port to a PC's network debugging assistant, set the protocol type to UDP, with the PC's IP as 192.168.1.100 and the listening port number as 1000, and establish a connection.
    • Set the correct serial port parameters, click to open the serial port, click to send via serial port, and the network debugging assistant receives serial port data. The remote host then changes to the module's IP and port. Click to send via network, and send data to the serial port.
    • ETH 模式说明5.png

Software

Data Manuals

FAQ


Icon-mail.png Contact Diustou

Our working hours are: 09:00-18:00 (UTC+8 Monday to Saturday)