From Waveshare Wiki
Jump to: navigation, search







The 2-CH-CAN-TO-ETH is a CAN bus to Ethernet port server to realize data communication between the CAN device and the network server. Built-in 2-ch CAN ports, 1-ch Ethernet port, and TCP/IP protocol stack, allowing interconnection and communication between CAN-bus and Ethernet for expanding CAN-bus network range. Industrial grade metal case design supports wall-mount installation, compact in size, easy to install, and suitable for applications such as building automation systems, industrial automation systems, power monitoring, etc.


  • Upgraded hardware protection, with advanced protection for CAN, serial ports, Ethernet ports, and power supply, making it suitable for more demanding industrial environments.
  • Upgraded ARM kernel, industrial grade operating temperature range, advanced TCP/IP protocol stack, stable and reliable.
  • 10/100Mbps Ethernet port, support Auto-MDI/MDIX, supports Auto-MDI/MDIX.
  • Support CAN ID filtering function, multiple filtering methods, safer and more convenient.
  • Support 2-ch SOCKET connection at one port.
  • CAN baud rate: 10K~1Mbps; support BASIC and LOOPBACK working method.
  • Supports static IP addresses or DHCP for automatic IP address assignment, and devices within the network can be queried using the UDP broadcast protocol.
  • Reload button, one key to restore the default setting, no worry for wrong setting.
  • RJ45 with Link/Data indicator lights, external isolation transformer for the network port, providing 1.5KV electromagnetic isolation.
  • Global only MAC address (begin with D8-B0-4C).
  • Support upgrading the firmware through the network, more convenient to update the firmware.
  • Support modification via webpage port (80 by default).
  • Supports the keepalive mechanism, enabling rapid detection of dead connections and other abnormalities, facilitating quick reconnection.
  • Supports account and password authentication for enhanced security, applicable for webpage login and network settings.
  • The power interface accommodates 5.08-2 wiring terminals, supporting wide voltage input (5~36V).
  • CAN relay functionality.
  • Support CAN to 485.


Type Industrial dual CAN to Ethernet server
Device port CAN/RS485/ETH
Hardware Operating voltage DC 5~36V
Operating current 26mA(avg)36V
Power protection Power supply surge level 3, Group pulse level 3
Ethernet port RJ45, 10/100Mbps, supports Auto-MDI/MDIX
Ethernet port protection 1.5KV eletromagnetic isolation
Serial port support RS485
Serial port baud rate 600bps~115.2Kbps
CAN baud rate 10Kbps~1Mbps
CAN working method Basic, Loopback
CAN Protection Power isolation, signal isolation
Software Network protocol IPV4, TCP/UDP
IP acquisition method Static IP, DHCP
Configuration method Webpage configuration, Serial/Network AT command
TCP Server connection Supports up to 4-ch TCP connection
CAN receiving capability 8000 frames/s (per channel)
CAN transmitting capability 8000 frames/s (per channel)
120Ω resistor built-in (enabled by switch)
Network cache transmitting: 16 Kbytes (total)
receiving: 16 Kbytes (total)
CAN cache transmitting: 200 complete data packets (per channel)
receiving: 200 complete data packets (per channel)
Serial port cache transmitting: 2Kbyte; receiving: 2Kbyte
Flow control None
Heartbeat packet/registration packet Supports user-defined heartbeat packet (CAN data packet that complaints with transparent transmission protocol)
Supports user-defined, mac, Transparent Transmission Cloud registration packet
Average transmission delay <20ms
Software Configuration software, VCOM (without auto-search function)
OTHERS Operating temperature -40~85℃ (industrial grade)
Storage temperature -40~105℃
Operating humidity 5~95%RH (no condensation)
Storage humidity 5~95%RH (no condensation)
Dimensions 96.5×94.0×25.0mm

Interface Introduction

2-CH-CAN-TO-ETH Interface.jpg


2-CH-CAN-TO-ETH Dimensions.jpg

Quick Start

The 2-CH-CAN-TO-ETH module is designed for bidirectional transparent transmission of data between serial ports and Ethernet ports, relieving users from the need to worry about specific details as the module internally handles protocol conversion. Parameters can be configured either through the built-in web page or via dedicated software, and settings are permanently stored after configuration. The Quick Start section provides a swift introduction to understanding the basic features of the 2-CH-CAN-TO-ETH module.

Hardware Connection

  • Hardware Preparation:
  1. 2-CH-CAN-TO-ETH
  2. USB-CAN-B
  3. Network cable
  4. 12V1A DC power cable
  5. 4 x dual male, Dupont wires
  • Connect to USB-CAN-B device (the following is to connect the CAN interface of the USB-CAN-B)
