CX-WIFI-2NET module user manual
Shenzhen Coolmay Technology Co.,Ltd
www.coolmay.com
Page
11
,Total 93 Pages
<Description>:
Transparent transmission mode is the least complex data transmission. The user
turns on the hardware flow control (CTS/RTS) function of the serial port, which can
minimize the bit error rate.
2.2.2 Serial command mode
In this mode, users can send serial port data to different server addresses
according to our protocol, and send data to different servers without restarting. This
mode can send data to the server using UDP or TCP client.
The client MCU sends the packet in the following format. After the module is parsed,
only n bytes of data are sent to the destination address. When there is data return, the
data is directly output from the serial port without parsing.
Serial command mode protocol table
:
Baotou
Length
Functional
word
Alternate
parameter area
Target
port
Target
address
Data
Sum
check
2
2
(n+m+5)
1
2
2
m
n
1
Baotou
:
Constant for 0x55 0xaa
Length
:
The sum of all the number of bytes from the start of the function word to the check
(without the checksum). High byte first function word:
Bit0
:
(
UDP
:
0
;
TCP
:
1
)
Bit1
:
(
Short connection: 0; long connection:1
)
Bit2
:
(
IP
:
0
;
Domain name
:
1
)
Bit7
:
(
Streamlined protocol: 0; Full protocol
:
1
)
Note: Currently only the streamlined
protocol is supported.
Note
:
● For Bit1, if it is a short connection, the data will be disconnected after sending the
data; if it is a long connection, after the data is sent, the connection will remain until the
target address is changed again.
● For Bit2, it indicates whether the destination address is IP or domain name. If it is
IP, the destination address is 4 bytes. If it is a domain name, the target address length
is the length of the entire domain name string (where the last byte of the destination
address is 0x00). , that is, the end of the string, the length of the domain name is not
fixed).
● For Bit7, in the thin protocol, the reply frame contains only data. Under the full
protocol, the reply frame will have a frame failure such as sending failure, waiting for
timeout, and responding to the device IP under UDP broadcast.
Alternate parameter area
:
The first byte: If it is a short connection, this location is the TCP wait timeout period
(1-255). If the response is not received after the send command is completed, wait for
the corresponding number of seconds. If it is 5, it means the maximum wait. 5s
disconnected; if the return data is received immediately after sending the command,
the connection is immediately disconnected; if it is a long connection, it is 0x00 here.
Содержание CX-WIFI-2NET
Страница 30: ...Shenzhen Coolmay Technology Co Ltd CX WIFI 2NET module user manual Page 30 Total 93 pages www coolmay com ...
Страница 73: ...Shenzhen Coolmay Technology Co Ltd CX WIFI 2NET module user manual www coolmay com Page 73 Total 93 pages ...
Страница 75: ...Shenzhen Coolmay Technology Co Ltd CX WIFI 2NET module user manual www coolmay com Page 75 Total 93 pages ...
Страница 84: ...Shenzhen Coolmay Technology Co Ltd CX WIFI 2NET module user manual www coolmay com Page 84 Total 93 pages ...
Страница 86: ...Shenzhen Coolmay Technology Co Ltd CX WIFI 2NET module user manual www coolmay com Page 86 Total 93 pages ...