Table of Contents

Advertisement

Quick Links

RS232/485 TO WIFI POE ETH (B) User Manual
RS232/485 TO WIFI POE ETH (B)
User Manual
Figure
RS232/485 TO WIFI POE ETH (B)
www.waveshare.com
1

Advertisement

Table of Contents
loading

Summary of Contents for Waveshare RS232/485 TO WIFI POE ETH (B)

  • Page 1 RS232/485 TO WIFI POE ETH (B) User Manual RS232/485 TO WIFI POE ETH (B) User Manual Figure RS232/485 TO WIFI POE ETH (B) www.waveshare.com...
  • Page 2: Overview

    Supports one click (pressing the RELOAD button for more than 5 seconds) to restore factory  settings. Long communication distance, with two serial servers transmitting 150 meters to each other.  Guide rail design for easy and convenient installation.  www.waveshare.com...
  • Page 3: Table Of Contents

    4.1.6 Serial port and network settings page ................20 4.1.7 Ethernet function settings ....................22 4.1.8 HTTPDClient mode page ....................22 4.1.9 MQTT function settings page ..................24 4.1.10 Module Management Page ..................25 4.2 Software configuration ......................26 4.2.1 Download link .........................26 4.2.2 Software introduction ....................26 www.waveshare.com...
  • Page 4 6.2.3 STA joins the routing function ..................57 6.2.4 STA address binding function ..................57 6.3 Socket communication ......................57 6.4 UART framing mechanism ......................58 6.4.1 Serial Parameters ......................58 6.4.2 UART Free-Frame Mode ....................59 6.4.3 UART automatic framing mode ..................60 www.waveshare.com...
  • Page 5 6.13 Timed reboot function ......................73 6.14 Modbus polling ........................73 6.15 KeepALIVE Function .........................74 6.16 Websocket function ........................ 74 6.17 MQTT function .........................74 6.17.1 MQTT function introduction ..................74 6.17.2 RS232/485 TO WIFI POE ETH (B) Parameter Configuration .........75 www.waveshare.com...
  • Page 6: Quick Get Start

    Figure RS232/485 TO WIFI POE ETH (B) default configuration In order to test the communication conversion of RS232/485 to WiFi/Ethernet, we will connect the serial port of the RS232/485 to WiFi POE Eth (B) serial server to the serial port of the computer. www.waveshare.com...
  • Page 7: Network Connections

    Let's take WIFI connection as an example to introduce the network connection process. Open the wireless network connection and search for the network. As shown in the figure below, "Waveshareuxxxx" (xxxx is the last four digits of the MAC address) is the default network name (SSID) for the serial server. www.waveshare.com...
  • Page 8 RS232/485 TO WIFI POE ETH (B) User Manual Figure Wireless Network SSID Search Join the network, choose to automatically obtain IP, RS232/485 TO WIFI POE ETH (B) serial port server supports DHCPServer function and is enabled by default. www.waveshare.com...
  • Page 9: Data Transmission Test

    The data flow from the network to the serial port is: Computer network -> RS232/485 TO WIFI POE ETH (B) WiFi/Ethernet -> RS232/485 TO WiFi POE  ETH (B) serial port -> Computer serial port. The specific demonstration is shown in the following figure: www.waveshare.com...
  • Page 10: Overview

    Users do not need to worry about specific details. The module completes protocol conversion internally, and can achieve bidirectional data transmission between the serial port and WIFI through simple settings. 3.2 ELECTRICAL PARAMETER Table Electrical Parameters Item Index Name Wireless 802.11b/g/n standards Frequency range 2.412 GHz -2.484 GHz Transmitting 802.11b:+19dBm(Max.@11Mbps) power 802.11g:+18dBm(Max.@54Mbps) www.waveshare.com...
  • Page 11: Product Appearance

    Structure Command setting AT+Command Protocol TCP/UDP/ARP/ICMP/DHCP/DNS/HTTP/MQTT Maximum TCP connections User Web Server+AT Command Configuration Configuration Customer Support customer customization of application application software software 3.3 PRODUCT APPEARANCE The following image shows the appearance of RS232/485 TO WIFI ETH (B): www.waveshare.com...
  • Page 12: Operating Indicator And Key

    (indicated by the flashing Link LED), press and hold the button for at least 5 seconds, then release it. Wait for about 10 seconds, and the RS232/485 TO WIFI POE ETH (B) device will automatically complete the reset process. During this process, all indicator lights except the PWR www.waveshare.com...
  • Page 13: Interface Description

    3.5 INTERFACE DESCRIPTION The hardware interfaces are as follows: Antenna connector: 3dbi antenna.  Ethernet port: RJ45 interface.  RS232 interface: DB9 male interface. See the above figure for the cable sequence.  www.waveshare.com...
  • Page 14: Outline Dimensions

    The RS232/485 TO WIFI POE ETH (B) serial server disables the network port by default, and can be enabled by AT command or webpage setting if it is necessary to use the network port. 3.6 OUTLINE DIMENSIONS www.waveshare.com...
  • Page 15: Application Scenarios

    Wi-Fi body fat scale, smart card terminal and smart home.  Instruments and meters, equipment parameter monitoring, wireless POS machine;  Other wireless related secondary development and application in modern agriculture and  military fields; Smart factories, smart homes, smart medical care and other fields.  www.waveshare.com...
  • Page 16: Product Parameters Setting

    Figure the second step of opening the management web page Then; The RS232/485 TO WIFI POE ETH (B) management page supports Chinese and English, and can be set in the upper right corner. It is divided into 9 pages, namely, quick configuration, mode www.waveshare.com...
  • Page 17: Quick Configuration Page

    UART Setting: configure serial port parameters, including serial port baud rate, parity bit, 485  function and so on. Network Setting: configure network parameters, only related parameters of SocketA.  MQTT setting: configure MQTT enabling and MQTT connection server related parameters.  www.waveshare.com...
  • Page 18: Mode Selection Page

    RS232/485 TO WIFI POE ETH (B) supports AP interface, through which the WIFI serial server can be managed very conveniently, and the self-organizing network can be realized. The management page is shown below. Including the setting of SSID, wireless network mode and wireless security, and the setting of local area network composed of AP. www.waveshare.com...
  • Page 19: Wireless Terminal Settings Page

    The settings on this page include two tables. The top one is the wireless settings for STA, including the SSID of the AP to be connected, security settings, etc. The following table shows the network connection mode settings, including DHCP and static connection mode. www.waveshare.com...
  • Page 20: Serial Port And Network Settings Page

    Application program settings refer to the settings of WIFI to serial port application parameters, including serial port parameter settings, automatic framing settings, Ethernet function settings, device registration package settings, and network protocol settings. Serial Port and Network Parameter Settings www.waveshare.com...
  • Page 21 RS232/485 TO WIFI POE ETH (B) serial server is password plus carriage return. The password is the password when logging in to the webpage, and the default is "admin". For example, the first data sent by default should be "0x610x640x6d 0x690x6e0x00d 0x0a" (hexadecimal). www.waveshare.com...
  • Page 22: Ethernet Function Settings

    Connection and protocol header User-Agent. The size of the transmitted data is 1000 bytes. For details about data transmission method, you can refer to “HTTPDClient” chapter in this user manual. www.waveshare.com...
  • Page 23 RS232/485 TO WIFI POE ETH (B) User Manual Figure Web Page Setting HTTPDClient Mode www.waveshare.com...
  • Page 24: Mqtt Function Settings Page

    4.1.9 MQTT FUNCTION SETTINGS PAGE This webpage sets MQTT function related parameters, including server parameters to connect to, publish topic parameters, and subscribe topic parameters. For specific usage of MQTT functions, please refer to the relevant chapters of this manual titled "MQTT Functions". www.waveshare.com...
  • Page 25: Module Management Page

    RS232/485 TO WIFI POE ETH (B) User Manual Figure Webpage MQTT function settings 4.1.10 MODULE MANAGEMENT PAGE Module management includes username/password settings, factory reset, and software upgrade functions. www.waveshare.com...
  • Page 26: Software Configuration

    4.2 SOFTWARE CONFIGURATION 4.2.1 DOWNLOAD LINK WiFi high-performance series configuration software download link: 4.2.2 SOFTWARE INTRODUCTION The serial server parameter can be queried and configured through a serial connection or by connecting to the same local network. www.waveshare.com...
  • Page 27 This can be done without accessing the web page or manually send AT commands frequently. The device supports features like one-click firmware upgrades and batch parameter configuration. The interface might look like the following figure: Figure Serial Port and Network Parameter Settings Batch parameter configuration setting and firmware upgrade interface as shown below: www.waveshare.com...
  • Page 28: Product Networking Application

    AP, and other wireless terminals can connect to each other through the AP. STA: refers to a wireless station, which is a terminal of a wireless network. Such as notebook computer, PDA, etc. 5.1 WIRELESS NETWORKING SETTINGS www.waveshare.com...
  • Page 29 Enable/disable module AP+STA mode related command Table Socket list Item Note NETP Set/query network protocol parameters for TCPA TCPB Enable/disable TCPB function TCPPTB Set/query the port number of TCPB TCPADDB Set/query TCPB servers The webpage configuration is as follows: www.waveshare.com...
  • Page 30 (2) The webpage is set as follows: For example, log in to the built-in webpage of the serial port server, enter the mode selection page, and select the Station mode (set the WIFI serial port server to STA mode), as follows: www.waveshare.com...
  • Page 31: Wireless Networking Applications

    UART interface to the user device, as shown in the following figure: Figure Access Point (AP) The WIFI serial server operates in AP mode, and the above application can be set using the following AT command: (1) Set the WIFI serial port server to AP mode www.waveshare.com...
  • Page 32: Wireless Networking Application (Sta)

    (2) Parameters under the WiFi serial server's Access Point (AP) mode can be selected and configured based on your requirements or you can use the default parameters. Here's an example of parameter settings: At+WAP = 11bgn, waveshare-test, auto (optional) AT+WAKEY=WPA2PSK,AES,12345678 (optional) (3) Restart the WIFI serial server: AT+Z Complete the parameter setting.
  • Page 33: Wireless Networking Application (Ap+Sta)

    RS232/485 TO WIFI POE ETH (B) User Manual AT+WMODE=STA (2) Set the SSID, encryption mode algorithm and password of the router to be connected (assuming that the routing SSID in the above figure is: Waveshare-TEST, encryption mode algorithm: WPA2PSK,AES, password: Waveshare), set as follows: AT+WSSSID=Waveshare-TEST...
  • Page 34 AT+WMODE=STA (4) Set the parameters for the WIFI serial server to connect to the route (assuming the route SSID in the figure above is WAVESHARE-WIFI-TEST, the encryption mode algorithm is WPA2PSK, AES, and the password is www.waveshare. com), as follows: AT+WSSSID=WAVESHARE-WIFI-TEST AT+WSKEY=WPA2PSK, AES, www.waveshare.com...
  • Page 35: Wireless Networking Application (Ap, Sta)

    AP, allowing other STAs to connect to the wireless network through this device. AT+TCPPTB=18899 (6) Restart the WIFI serial server: The No.1 WIFI serial server works in STA mode and No. 2 works in AP mode: www.waveshare.com...
  • Page 36: Wired Networking Setup

    You can also choose settings as required, or use default parameters. Examples of parameter settings for WIFI serial server 2 are as follows: At+WAP = 11bgn, waveshare-test, auto (optional) AT+WAKEY=WPA2PSK,AES,12345678 (optional) An example of parameter setting for No.1 WIFI serial server is as follows (set the SSID and...
  • Page 37 WiFi, serial, and Ethernet interfaces. Through this 100M Ethernet interface, seamless interaction is possible among the three interfaces, enabling effective data exchange. In terms of networking, the RS232/485 TO WIFI POE ETH (B) serial server's www.waveshare.com...
  • Page 38: Wired Networking Application

    (4) LAN parameters of serial port server need not be set by default, and IP address (DHCP gateway) and subnet mask of serial port server can also be modified as needed. The default values are used here: AT+LANN=10.10.100.254,255.255.255.0 (5) Restart the serial server to complete the parameter setting. 5.4.2 WIRED NETWORKING APPLICATION (APWAN) www.waveshare.com...
  • Page 39 Internet by connecting to the serial server AP. At this time, the default AP of the serial port server is usually RS232/485 TO WIFI POE ETH (B)_xxxx, which has no encryption and can be set through web pages or at commands.
  • Page 40: Wired Networking Application (Routing)

    Note that the AT+RELD command will not restore the above settings. (4) Set the serial server to STA AT+WMODE=STA (5) Set the SSID and password of the route to be connected to the serial server (according to the actual parameters of the route). Example: AT+WSSSID=WAVESHARE-WIFI-TEST www.waveshare.com...
  • Page 41: Wired Networking Application (Bridge)

    RS232/485 TO WIFI POE ETH (B) User Manual AT+WSKEY=WPA2PSK,AES,www.waveshare.com (6) Set the serial server LAN parameters, IP address (DHCP gateway) and subnet mask. Inquire about the IP obtained by the serial port server from the AP: AT+WANN Set the LAN parameters of the serial server to ensure that the LANIP address cannot be in the same network segment as the WAN IP address obtained by the serial server from the AP.
  • Page 42: Product Function Description

    WIFI/ Ethernet, without any parsing, so as to realize the data transmission between universal serial port devices and network devices. www.waveshare.com...
  • Page 43: Serial Command Mode

    N bytes of data are sent to the target address. When data is returned, the data is directly output from the serial port without parsing. Table Serial command mode protocol Function Reserved parameter Target Target Header Length Data Checksum code area: port address (n+m+5) Header: Always 0x550xaa www.waveshare.com...
  • Page 44 If it is IP, it is 4 bytes, for example, 192.168.0.133 means 8500A8C0; If it is a domain name, the length of the address is uncertain, ending with '\0'. Data: The length is variable, and the maximum is 4*1024 bytes. Checksum: www.waveshare.com...
  • Page 45: Httpdclient Mode

    RS232/485 TO WIFI POE ETH (B) handles the complicated HTTP protocol, which is convenient for users to program the serial port without considering too many HTTP issues. The maximum size of data sent is 1000 bytes. www.waveshare.com...
  • Page 46 Figure HTTPDClient functional block diagram In GET mode, after the serial server receives the user's serial data packet, the packaging format is follows: In POST mode, after the serial server receives the user serial data packet, the packaging format is as follows: www.waveshare.com...
  • Page 47 Set/query HTTPDClient short connection timeout (3-65535s) The following are examples of specific applications: First, use AT command to set the related parameters of HTTP: If the data sent is 1234, Then the 80 port of test.waveshare.com will get the following data: POST/2.php?HTTP/1.1 Connection:keep-alive User-Agent:lwip1.3.2...
  • Page 48 Connection:keep-alive User-Agent:lwip1.3.2 Host:test.waveshare.com:80 When the request mode is POST or PUT, the serial data will be added to the position behind the HTTP protocol header; When the request method is GET, the serial data will be added to the back of the protocol header path.
  • Page 49 RS232/485 TO WIFI POE ETH (B) User Manual Figure HTTPD Client request type (2) Under the serial port and network configuration page, select the HTTPDClient mode as long/short. If it is set to the short connection state, you can set the timeout of 3-65535(s). www.waveshare.com...
  • Page 50 (1) Set/query long/short connection of HTTPDClient, taking short connection as an example; AT+HTTPSCEN=short (2) Set/query timeout interval (3-65535) seconds in short connection mode; Take 3 seconds as an example; AT+HTTPSCT=3 HTTPD POST measured demonstration: (1)Set the HTTPD Client POST parameter through the web page: www.waveshare.com...
  • Page 51 RS232/485 TO WIFI POE ETH (B) User Manual (2)Open SSCOM serial communication assistant and send Json format through RS232/485 interface: "apikey": "tPmAT5Ab3j888", "value1": "33", "value2": "3", "value3": "22" (3)After sending successfully, the prompt in the red box will be returned: www.waveshare.com...
  • Page 52 RS232/485 TO WIFI POE ETH (B) User Manual (4)Open a web page:https://pico.wiki/esp-chart.php , you can see the POST to the server data chart, as shown in the figure below: www.waveshare.com...
  • Page 53 RS232/485 TO WIFI POE ETH (B) User Manual HTTPD GET measured demonstration: (1)Set the HTTPD Client GET parameter through the web page: www.waveshare.com...
  • Page 54 (2)Open SSCOM serial communication assistant and send it through RS232/485 interface. You need to get the latest value of a certain value on the webpage, for example, to get the latest value of value3: variable=value3 (3)After sending successfully, the following is returned: www.waveshare.com...
  • Page 55: Modbustcp<=>Modbusrtu Conversion Mode

    This serial server supports ModbusTCP to ModbusRTU (ModbusASCII is not supported); The network parameters of the module should correspond to those of the application software, the TCPserver should correspond to the TCPclient, and the ports should be configured the same, and the working mode should be ModbusTCP<=>ModbusRTU. www.waveshare.com...
  • Page 56: Wireless Characteristics

    6.2.2 SECURITY MECHANISM The RS232/485 TO WIFI POE ETH (B) serial server supports a variety of wireless network encryption methods, which can fully guarantee the safe transmission of data, including: 1.WPA-PSK/TKIP 2.WPA-PSK/AES 3.WPA2-PSK/TKIP www.waveshare.com...
  • Page 57: Sta Joins The Routing Function

    The data coming from the serial port will be duplicated and forwarded to each TCP connection, resulting in multiple copies being sent to each connected TCP link. The specific data flow chart is shown as follows: www.waveshare.com...
  • Page 58: Uart Framing Mechanism

    Stop bit 1, 2 Checksum byte None, Even, Odd NFC: No hardware flow control Web page settings Log in to the built-in webpage and set the serial port parameters on the "Serial Port and Network Settings" page, as follows: www.waveshare.com...
  • Page 59: Uart Free-Frame Mode

    Assuming that n is the interval for free-frame assembling, measured in milliseconds, where T1 > n, T2 < n, T3 < n, T4 < n, T5 < n, T6 > n, then Byte1 to Byte5 are treated as a single frame of data, as illustrated www.waveshare.com...
  • Page 60: Uart Automatic Framing Mode

    For fixed-length data frames on the serial port, you can enable the UART automatic framing function, and set the automatic framing trigger time and trigger frame length. RS232/485 TO WIFI POE ETH (B) will send the data from the serial port. The received data is automatically framed and forwarded to the network. www.waveshare.com...
  • Page 61: Password Authentication When Tcp Establishes Connection

    6.5 PASSWORD AUTHENTICATION WHEN TCP ESTABLISHES CONNECTION This function is only applicable to RS232/485 TO WIFI POE ETH (B) as a TCPServer. When the TCPClient connects to RS232/485 TO WIFI ETH (B), RS232/485 TO WIFI POE ETH (B) will authenticate every connected TCP. www.waveshare.com...
  • Page 62: Description Of Rfc2217 Protocol

    Figure RFC2217 automatic baud rate 6.6 DESCRIPTION OF RFC2217 PROTOCOL The length of the protocol is 8 bytes, and the specific content of the protocol is as follows. The numerical value of the example is in HEX format: www.waveshare.com...
  • Page 63 0% to 100%. M+3 Terminator The terminator of signal strength n, 0x0D, 0x0A. M+4 Checksum Bit 1 The cumulative sum of all bytes after the header (excluding the header) and before the checksum (excluding the checksum). www.waveshare.com...
  • Page 64: Fast Networking Protocol

    The signal strength of router 1 network ranges from 0 to 100, and strength 1 the corresponding actual value is 0% to 100% Terminator of signal strength 1, 0x0D, 0x0A character … … … ……… SSIDn Indefinite The SSID of router n length SSID terminator of router n, fixed value 0x00 www.waveshare.com...
  • Page 65 The cumulative sum of all bytes after the header (excluding the byte header) and before the checksum byte (excluding the checksum byte). Table setting reply instruction No. Name Bytes Note Header Fixed value 0xFF Length All bytes after the length (excluding the length) and before the www.waveshare.com...
  • Page 66: Local Area Network Search

    You can also directly connect the AP of RS232/485 TO WIFI POE ETH (B) to send the search instruction, as shown in the following figure: Figure LAN search block diagram Search protocol process: 1. On another device in the local area network, send the search instruction "www.waveshare.com" through UDP broadcast (broadcast address: xx.xx.255, port: 48899). www.waveshare.com...
  • Page 67: Registration Packet Function

    The other is to add registration information in front of the data sent each time. There is only one way to register CLOUD, that is, when connecting to the server, send a registration package to join Transparent Cloud. www.waveshare.com...
  • Page 68: Customized Heartbeat Packets

    In the network transparent transmission mode, users can choose to turn on the custom heartbeat packet function, and heartbeat packet can choose to send it to the network server or the serial port device. The schematic block diagram is as follows: www.waveshare.com...
  • Page 69 AT+HEARTTP=NET (3) Set the heartbeat packet data (up to 40 bytes), for example, to set the data to the string www.waveshare.com, you need to first convert it to a hexadecimal string as 7777772E7761766573686172652E636F6D。 AT+HEARTDT=7777772E7766573686172652E636F6D (4) Set the interval time for sending heartbeat packets, with a range of 1-65535s and a default of 30s.
  • Page 70: Socket Distribution Function

    30 seconds, the serial server will send the string www.waveshare.com to the server. The related instructions are set as follows: Table heartbeat packet instruction list No.
  • Page 71 If it is the data replied by the module, the corresponding operation reply code is returned. The specific operation reply code is as follows: Table Operation reply code No. Return code Description Note 0x00 Header error 0x01 Data length error 0x02 Parameter error 0x04 Checksum error 0x10 Sending failed (parameters correct but sending failed) Checksum: www.waveshare.com...
  • Page 72 Data area CC: Data sent from network socket A Checksum calculation: 61+00+CC=2D Taking Socket as an example, the serial port device sends abc to Socket, and the network-side Socket sends data 123 to the serial port device, as shown below: www.waveshare.com...
  • Page 73: Timeout Reboot Function

    The AT+REBOOTT=200 parameter setting is finished and takes effect after the module restarts. After taking effect, the module restarts every 200 hours. Table Scheduled Reboot Command List Command Note REBOOTEN Enable/Disable the scheduled reboot function REBOOTT Query/Set the scheduled reboot time 6.14 MODBUS POLLING www.waveshare.com...
  • Page 74: Keepalive Function

    Mode (serial port can transparently publish data to all topics), Special Identifier Publish Mode (serial port can transparently publish data to specific topics using identifiers), and Custom Topic Publish Mode (serial port can transparently publish data to specified topics). www.waveshare.com...
  • Page 75: Rs232/485 To Wifi Poe Eth (B) Parameter Configuration

    Add a new topic to a preconfigured subscription topic MQTTSUBDEL Delete a topic with that name from the preconfigured subscription topics. MQTTSUBCLR Clean preconfigured subscription topics Web page settings On the "MQTT Function Settings" page, configure the MQTT function parameters as follows: www.waveshare.com...
  • Page 76 RS232/485 TO WIFI POE ETH (B) User Manual Figure MQTT function settings page www.waveshare.com...

This manual is also suitable for:

Rs232/485 to wifi eth (b)

Table of Contents