CAN1 - L CAN1 - L
CAN1 - H CAN1 - H
  • The following is to connect the CAN 1 of the 2-CH-CAN-TO-ETH to the CAN2:
CAN1 - L CAN2 - L
CAN1 - H CAN2 - H
  • The 2-CH-CAN-TO-ETH module uses a standard Ethernet cable for network connection, allowing direct connection to a computer or connection to a network via a switch. After verifying the hardware connection is error-free, it can be powered up for testing by connecting the power supply.

2-CH-CAN-TO-ETH 07.jpg

Indicator Status

  • POWER indicator : power indicator, light on when the power connection is normal.
  • WORK indicator: Work indicator, 2-CH-CAN-TO-ETH working status indicator, only when 2-CH-CAN-TO-ETH is in normal working status, the indicator blinks; if this indicator is always on or always off, the 2-CH-CAN-TO-ETH is in abnormal working status, need to power off and reboot.
  • CAN1 indicator:2-CH-CAN-TO-ETH CAN1 TX/RX indicator, the red indicator blinks when sending data, the blue indicator blinks when receiving data.
  • CAN2 indicator:2-CH-CAN-TO-ETH CAN2 TX/RX indicator, the red indicator blinks when sending data; the blue indicator blinks when receiving data.
  • RS485 indicator :2-CH-CAN-TO-ETH RS485 TX/RX indicator, the red indicator blinks when sending data; the blue indicator blinks when receiving data.

Network Test Environment

To prevent issues such as inability to detect, ping failure, or inability to open web pages in the application, perform the following checks on the computer after establishing hardware connections:

  • Disable the computer's firewall and antivirus software (usually found in the control panel).
  • Disable any network cards unrelated to the current test, leaving only one local connection active.
  • Set the computer's IP address to a static one within the same network segment as the 2-CH-CAN-TO-ETH, for example,


Default Parameter Test

Project Content
Subnet mask code
Default gateway
CAN1 SOCKET A local port 20001,TCP Server
CAN2 SOCKET A local port 20005,TCP Server
CAN1 baud rate 1Mbps
CAN2 baud rate 1Mbps
Serial port parameters 115200, N, 8, 1
User name admin
Password admin

Data Transmission Test

After confirming the above steps are error-free, you can proceed with bidirectional communication between CAN and the Ethernet port. Follow the steps below:

  • Open the testing software "USR-TCP232-Test.exe".
  • In the network settings section, choose TCP Client mode. Enter the Server IP address as and the Server Port as 20001. Click on "Connect" to the CAN1 of the 2-CH-CAN-TO-ETH .

2-CH-CAN-TO-ETH Data.png

  • Open USB-CAN Tool, and open CAN1, set the CAN1 baud rate as 1Mbps, and the working method is normal.

2-CH-CAN-TO-ETH Data2.png
2-CH-CAN-TO-ETH Data3.png
2-CH-CAN-TO-ETH Data4.png

  • Start to test the communication, and send CAN message to the CAN1 of the 2-CH-CAN-TO-ETH through USB-CAN-B, observe if the TCP Client connected to 2-CH-CAN-TO-ETH CAN1 on the USR-TCP232-Test network test software receives the message.

2-CH-CAN-TO-ETH Data5.png
2-CH-CAN-TO-ETH Data6.png

  • Then, send a message to 2-CH-CAN-TO-ETH through the TCP Client on the USR-TCP232-Test network test software, and 2-CH-CAN-TO-ETH converts the message into a CAN message and sends it to USB-CAN-B. Check whether the USB-CAN Tool receives the message.

2-CH-CAN-TO-ETH 15.png
2-CH-CAN-TO-ETH 16.png

  • Then, open another USR-TCP232-Test network test software, select TCP Client mode in NetSettings, input in Server IP, enter 20005 in Server Port, and click to connect the CAN2 of the 2-CH-CAN-TO-ETH.

2-CH-CAN-TO-ETH Data7.png

  • Start to test the communication, send CAN message to the CAN1 of the 2-CH-CAN-TO-ETH through USB-CAN-B, observe if the TCP Client connected to the CAN1 and CAN2 of the 2-CH-CAN-TO-ETH on the USR-TCP232-Test network test software receives the message.

2-CH-CAN-TO-ETH Data8.png

Product Function

  • This chapter introduces the functions of 2-CH-CAN-TO-ETH. The overall functional block diagram of the module is shown in the following figure, which can help you have a general understanding of the product. CAN1 and CAN2 have the same functions, and all features are supported. The functional diagram is not repeated for CAN1 and CAN2.

2-CH-CAN-TO-ETH Function.jpg

Network Basic Function


