RS485 TO ETH RS485 TO ETH User Manual
RS485 TO ETH CONTENT Features ............................................................................................................................................... 4 1. Get Start ....................................................................................................................................... 5 1.1. Application Diagram ......................................................................................................... 5 1.2. Hardware Design ..........................
RS485 TO ETH 3. 2.4.7. Non-Persistent Connection................................................................................. 20 2.4.8. Timeout Reset Function ..................................................................................... 21 Parameter Setting ...................................................................................................................... 22 3.1. Setup Software Configuration ...............................................................................
RS485 TO ETH FEATURES ⚫ 10/100Mbps Ethernet port, support Auto-MDI/MDIX. ⚫ Support TCP Server, TCP Client, UDP Client, UDP Server, HTTPD Client. ⚫ Support Baud rate from 600bps to 230.4bps; Support None, Odd, Even, Mark, Space. ⚫ Support heartbeat packet and identity packet. ⚫ Support web server, AT command and setup software to configure module. ⚫ Support timeout reset function. ⚫ Support TCP Client non-persistent function. ⚫ Support DHCP/Static IP. ⚫ Support software/hardware reload.
RS485 TO ETH 1. GET START ⚫ Product link: https://www.waveshare.com/wiki/RS485_TO_ETH ⚫ Setup software: https://www.waveshare.com/wiki/RS485_TO_ETH_Software ⚫ Demo codes: https://www.waveshare.com/wiki/File:PC_Socket_Demo.zip 1.1.
RS485 TO ETH 1.2.
RS485 TO ETH 2. PRODUCT FUNCTIONS This chapter introduces the functions of RS485 TO ETH as the following diagram shown, you can get an overall knowledge of it. Serial port Figure 3 Product Functions diagram 2.1. BASIC FUNCTIONS 2.1.1. STATIC IP/DHCP There are two ways for module to get IP address: Static IP and DHCP. Static IP: Default setting of module is Static IP and default IP is 192.168.0.7.
RS485 TO ETH Figure 4 Static IP/DHCP 2.1.2. RESTORE DEFAULT SETTINGS Hardware: User can press Reload over 5 seconds and less than 15 seconds then release to restore default settings. Software: User can use setup software to restore default settings. AT command: User can enter AT command mode and use AT+RELD to restore default settings. 2.1.3.
RS485 TO ETH Figure 5 Upgrade Firmware Version
RS485 TO ETH 2.2. SOCKET FUNCTIONS RS485 TO ETH socket support TCP Server, TCP Client, UDP Server, UDP Client and HTTPD Client. 2.2.1. TCP CLIENT TCP Client provides Client connections for TCP network services. TCP Client device will connect to server to realize data transmission between the serial port and server. According to the TCP protocol, TCP Client has connection/disconnection status differences to ensure reliable data transmission.
RS485 TO ETH Figure 6 TCP Client 2.2.2. TCP SERVER TCP Server will listen network connections and build network connections, commonly used for communication with TCP clients on a LAN. According to the TCP protocol, TCP Server has connection/disconnection status differences to ensure reliable data transmission. TCP Server mode also support Keep-Alive function. RS485 TO ETH work in TCP Server mode will listen local port which user set and build connection after receiving connection request.
RS485 TO ETH Figure 7 TCP Server 2.2.3. UDP CLIENT UDP transport protocol provides simple and unreliable communication services. No connection connected/disconnected. In UDP Client mode, RS485 TO ETH will only communicate with target IP/Port. If data not from target IP/Port, it won’t be received by RS485 TO ETH.
RS485 TO ETH In UDP Client mode, if user set remote IP as 255.255.255.255, RS485 TO ETH can broadcast to entire network segment and receive broadcast data. After firmware version 4015, 304 support broadcasting in same network segment.(Such like xxx.xxx.xxx.255 broadcasting way). User can set RS485 TO ETH in UDP Client mode and related parameters by setup software or web server as follows: Figure 8 UDP Client 2.2.4.
RS485 TO ETH User can set RS485 TO ETH in UDP Server mode and related parameters by setup software or web server as follows: Figure 9 UDP Server 2.2.5. HTTPD CLIENT In HTTPD Client mode, RS485 TO ETH can achieve data transmission between serial port device and HTTP server.
RS485 TO ETH User can set RS485 TO ETH in HTTPD Client mode and related parameters by web server as follow: Figure 10 HTTPD Client 2.3. SERIAL PORT 2.3.1. SERIAL PORT BASIC PARAMETERS Table 1 Serial Port Parameters Parameters Default Range Baud rate 115200 600~230.4Kbps Data bits 8 5~8 Stop bits 1 1~2 Parity None None, Odd, Even, Mark, Space 2.3.2. VCOM APPLICATION User can download VCOM software from Waveshare Wiki.
RS485 TO ETH For network speed is faster than serial. Module will put serial data in buffer before sending it to network. The data will be sent to Network as Package. There are 2 ways to end the package and send package to network - Time Trigger Mode and Length Trigger Mode. RS485 TO ETH adopt fixed Package time (four bytes sending time) and fixed Package length (400 bytes). 2.3.4.
RS485 TO ETH 2.4. FEATURES 2.4.1. IDENTITY PACKET FUNCTION Figure 12 Identity Packet Application Diagram Identity packet is used for identifying the device when module works as TCP client/UDP client. There are two sending methods for identity packet. ⚫ Identity data will be sent when connection is established. ⚫ Identity data will be add on the front of every data packet. Identity packet can be MAC address or user editable data (User editable data at most 40 bytes).
RS485 TO ETH Heartbeat packet: Module will output heartbeat data to serial or network periodic. User can configure the heartbeat data and time interval. Serial heartbeat data can be used for polling Modbus data. Network heartbeat data can be used for showing connection status and keep the connection (only take effect in TCP/UDP Client mode). User can set RS485 TO ETH with Heartbeat Packet function by web server as follow: Figure 14 Heartbeat Packet 2.4.3.
RS485 TO ETH Figure 15 Reset Function 2.4.5. INDEX FUNCTION Index function: Used in situation when 304 work in TCP Server mode and establish more than one connection to TCP Client. After open Index function, 304 will mark every TCP Client to distinguish them. User can send/receive data to/from different TCP Client according to their unique mark.
RS485 TO ETH 2.4.6. TCP SERVER SETTING 304 work in TCP Server mode allow at most 16 TCP Clients connection. Default is 4 TCP Clients and user can change maximum TCP Clients connection by web server. When TCP Clients more than 4, user need make every connection data less than 200 bytes/s. If TCP Clients connected to 304 exceed maximum TCP Clients, user can enable/disable kick off old connection function by web server.
RS485 TO ETH serial port side and will disconnect to server after sending all the data to server and no data from serial port side or network side over a fixed time. This fixed time can be 2~255s, default is 3s. User can set RS485 TO ETH with non-persistent connection function by web server as follow: Figure 18 Non-persistent Connection 2.4.8.
RS485 TO ETH 3. PARAMETER SETTING There are three ways to configure RS485 TO ETH. They are setup software configuration, web server configuration and AT command configuration. 3.1. SETUP SOFTWARE CONFIGURATION User can download setup software from Waveshare Wiki.
RS485 TO ETH 3.2. WEB SERVER CONFIGURATION User can connect PC to RS485 TO ETH through LAN port and enter web server to configure. Web server default parameters as follow: Table 2 Web Server Default Parameters Parameter Default settings Web server IP address 192.168.0.7 User name admin Password admin After firstly connecting PC to RS485 TO ETH, user can open browser and enter default IP 192.168.0.7 into address bar, then log in user name and password, user will enter into web server.
RS485 TO ETH 3.3. AT COMMAND For AT commands, please refer to specific AT command manual. 3.3.1. SERIAL AT COFMMAND In transparent mode, user can enter AT command mode, then user can send AT command to module. Enter AT Command Mode: ⚫ Connect module to PC via UART interface (a UART to USB module is required) ⚫ Open Serial Assistant software on PC, and set it to 115200 8N1 ⚫ Send “+++” to module, it responses “a” ⚫ Send “a” to confirm, and you will get a response “+OK”.
RS485 TO ETH 4. CONTACT US Email: (order/shipment) sales@waveshare.com (tech support) service@waveshare.com (complaint) complaint@waveshare.com (apply for distributor) distributor@waveshare.com Skype: (order/shipment) sales@waveshare (tech support) service@waveshare Whatsapp: 86-13148830755 Phone: 86-755-82807524 Fax: 86-755-83042572 Address: Waveshare Electronics 10F, International Science & Technology Building, Fuhong Rd, Futian District, Shenzhen, China Website: www.waveshare.
RS485 TO ETH 5. DISCLAIMER This document provide the information of RS485 TO ETH products, it hasn’t been granted any intellectual property license by forbidding speak or other ways either explicitly or implicitly. Except the duty declared in sales terms and conditions, we don’t take any other responsibilities.