Socket Distribution Function - Waveshare UART-WIFI232-B2 User Manual

Table of Contents

Advertisement

UART-WIFI232-B2 User Manual
AT+HEARTTM=30
In addition to the above settings, you should also set the network connections such as socketA
and socketB, please refer to Section 2.4. After setting, restart the serial server. When the socket or
socket is connected to the server, if there is no data transmission in the serial port of the device
within 30 seconds, the serial server will send the string www.waveshare.com to the server.
The related instructions are set as follows:
No. Command Note
1
HEARTEN Query/set whether to turn on heartbeat packet function.
2
HEARTTP Query/set heartbeat packet sending method.
3
HEARTDT Query/Set heartbeat packet Data
4
HEARTTM Query/Set the sending heartbeat packet interval.

6.11 SOCKET DISTRIBUTION FUNCTION

In transparent transmission mode, the socket distribution function is enabled, and the client's
MCU only needs to send data packets according to this protocol format, and the serial server will
parse the received data packets. If it meets the protocol format, the serial server will send the parsed
data to the specified socket connection; If the data does not conform to the protocol format, the
corresponding error code will be returned and will not be sent to the specified socket connection. At
the same time, the data sent by the network will be packaged by the serial server according to the
protocol format and sent to the serial device.
(1) Serial device to module data format
The client MCU sends data packets according to the following format. After the module is parsed,
only N bytes of data are sent to the specified Socket connection. When data is returned, the data is
directly output from the serial port without parsing.
Header
Header:
Always 0x550xFD0xAA
Length:
The sum of all bytes from the parameter area (including the parameter area) to the checksum
(excluding the checksum). High byte first
Parameter area:
The first byte: common parameter area, which is the connection serial number (SocktA or
SocketB); If the serial number is 0x61, it represents all the connection objects sent to SocketA, and if it
is 0x62, it represents the connection objects sent to SocketB.
Second byte: spare parameter area, which is 0x00 by default.
The common parameter area is in front, and the spare parameter area is in the back.
Data:
Table heartbeat packet instruction list
Table Serial port sending format
Length
Parameter area Data Checksum
3
2(n+2)
2
n
71
1
www.waveshare.com

Advertisement

Table of Contents
loading

Table of Contents