2-CH-CAN-TO-ETH comes with a built-in web server. Similar to conventional web servers, users can set parameters and view the module's relevant status through the web interface. The web server defaults to using port 80. Additionally, 2-CH-CAN-TO-ETH provides the functionality to modify this port. After modification, the built-in web page can be accessed through other ports, facilitating situations where access is restricted on port 80 within the local network.

  • 2-CH-CAN-TO-ETH comes with a built-in web server, the module parameters can be set and queried through the web server.
  • Webpage setting parameters: Login to the 2-CH-CAN-TO-ETH web page via a browser to set the parameters of the 2-CH-CAN-TO-ETH web page.
Username admin
Password admin

2-CH-CAN-TO-ETH 06.png2-CH-CAN-TO-ETH 08.png

Restore Factory Settings Function

Hardware Factory Reset: The module can be reset to factory settings through a hardware process. After powering up the module, press and hold the Reload button, then release it within 3 to 15 seconds to initiate the hardware factory reset.
Software Factory Reset: Factory settings can be reset through software or network protocol settings.
AT Command Factory Reset: Refer to the AT command documentation. In AT command mode, send the command "AT+RELD". Upon receiving a correct response, the factory reset is successful.

Upgrade Webpage Firmware

Network upgrading of firmware is reliable and easy. Experience new features by upgrading new firmware to meet the higher needs of customers.

  • Search for the module in the WS-CANNET management software, check the module, and then click manual upgrade firmware.

2-CH-CAN-TO-ETH 20.png

  • Select the desired firmware and click Start upgrade, the device IP, MAC, and local IP parameters will be added automatically.

2-CH-CAN-TO-ETH 21.png

  • Hardware factory reset after the upgrade is complete.


2-CH-CAN-TO-ETH 22.png

CAN Basic Parameters

  • CAN requires two parameters to be set: baud rate and operating mode.
  • CAN baud rate: 10K~1Mbps, configurable.
  • CAN operating mode: normal and loopback. In normal mode, the module can both receive and send data as expected. However, in loopback mode, the data sent is looped back to be received by the module itself. It is also transmitted onto the CAN bus, but the data is not sent into the module. This mode is primarily used for testing purposes.

CAN Packaging Mechanism

As the data of the network is transmitted in data frames, it is necessary to package CAN data into frames for efficient and rapid data transfer to the network. 2-CH-CAN-TO-ETH can package the data received from CAN based on packaging time and the number of frames to be packaged.
2-CH-CAN-TO-ETH 43.png
The CAN packaging mechanism is based on packaging time and packaging length. If either of the conditions is met, the data will be packaged and sent.
Package time: 10ms by default, configurable, range: 1~255.
Package length: 50 frames by default, configurable, range: 1~50.

CAN ID Filtering

There are a total of four CAN ID filtering modes to choose from:

  • Extended frame receiving range: in this mode, the module only receives the extended frame ID within the receiving range, and filters out the standard frames.
  • Extended frame filtering range: set the filtering range of the extended frames, only filter out the extended frames within the ID range, and receive all the standard frames.
  • Standard frame receiving range: only receives the standard frame ID within the received range, filter out the extended frames.
  • Standard frame filtering range: set the standard frame filtering range, only filter out the standard frames within the ID range, and receive all the extended frames.

All settings have ranges that include boundaries.

CAN Data Transparent Transmission Protocol


For example:
CAN to Ethernet:
CAN transmits
Frame format: extended frame  
Frame type: data frame  
ID: 12345678
Data: 12 34 56 78 00
Ethernet receives: 85 12 34 56 78 12 34 56 78 00 00 00 00
0x85 Indicates that the frame format is an extended frame, the frame type is a data frame, and the data length is 5.<br>
The last four bits indicate that the CAN ID is 12345678.<br>
The last 8 bits represent the data area, with an effective length of 5; the remaining bits are padded with zeros.
Ethernet to CAN:
Ethernet transmits: 05 00 00 06 78 12 34 56 78 00 00 00 00
0x05 indicates the standard frame, the frame type is the data frame, and the data length is 5. 
00 00 06 78 indicates the ID is 0678.
12 34 56 78 00 00 00 00 is the data area, the effective length is 5.

UART Function

2-CH-CAN-TO-ETH 23.png

UART Basic Parameters

UART's basic parameters include baud rate, data bit, stop bit, and parity bit.

  • UART baud rate: serial communication rate, 600~115.2Kbps, configurable.
  • Data bit: the length of the data bit, range: 5~8.
  • Stop bit: configurable range: 1~2.
  • Parity bit: the parity bit of data communication, support None, Odd, Even, Mark, and Space.

