Waveshare WIFI232-B2 User Manual page 23

Table of Contents

Advertisement

WIFI232-B2 User Manual
Bit1: (Short connection: 0; Long connection: 1)
Bit2: (IP: 0; Domain name: 1)
Bit7: (cut protocol: 0; full protocol: 1)
Notes:
Bit1: If it is short connection, it sends data, and then will be disconnected.
If it is long connection, it sends data, connection will remain, until re-change the
target address.
Bit2: Indicates that the target address is IP or domain name. If it is IP, the
target address is 4 bytes; if it is domain name, the target address length for the entire
domain name string length (the last byte address is "\0", that is the end of the string).
Bit7: Under the cut protocol, reply frame contains only data; Under the full
protocol, reply frame has "failed to send', "waiting for", "UDP radio response
equipment IP" frame data.
Backup data area:
First byte: If it is a short connection, this position is TCP waits for the
timeout time (1-255), if the send command is completed, did not receive a response,
then wait a few seconds and the corresponding, if 5, said to wait for the 5S to
disconnect if the sending command, immediately receive the returned data, then
immediately disconnected; if it is long connection, this position is 0x00.
Second byte: Reserve
Destination port:
Little endian, low byte in the former, such as port 23, here are 0x17 0x00
Target address:
If it is IP, is 4 bytes. For example, 192.168.0.7 said 0x07 0x00 0xA8 0xC0; If it is a
domain name, then the address of indefinite length, ending with the '\0'.
Data:
Variable length, the maximum not exceeding 1000bytes.
Sum check:
From the function word to check byte (doesn't contain a check byte), add Sum
check. The following is an example of a specific application:
Send data: 0x55 0xaa 0x00 0x0a 0x00 0x00 0x00 0x21 0x00 0x85 0x00 0xa8 0xc0
0x01 0x0f
Length: 0x00 0x0a (It is n+m+5, here is 10)
Function byte: 0x00 (UDP; Short connection; IP; cut protocol)
Destination port: 0x21 0x00(33)
currently only supports cut protocol
23 / 102

Advertisement

Table of Contents
loading

Table of Contents