Difference between revisions of "RS485 ETH PLUS"

From Diustou Wiki
 
Line 52: Line 52:
  
 
=== Default Configuration ===
 
=== Default Configuration ===
*[[File:ETH_默认配置.png|500px]]
+
*[[File:ETH_默认配置.png|800px]]
  
 
=== Product Testing ===
 
=== Product Testing ===

Latest revision as of 15:44, 6 February 2025

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

Categories: RS485 ETH

Brand: Diustou

Description
Features
  • RS485 ETH PLUS

Interfaces

RS485 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 RS485 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 setting of chip working mode, ports, IP, and other network parameters through host computer software or serial port commands.
  • Working modes include 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), effectively suppressing surge voltages and transient spike voltages in the circuit to protect downstream circuits and equipment.
  • Equipped with on-board GDT (Gas Discharge Tube), which can 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 RS485 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 RS485 or RS485 serial cable x1
  • RS485 ETH PLUS x1

Testing Method

Direct Connection with Computer
  • Hardware Connection:
    • Connect the RJ45 interface of the RS485 ETH PLUS module to the computer's Ethernet port using an Ethernet cable.
    • Connect the RS485 interface of the RS485 ETH PLUS module to the computer via a USB-to-RS485 module or an RS485 serial cable (direct connection: A+ to A, B- to B; GND is not connected for short-distance transmission).
    • Connect the Type-C interface of the RS485 ETH PLUS module to the computer's USB port using a Type-C cable for power supply.

RS485 ETH PLUS 硬件连接1.png

  • Install Driver:
  • View 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 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. Here, the module's default working mode 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 set when configuring the module. Here, it is the default value of 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 a Router
  • Hardware Connection:
    • Connect the Ethernet port of the RS485 ETH PLUS module and the computer's Ethernet port to the same router using Ethernet cables.
    • Connect the RS485 interface of the RS485 ETH PLUS module to the computer via a USB-to-RS485 module or an RS485 serial cable (direct connection: A+ to A, B- to B; GND is not connected for short-distance transmission).
    • Connect the Type-C interface of the RS485 ETH PLUS module to the computer's USB port using a Type-C cable for power supply.

RS485 ETH PLUS 硬件连接2.png

  • View Computer IP Address:
    • Control Panel (File Explorer -> Network and Internet -> Network and Sharing Center -> Double-click the network adapter -> Details -> View the computer IP (here it is 192.168.0.37)
      • ETH 产品测试1.png
      • ETH 产品测试2.pngETH 产品测试3.png
  • Install Driver:
  • Change 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 respectively. After making the changes, click "Configure Parameters" and wait for the setup to complete.
      • Device IP: Set it to an IP in the same segment as the computer. Here, the computer IP is 192.168.0.37, so set the module IP to 192.168.0.200. Also, when setting the IP address, ensure that the IP address is not already in use.
      • Gateway: Set it according to the IP address.
      • Destination IP: Set it according to the actual connected computer's IP address. Here, the computer IP is 192.168.0.37.
      • Destination Port Number: Modify as needed. Here, use the default value of 1000.
      • ETH 产品测试6.pngETH 产品测试5.png
    • After configuration, you can 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 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. Here, the module's default working mode 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.0.37.
      • Local Host Port: Set it according to the destination port number set when configuring the module. Here, it is the default value of 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 the TCP server. In TCP Server mode, the module listens on a local port, accepts and establishes connections for incoming connection requests, and communicates data. When data is received on the module's serial port, it is simultaneously sent 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 RS485 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 limit, 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, then search for the device. After finding the module, check if the set parameters 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 transparently transmitted data.
    • ETH 模式说明3.png

TCP CLIENT

  • TCP Client refers to the TCP client. It initiates connections proactively and connects to the 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 frequently 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 proactively 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 RS485 ETH PLUS should be set to random. This allows the RS485 ETH PLUS to access the server using a random port number, resolving issues where the server may judge the connection status as abnormal, block reconnection requests from the RS485 ETH PLUS, and lead to reconnection failures.
  • 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, then search for the device. After finding the module, check if the set parameters 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 listened port number as 1000. The network side of the testing 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 transparently transmitted data.
    • 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 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, then search for the device. After finding the module, check if the set parameters 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 listened 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 transmission protocol that provides a simple, unreliable message delivery service for transactions. It does not require the establishment or disconnection of connections; data can be sent to the other party simply by specifying the IP and port. 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 RS485 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, then search for the device. After finding the module, check if the set parameters 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 listened 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)