By setting the parameters of the serial port and keeping the same parameters with the serial port of the device connected to the serial port, you can ensure the normal operation of the license.

UART Frame Mechanism

2-CH-CAN-TO-ETH 45.png

  • Serial framing mechanism is based on packaging time and packaging length. Data will be packaged and sent if either condition is met.
  • Serial packaging time: Default is 10ms, configurable within the range of 1 to 255.
  • Serial packaging length: Default is 500 bytes, configurable within the range of 1 to 1460.

Socket Function

The operating modes of the 2-CH-CAN-TO-ETH are TCP Client, TCP Server, UDP Client, and UDP Server. It can be configured through the web page and configuration software. The configuration interface is as follows:
2-CH-CAN-TO-ETH 24.png
2-CH-CAN-TO-ETH 25.png
Reference AT command set:

Command Name Description
AT+SOCKAN Sets 2-CH-CAN-TO-ETH SOCKA protocol/target IP/target port
AT+SOCKBN Sets 2-CH-CAN-TO-ETH SOCKB protocol/target IP/target port

TCP Client Mode

2-CH-CAN-TO-ETH 46.png

  • TCP Client provides a client-side connection for TCP network services. It actively initiates a connection to the server for the interaction of serial port data and server data. According to the relevant specifications of the TCP protocol, there is a distinction between connecting and disconnecting in TCP Client, ensuring reliable data exchange. This mode is commonly used for data interaction between devices and servers, making it the most commonly used networking communication method.
  • This mode has the function of actively identifying connection abnormalities. After the connection is established, KeepAlive probe packets are sent at approximately 30-second intervals. If there is an abnormal interruption in the connection, it will be immediately detected, prompting 2-CH-CAN-TO-ETH to disconnect the original connection and reconnect.
  • In the same local area network, if 2-CH-CAN-TO-ETH is set to a static IP, please set the IP of 2-CH-CAN-TO-ETH to the same subnet as the gateway and correctly set the gateway IP address; otherwise, normal communication may not be possible.

TCP Server Mode

2-CH-CAN-TO-ETH 51.png

  • TCP Server: In TCP Server mode, the module listens on the local port. When a connection request is received, it accepts and establishes a connection for data communication. When the module's serial port receives data, it simultaneously sends the data to all client devices connected to the module. TCP Server mode also features the KeepAlive function for real-time monitoring of the connection integrity.
  • Typically used for communication with TCP clients within a local area network. It is suitable for scenarios where there is no server within the local area network, and multiple computers or mobile phones request data from the module. Similar to TCP Client, it has a distinction between connecting and disconnecting to ensure reliable data exchange.
  • 2-CH-CAN-TO-ETH As a TCP server, the CAN corresponding SOCKET can accept up to 4 client connections. The corresponding SOCKET of the serial port can support up to 1 Client connection.

UDP Client Mode

2-CH-CAN-TO-ETH 49.png

  • This operating mode is subordinate to the UDP protocol.
  • UDP Client is a connectionless transmission protocol that provides a simple and unreliable transaction-oriented information delivery service. It does not establish or disconnect connections; you only need to specify the IP and port to send data to the other party. It is typically used in scenarios where packet loss is not critical, the data packets are small, sent frequently, and need to be transmitted to a specified IP address.
  • In UDP Client mode: the 2-CH-CAN-TO-ETH only communicates with the target IP COM port, and if the data is not from this channel, the data will not be received by the 2-CH-CAN-TO-ETH.
  • In this mode, by setting the target address as, you can achieve UDP broadcast across the entire network segment. Additionally, the module can receive broadcast data. Setting the target address to xxx.xxx.xxx.255 will achieve UDP broadcast within the network segment.
  • The recommended packet size for the PC in UDP mode is no more than 650 bytes, i.e. 50 CAN frames. The amount of UDP packets sent is less than 4000 CAN frames per second.

UDP Server Mode

2-CH-CAN-TO-ETH 50.png

  • UDP Server means that it does not verify the source IP address based on normal UDP, changes the destination IP to the data source IP and port number after each UDP packet is received, and sends the data to the IP and port number of the most recent communication.
  • This mode is typically used in data transfer scenarios where multiple network devices need to communicate with the module and do not want to use a TCP connection due to the high frequency of speeds.

Feature Function

Heartbeat Packet Function

In network transparent transmission mode, users can choose to enable 2-CH-CAN-TO-ETH to send heartbeat packets. Heartbeat packets can be sent to the network server or the CAN/serial port devices. The primary purpose of sending to the network side is to maintain the connection with the server and it only takes effect in TCP Client and UDP Client modes. In applications where the server sends fixed query commands to the device, users can choose to have 2-CH-CAN-TO-ETH send heartbeat packets (query commands) to reduce communication traffic instead of sending query commands from the server.

