Advertisement

Quick Links

RS485 TO ETH ( B)
UART TO ETH (B)
User Manual
Figure 1 UART TO ETH (B)
1 / 52
www.waveshare.com

Advertisement

Table of Contents
loading

Summary of Contents for Waveshare UART TO ETH

  • Page 1 RS485 TO ETH ( B) UART TO ETH (B) User Manual Figure 1 UART TO ETH (B) 1 / 52 www.waveshare.com...
  • Page 2 Ethernet, and the host computer software can use TCP/ UDP transparent transmission or virtual serial port mode to send data to UART TO ETH (B) On the UART interface; the data received on the UA RT interface will also be transmitted to the software or virtual serial port on the TCP side.
  • Page 3: Hardware Features

    A typical application connection is shown in Figure 2. The original serial device UART is connected to the UART port of RS485 TO ETH (B), and UART TO ETH (B) is connected to the computer through a network cable. The software on the computer establishes a connection with UART TO ETH (B) through TCP/ IP or virtual serial port.
  • Page 4: Software Features

    RS485 TO ETH ( B) 2 . 2 . SOFTWARE FEATURES 3 / 52 www.waveshare.com...
  • Page 5 Support custom heartbeat package and registration package function: it can facilitate communication and device identification with the cloud. Support the function of password authentication required for TCP connection establishment to ensure connection security. 4 / 52 www.waveshare.com...
  • Page 6 Communication mode Operating mode TCP server, TCP client (TCP server coexists at the same time), UDP, UDP multicast Power requirements Power 3.3V/5V Environmental requirements Operating temperature -4 0 ~ 8 5 C Humidity range 5~95% relative humidity 5 / 52 www.waveshare.com...
  • Page 7: Table Of Contents

    RS485 TO ETH ( B) CONTENT 目录 Figure 2 Connection diagram ........................3 2 . 1 . HARDWARE FEATURES ......................3 2 . 2 . SOFTWARE FEATURES ......................4 Table 1 Technical parameters ........................6 4 . 1 . HARDWARE DESCRIPTION ....................9 Figure 3 Front view ............................
  • Page 8 8.1.4. Configuration file....................45 8.2. Heartbeat package......................46 8.2.1. Implied heartbeat....................46 8.2.2. REALCOM protocol....................47 8 .2.3. Custom heartbeat package...................47 9 . Remote device management....................4 7 10. MQTT and JSON........................49 11. firmware upgrade method....................49 7 / 52 www.waveshare.com...
  • Page 9: Hardware Description

    This chapter is the user manual for the product UART TO ETH (B). It is recommended that users read this chapter systematically and follow the instructions to get a systemic understanding of this product.
  • Page 10 RS485 TO ETH ( B) Figure 4 UART TO ETH (B) UART TO ETH (B) Pinout Model Description Power 5V Power Input 3.3V Power 3.3V Power Input Ground Ground Reset pin, low active. It is recommended to use max811reus or a similar reset chip. Noise can be Reset filtered by a 0.1u capacitor.
  • Page 11 RS485 TO ETH ( B) than 1 second, the module will restart with the default IP of 192.168.1.254, static IP mode, 255.255.255.0 gateway, and 192.168.1.1 gateway. You can also set your own reset parameters with the param.txt configuration file. Working indicator, the chip works properly, and will output a square wave with a period of 2 seconds.
  • Page 12 RS485 TO ETH ( B) time, the LINK will change to 1. 10 / 52 www.waveshare.com...
  • Page 13: Hardware Connection

    4 . 4 . PARAMETER CONFIGURATION After Vircom is installed and the device hardware is connected, run the software as shown in the figure, and then click "Device Management" as shown in the figure. Using Vircom, you can 11 / 52 www.waveshare.com...
  • Page 14 Vircom are under the same switch. Figure 6 Vircom main interface Figure 7 Device list See all currently online devices from the device list. Click " Edit Device" to configure the parameters. 12 / 52 www.waveshare.com...
  • Page 15 You can give the device an easy-to-read name, up Device name to 9 characters long Factory unique ID, cannot be modified. Device ID Firmware The firmware version of the core module version Supported Refer to Table 5 Supported functions of the 13 / 52 www.waveshare.com...
  • Page 16 In TCP client or UDP mode, data will be sent to the destination port of the destination IP. Serial port baud rate Baud rate 300 、600 、1200 、2400、 4800、7200 、9600、 14400 、19200 、28800、 38400 、57600 、76800、 115200、230400、460800 14 / 52 www.waveshare.com...
  • Page 17 Realcom protocol. When set to 255, there will be no realcom heartbeat. (3) When it is set to 0~254, if the device works as a TCP client, the device will send device parameters to the destination 15 / 52 www.waveshare.com...
  • Page 18 Internet. Because the MAC address of the device is contained in the protocol, it is helpful for the host computer to identify the device. Under normal 16 / 52 www.waveshare.com...
  • Page 19 Assuming that the COM port (USB TO TTL ) of the PC is connected to the serial port of the serial server, then open the serial debugging assistant window and open the corresponding COM port, as shown in the figure below: 17 / 52 www.waveshare.com...
  • Page 20 4196, and then click the "Open" button, as shown in the figure below: Figure 11 SSCOM2: TCP Client transceiver interface Enter "TCPClient : Waveshare Test" in the serial debugging assistant SSCOM2 set as TCPClient and click send, then the data will be transferred to the RS485 interface through the serial server's network port, and then sent to the USB TO RS485, and then displayed in the serial debugging assistant SSCOM1 Come out;...
  • Page 21: Add Virtual Serial Port

    Then click "Modify Setting", and then click "Restart Dev". And return to the main interface of Vircom. You can see that COM2 has been connected to the device with IP 192.168.1.200. At this time, COM2 can be used instead of SSCOM2 for communication. 19 / 52 www.waveshare.com...
  • Page 22 Open SSCOM to simulate the user' s serial port program, open COM2 ( the virtual serial port above) , open another SSCOM to simulate a serial device, and open COM3 (hardware serial port). At this time, the COM2 sending data link is as follows: COM2 — "Vircom — "Serial server network 20 / 52 www.waveshare.com...
  • Page 23 01 03 00 00 00 0a c5 cd. Note: The serial port may send multiple 01 03 00 00 00 0a c5 cd commands. This is because the default Modbus adopts the storage mode and will automatically train and query commands in turn. How to switch to non- storage mode will be explained later. 21 / 52 www.waveshare.com...
  • Page 24: Enable Modbus Tcp Function

    IP to the IP of the computer where the Modbus TCP software is located, and the destination port is 502, as shown in the figure blow. Modbus TCP as client 22 / 52 www.waveshare.com...
  • Page 25: Web Login Interface

    Web login interface 2. Enter the password in Password : there is no password set by default in the factory state, and the password needs to be set through Modify Web Login Key to take effect. 23 / 52 www.waveshare.com...
  • Page 26: Web Configuration Interface

    In the non-virtual serial port mode, the "conversion protocol part" is divided into three modes: transparent transmission, Modbus TCP to RTU and Realcom protocol. If the user software is a fixed protocol Modbus TCP protocol and the lower computer is Modbus RTU, you 24 / 52 www.waveshare.com...
  • Page 27 Internet communication. 5 . 1 . VIRTUAL SERIAL PORT MODE If the user software uses the COM port for communication, it must use the virtual serial port mode. Including some PLC software, configuration software, instrument software, etc. 25 / 52 www.waveshare.com...
  • Page 28: Direct Tcp/ Ip Communication Mode

    ( 2 ) IP address correspondence: The destination IP of the serial port server must be the IP address of 26 / 52 www.waveshare.com...
  • Page 29: Client Connects To Multiple Servers

    7 destination IPs at the same time. If there are not so many servers, leave the rest of the destination IP vacant. The method of use is as follows: 27 / 52 www.waveshare.com...
  • Page 30 More Advanced Settings for setting. After all 7 destination IPs are set up, they can be connected automatically. If they are not connected, they will wait for the " Reconnect Time" time and then reconnect repeatedly. 28 / 52 www.waveshare.com...
  • Page 31: Tcp Server Mode

    ACTING AS BOTH A CLIENT AND A SERVER The serial port server supports the ability to accept TCP connections even when the device is in the TCP client mode, that is, it also has the TCP server function. 29 / 52 www.waveshare.com...
  • Page 32: Udp Mode

    IP address of the computer where the network tool is located, and the destination port of the serial server must be the local port of the network debugging tool. Only after these network parameters are configured can two- way UDP data communication be ensured. 30 / 52 www.waveshare.com...
  • Page 33 " Device Management" dialog box, as shown in Figure 20 . If the status of the two devices is both "Connected", it means that the TCP link between the two devices has been 31 / 52 www.waveshare.com...
  • Page 34 UDP couplet does not need to check the connection status as long as the parameter configuration is correct, the sent data will be automatically sent to the designated device. Figure 21 UDP device pairing parameter configuration 32 / 52 www.waveshare.com...
  • Page 35: Network Physical Connection

    Since Vircom supports searching and configuration across network segments, the IP address that can be searched but cannot be communicated is generally not configured properly. In this case, you can use Vircom to configure the device in the same network segment. 33 / 52 www.waveshare.com...
  • Page 36: Data Sending And Receiving

    It is assumed that the communication of the virtual serial port has been established according to the method of 4.6 virtual serial port test. Now need to monitor the data through the virtual serial port. Open Vircom' s menu/ Config/ software setting/ open the Vircom configuration dialog box. 34 / 52 www.waveshare.com...
  • Page 37 Figure 32 Open Virocm monitoring From the opened dialog box, you can see the instructions issued by the host computer and the instructions returned by the device, as shown in Figure 25 . This function can facilitate on-site communication debugging. 35 / 52 www.waveshare.com...
  • Page 38: Modbus Advanced Functions

    TCP server mode; if the serial port RTU is used as the master station, the Modbus gateway works as a TCP client and the destination IP Fill in the IP of the computer where the Modbus TCP software is located, and the destination port is generally 502. 36 / 52 www.waveshare.com...
  • Page 39 If the network is like an expressway, and the serial port is like a 37 / 52 www.waveshare.com...
  • Page 40 48 5 anti- collision time ( refer to the multi- host section). The second command sends... Return to the first command after the last command has been answered. 38 / 52 www.waveshare.com...
  • Page 41: Multi - Host Function

    RS485 bus. The multiple hosts of this serial server can "coordinate" the RS485 bus to achieve the purpose of multi- host access. 39 / 52 www.waveshare.com...
  • Page 42: Multi-Host Parameters

    When you need to enable multiple hosts, please click " More Advanced Settings" in the device configuration dialog box, and then check "RS485 multi-host support". 7 . 5 . MULTI - HOST PARAMETERS The meanings of "Enable RS485 Multi- Host " and "Enable RS485 bus conflict detection" are introduced as follows. 40 / 52 www.waveshare.com...
  • Page 43 When the user uses Vircom to select the conversion protocol as " Modbus_ TCP Protocol", Vricom will automatically check the above two enabling boxes ( unless the user manually enters the advanced option to remove it), and the above two times will also be automatically 41 / 52 www.waveshare.com...
  • Page 44: Modbus Under Multi - Destination Ip

    RTU device at the same time. REGISTRATION PACKAGE AND HEARTBEAT PACKAGE The registration package and the heartbeat package are a function suitable for communication between the device and the cloud software. 42 / 52 www.waveshare.com...
  • Page 45: Send Mac Address On Connection

    Figure 31 Sending MAC address on connection 8 . 1 . 2 . REALCOM AGREEMENT The Realcom protocol is a mature protocol containing a registration package and a heartbeat package. Users can use this protocol to realize the functions of the registration 43 / 52 www.waveshare.com...
  • Page 46: Custom Registration Package

    8 . 1 . 3 . CUSTOM REGISTRATION PACKAGE The custom registration package method is that the user can fill in an arbitrary registration package format. The method is: in the device setting interface, the configuration is as follows: 44 / 52 www.waveshare.com...
  • Page 47: Configuration File

    Support serial server to write a configuration file, so as to realize user- defined registration package, and can use MAC address wildcard, which can solve the trouble of writing custom registration package for each device, and there is no limit to the length of registration package. 45 / 52 www.waveshare.com...
  • Page 48: Heartbeat Package

    Therefore, it cannot play the first function of the heartbeat packet, that is, the server detects whether the device is active or not; but because the device actually sends data, it can play the second function of the heartbeat packet, that is, the device detects the TCP connection 46 / 52 www.waveshare.com...
  • Page 49: Realcom Protocol

    The remote management of equipment is divided into the following situations: 1. Automatic search : The device and the computer are on the same switch. At this time, no matter whether they are in the same network segment or not, the Vircom search method on the 47 / 52 www.waveshare.com...
  • Page 50 " Send parameters at regular intervals" function, and the parameters will be sent to the destination port of the destination IP (here 116.15.2.3) every 5 minutes. Vircom that receives parameters on this port of this server can manage these devices. 48 / 52 www.waveshare.com...
  • Page 51: Mqtt And Json

    In order to facilitate the identification of the device, if you need to perform remote management, please give the device a name that is easy to remember. 1 0 . MQTT AND JSON For related usage, please refer to: MQTT and JSON Manual:  https://www.waveshare.com/wiki/RS485_TO_POE_ETH_(B)_MQTT_And_JSON_User_Manual Connect Alibaba Cloud And EMQX  https://www.waveshare.com/wiki/RS485_TO_ETH_(B)_Connect_Alibaba_Cloud_And_EMQX...

Table of Contents