Heartbeat Packet Description
CAN Heartbeat Packet The heartbeat packet can be used as a fixed query command and sent to the CAN interface. The CAN heartbeat packet is a complete CAN frame, and its configuration should comply with the CAN to Ethernet data protocol.
Network Heartbeat Packet The heartbeat packets are used to maintain the connection and only take effect in TCP Client and UDP Client modes. The heartbeat packets for different ports are determined by their corresponding peripherals. The network heartbeat packet for CAN corresponds to a CAN frame, while the network heartbeat packet for the serial port corresponds to a serial port heartbeat packet.
Serial Heartbeat Packet The sending enable, time interval and content of heartbeat packets can be configured through both the configuration software and the web interface.

Each CAN port supports heartbeat packets for CAN or the network. The content of heartbeat packets must comply with the CAN to Ethernet protocol and can have the direction of either CAN or the network. The CAN heartbeat packet and serial port heartbeat packet have fixed intervals, while the network heartbeat packet restarts its timer whenever there is data transmission.

  • Heartbeat packet setting:

Both the setup software and the web page can be used to set the enable, interval, and content of heartbeat packets.
CAN and corresponding network heartbeat packet setting content for a complete CAN frame, time interval setting range: 1-65535s.
The content of the serial port and corresponding network heartbeat packets can be any data within 40 bytes, and the time interval can be set within the range of 1 to 65535s.

  • Heartbeat packet default parameters:

CAN and the corresponding network: extended frame, data frame, and the ID is 0x12345678, the data area is 0x0102030405060708, and the time interval is 30S.
UART and the corresponding network: the content is www.waveshare.com, and the time interval is 30S.
2-CH-CAN-TO-ETH 26.png

  • Use the USB TO RS485 tool to connect the RS485 interface of the 2-CH-CAN-TO-ETH, and open the USR-TCP232-Test to test whether receives the heartbeat packets.

2-CH-CAN-TO-ETH 31.png

CAN Relay Function

  • Mode Description:

The CAN relay function is primarily designed to address the contradiction between the CAN network transmission rate and distance, as well as to expand the number of communication networks. 2-CH-CAN-TO-ETH integrates the CAN relay function, and after configuration, it only requires power to operate. In relay mode, both CAN to Ethernet and CAN to serial port functions will be disabled. Additionally, in the serial port to Ethernet function, only one-way transparent transmission from the network to the serial port is supported. Data received on CAN1 will be directly transmitted through CAN2, and data received on CAN2 will be transmitted through CAN1. Baud rate conversion can be performed when configuring different baud rates.

  • Relay Usage:

Log in to WebServer, Specific Function -> TurnKing -> ON.
2-CH-CAN-TO-ETH 27.png
The hardware connection is shown below:


CAN1 - L CAN1 - L
CAN1 - H CAN1 - H
CAN2 - L CAN2 - L
CAN2 - H CAN2 - H

Open the USB-CAN Tool and CAN1, set the CAN1 baudrate as 1Mbps, and set the CAN2 baudrate as 1Mbps. Click CAN1 to send the message to the CAN1 of the 2-CH-CAN-TO-ETH, and after the CAN 1 of the 2-CH-CAN-TO-ETH receiving, it directly sends through the CAN2, and the CAN2 of the USB-CAN-B receives.
2-CH-CAN-TO-ETH 28.png

CAN To RS485 Function

This function converts CAN messages received by the CAN port of the 2-CH-CAN-TO-ETH into RS485 messages and sends them out as follows:
Log in to WebServer, Specific Function -> CAN to RS485 -> ON
2-CH-CAN-TO-ETH 29.png
Use the USB TO RS485 Tool to connect the RS485 interface of the 2-CH-CAN-TO-ETH, and use the CAN1 of the USB-CAN-B to connect the CAN1 of the 2-CH-CAN-TO-ETH for testing.
The hardware connection is shown below:

CAN1 - L CAN1 - L
CAN1 - H CAN1 - H
A+ A+
B- B-

Open the software to test and verify:
2-CH-CAN-TO-ETH 30.png

Function Test


This part tests the CAN bus of the 2-CH-CAN-TO-ETH to Ethernet TCPClient function. Click on #Quick Start to refer to the CAN to TCPServer test.

Hardware Connection

  • Hardware Preparation:

3. Network cable
4. 12V1A DC power cable
5. Dual-male plug cables x2

  • Connect to the USB-CAN-B device (the following is to connect the CAN interface of the USB-CAN-B):
CAN1 - L CAN1 - L
CAN1 - H CAN1 - H
  • 2-CH-CAN-TO-ETH is connected to the network through a standard Ethernet cable, and it can be directly connected to a computer or connected to the network through a switch. After confirming the hardware connection is error-free, it can be powered on for testing.

Webpage Configuration

  • Firstly, you need to configure #Network Test Environment and log in to the webpage to set the parameters of the 2-CH-CAN-TO-ETH.

2-CH-CAN-TO-ETH 06.png

  • Log in to the WebServer, Set -> CAN1 -> Network -> Wor kmode -> TCP Client -> Save & Apply.

2-CH-CAN-TO-ETH 33.png

  • After saving, and reboot the device.

Communication Test

After confirming the above steps, the communication between CAN and Ethernet port can be performed as follows:

  • Open the test software "USR-TCP232-Test-V1.3".
  • Select TCP Server mode in the Network Setup area, enter for the Local host IP address, enter 20001 for the Local host Port, and click Connect 2-CH-CAN-TO-ETH CAN1.

2-CH-CAN-TO-ETH 32.png

  • Start the communication test, send the CAN message to the CAN1 of the 2-CH-CAN-TO-ETH through the USB-CAN-B, and observe whether the TCP server of the USR-TCP232-Test receives the message.

2-CH-CAN-TO-ETH 34.png

  • Send the message to the 2-CH-CAN-TO-ETH through the TCP server of the USR-TCP232-Test, 2-CH-CAN-TO-ETH converts it to the CAN message and sends it to the USB-CAN-B, observe whether the USB-CAN Tool receives the message.

2-CH-CAN-TO-ETH 35.png


This section tests the RS485 to Ethernet TCP Server function of the 2-CH-CAN-TO-ETH.

Hardware Connection

  • Hardware Preparation:

2. USB TO RS485 (B)
4. Network cable
5. 12V1A DC power cable
6. Dual-male plug cables x2

  • Connect to the USB TO RS485 device (the following is to connect the RS485 interface of the USB TO RS485):
A+ A+
B- B-
  • 2-CH-CAN-TO-ETH network port is connected to an ordinary network cable, which can be directly connected to the computer or connected to the network through the switch, and after detecting no error in the hardware connection, it can be connected to the power cord for testing.

Webpage Configuration

2-CH-CAN-TO-ETH 06.png

  • After logging in to the WebServer, Set -> Serial -> Network -> Wor kmode -> TCP Server -> Save & Apply.

2-CH-CAN-TO-ETH 36.png

  • After saving, reboot the device.

Communication Test

After confirming that the above steps are correct, two-way communication between RS485 and the Ethernet port can be performed as follows:

  • Open the test software "USR-TCP232-Test-V1.3".
  • The network setting area selects the TCP Client mode, input "" in the Server IP, input "20003" in the Server Port, and click to connect to the 2-CH-CAN-TO-ETH. Open the serial port to connect to the USB TO RS485 (B).

2-CH-CAN-TO-ETH 37.png

  • Start the communication test by sending 485 messages to 2-CH-CAN-TO-ETH via USB TO RS485 (B), and observe whether the TCP Client on the USR-TCP232-Test network test software receives the messages.

2-CH-CAN-TO-ETH 39.png

  • Then send a message to 2-CH-CAN-TO-ETH through the TCP Client on the USR-TCP232-Test network test software, and 2-CH-CAN-TO-ETH will convert it into a 485 message to be sent to USB TO RS485 (B), and observe whether the serial port receives the message or not.

2-CH-CAN-TO-ETH 38.png

Parameter Setting

This chapter mainly discusses how to configure the parameters of 2-CH-CAN-TO-ETH to achieve personalized applications. The methods for setting parameters in 2-CH-CAN-TO-ETH include using configuration software, the built-in web page, and configuring parameters through the serial port. To ensure the proper use of the configuration software, the following steps need to be taken:

  • When using the setting software to configure the parameters, you must ensure the 2-CH-CAN-TO-ETH and the PC with this setting software use the same LAN.
  • Turn off antivirus software and firewalls on your computer.
  • Turn off network cards that are not relevant to this test.

Configure Software

2-CH-CAN-TO-ETH 52.png
1: The Functional Area: allows you to choose between network operations and serial port operations. Under network operations, you can refresh the device list and perform firmware upgrades. The Import/Export feature allows you to export the content of the parameter area to the computer or import parameters from a backup on the computer.
2: The Device List Area: displays all devices found during network search. If not all devices are shown, you can refresh the list.
3: The Parameter Display and Operation Area: show the parameters of the queried 2-CH-CAN-TO-ETH device and allow for parameter modification.
4: The Operation Log Area: displays all operations in a log format.
5: The Button Operation Area: allows for button operations, sending control commands, or querying commands.
6: The Custom Data Transmission Area: allows you to send arbitrary data to the module.


Open the setup software and click the Refresh Device List button to search all 2-CH-CAN-TO-ETHs in your LAN. The search information includes the current IP of the 2-CH-CAN-TO-ETH, the device name, the MAC address, and the version number of the 2-CH-CAN-TO-ETH.
2-CH-CAN-TO-ETH 53.png

Query and Setting

Clicking on the discovered content will automatically query the parameters of the module, and you can observe the log information through the log panel on the right. Click on the parameter you want to modify, make the necessary changes, and then click on a blank area to automatically apply the settings.
2-CH-CAN-TO-ETH 54.png

Serial Port Operation

  • When setting parameters through the serial port, you need to select the serial port operation at the top. It is crucial to ensure that you correctly identify the corresponding serial port number for the module. Unlike network operations, serial ports cannot be searched automatically. Users need to manually select the correct module based on the assigned serial port number.
  • After opening the serial port, click on "Enter Configuration Mode" and then click on "Read Parameters" to retrieve all parameters of the module. Once settings are completed, parameters will take effect upon restart. If you don't want the changes to take effect immediately, you can choose to exit configuration mode.
  • When you finish modifying the serial port operation parameters, click the blank space to finish the setting automatically.

2-CH-CAN-TO-ETH 55.png

Webpage Setting Parameters

To access the login interface of 2-CH-CAN-TO-ETH through a web browser, open the browser and enter the default IP address (; or the modified IP address if changed). After entering the IP address, the login page for 2-CH-CAN-TO-ETH will appear. Enter the username as "admin" and the password as "admin", then click on the login button to access the interface. If you have changed the web page port number, be sure to include the colon and the port number in the browser address (e.g., 2-CH-CAN-TO-ETH 08.png
1. Basic information about the current status page:

  • Firmware version
  • the current IP
  • MAC address
  • Accumulated runtime: from power-up of 2-CH-CAN-TO-ETH

2. Local IP setting:
Under the Network tab, there is an IP Settings page, where you can set the IP acquisition method and static IP settings, and save the parameters when you are done with the settings, the parameters of the web page need to take effect after the module is rebooted. 2-CH-CAN-TO-ETH 56.png

AT Command Configuration

Network AT Command Introduction

  • Network AT Command: In command mode, users transmit commands to the module via the Ethernet port. The command set in detail is identical to the command set for serial port communication.
  • Network AT command mode: The network AT commands require that the module and the computer are on the same network segment to be able to configure settings via network AT commands.

Through the WS-CANNET V1.1.0 tool, UDP broadcast sends " www.waveshare.com" (by default, configurable). If the module and the computer are on the same network segment, you will receive a response from the module. This indicates that the module has entered the network AT command mode, and you can proceed to configure parameters by issuing AT commands. Upon entering the AT command mode, if no commands are sent within 30 seconds, the module will automatically exit the network AT command mode.

2-CH-CAN-TO-ETH 69.png 2-CH-CAN-TO-ETH 68.png

Serial AT Command

  • Serial AT commands refer to the set of commands transmitted by users to the module via UART in command mode. Later, I will explain in detail the usage format of AT commands.

After successful power-on initialization, you can configure the module via UART. The default parameters for the module's UART port: 115200 baudrate, no parity, 8 data bits, and 1 stop bit.
For AT command debugging, you can use the UART interface provided by the WS-CANNET V1.1.0 tool. The following demonstrations and explanations will all utilize UART communication and the WS-CANNET V1.1.0 tool.
To switch from transparent mode to command mode, you need to follow these two steps:

1. On the UART interface, input "+++". Upon receiving "+++", the module will respond with a confirmation code "a".
2. Input the confirmation code "a" on the UART interface. Upon receiving the confirmation code, the module will respond with "+OK" to confirm and enter the command mode.

  • Connect the RS485 interface of the 2-CH-CAN-TO-ETH to the PC, open WS-CANNET V1.1.0, select "Operate via Serial Port," choose the correct COM port, and enter configuration mode.

2-CH-CAN-TO-ETH 61.png
2-CH-CAN-TO-ETH 62.png

  • Enter config mode, you can use AT commands.

2-CH-CAN-TO-ETH 64.png

  • If entering configuration mode fails, then restart it and try to enter configuration mode again.

2-CH-CAN-TO-ETH 63.png

When entering "+++" and confirmation code "a", there will be no echo. The input of "+++" and "a" needs to be completed within a certain time frame to reduce the probability of accidentally entering command mode during normal operation. The specific requirements are as follows:
2-CH-CAN-TO-ETH 65.png
T1 > Serial port packet interval
T2 < 300ms
T3 < 300ms
T5 < 3s
The timing sequence for switching from transparent mode to temporary command mode is as follows:
1. When the serial port device sends "+++" continuously to the module, upon receiving "+++", the module will respond with a single 'a' to the device. No data can be sent during the packaging time before sending "+++".
2. Once the device receives 'a', it must send 'a' to the module within 3 seconds.
3. After receiving 'a', the module sends "+OK" to the device and enters "AT command mode".
4. When the device receives "+OK", it knows that the module has entered the "AT command mode" and can send AT commands to it.
Timing of switching from AT command mode to network transparent transmission mode:
1. The serial device sends the command "AT+ENTM" to the module.
2. Upon receiving the command, the module echoes "+OK" and returns to the previous operating mode.

AT Error Prompt Symbol

Error Code Table

Error Code Description
EER1 Invalid command format
EER2 Invalid command
EER3 Invalid operator
EER4 Invalid parameters
EER5 Operation not allowed
EER6 Not in AT command mode

AT Command Set

AT+ Command Set Table

Command Description
E Query/Set Echo
Z Reset the module
VER Query the module version number
ENTM Enter transparent mode
MAC Query module MAC
RELD Restore the default setting of the module
WANN Query/Set WAN port parameter
DNS Query/Set DNS address
WEBU Query/Set webpage username and password
WEBPORT Query/Set webpage port number
SEARCH Query/Set searching key word
MID Query/Set module name
PLANG Query/Set webpage language
CAN1 Query/Set CAN1 paprameters
CAN2 Query/Set CAN2 parameters
CANPKT1 Query/Set CAN1 custom packaging parameters
CANPKT2 Query/Set CAN2 custom packaging parameters
UART1 Query/Set serial port 1 parameters
UARTTL1 Query/Set serial port 1 packaging parameters
SOCKA1 Query/Set serial port 1 network SOCKET A parameters
SOCKB1 Query/Set serial port 1 network SOCKET B parameters
HEARTDIR1 Query/Set serial port 1 heartbeat packet status
HEARTTM1 Query/Set serial port 1 heartbeat packet sending interval
HEARTUSER1 Query/Set serial port 1 heartbeat packet content and format
REGEN1 Query/Set serial port 1 registration packet types
REGTCP1 Query/Set serial port 1 registration packet location
REGUSER1 Query/Set serial port 1 customize registration packet content and format
REGCLOUD1 Query/Set serial port transparent cloud parameters
SOCKA2 Query/Set CAN1 network SOCKETA parameters
SOCKB2 Query/Set CAN1 network SOCKETB parameters
SOCKA3 Query/Set CAN2 network SOCKETA parameters
SOCKB3 Query/Set CAN2 network SOCKETB parameters
CANHEARTEN1 Query/Set CAN1 heartbeat packet status
CANHEARTTM1 Query/Set CAN1 heartbeat packet time interval
CANHEARTUSER1 Query/Set CAN1 heartbeat packet content
CANHEARTEN2 Query/Set CAN2 heartbeat packet status
CANHEARTTM2 Query/Set CAN2 heartbeat time interval
CANHEARTUSER2 Query/Set CAN2 heartbeat packet content
REGEN2 Query/Set CAN1 registration packet types
REGTCP2 Query/Set CAN1 registration packet location
REGUSER2 Query/Set CAN1 customize the registration packet content and format
REGCLOUD2 Query/Set CAN1 transparent transmission cloud parameters
REGEN3 Query/Set CAN2 registration package types
REGTCP3 Query/Set CAN2 registration package location
REGUSER3 Query/Set CAN2 customize the registration package content and format
REGCLOUD3 Query/Set CAN2 transparent transmission cloud parameters
CAN2U Query/Set CAN to UART functionality status
CANTURNKING Query/Set CAN relay function status
SOCKTON1 Query/Set Serial port no data timeout reconnection time
SOCKTON2 Query/Set CAN1 no data timeout reconnection time
SOCKTON3 Query/Set CAN2 no data timeout reconnection time
RSTIM Query/Set no data timeout reconnection time
USERMAC Write user-defined mac
SOCKPORTMN Query/Set the local port number of the SOCKET
CFGTF Setting to save the current parameters as user defaults



Please check if the network configuration is correct and disable other irrelevant network cards.



Please check if the CAN port corresponding to CAN is enabled and if there is any error in the hardware connection.



You can check the IP and port number via configuration software or WebServer before connecting.



Reboot the device after modifying the configuration.



Please reboot the device through the hardware, send the AT command "AT+CLEAR" in the configurable data-sending area of the setup software, and clear the web cache to update.



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)