USR-WIFI232-A/B/C User Manual
http://www.usriot.com
Jinan USR IOT Technology Limited
Page 27 of 93
The transparent transmission mode can fully compatible with user’s original software platform
and reduce the software development effort for integrate wireless data transmission.
Notes:
Notes:
Notes:
Notes:
Users also open the serial port hardware flow control (CTS/RTS) function, so that we can
make the bit error rate to a minimum.If the user doesn't need hardware flow control function of the
serial port, only need to the corresponding pin foot (CTS/RTS) hung up.
4.2.2
Serial command mode
In this mode, the user can send the serial data to a different server address, this pattern can be
use udp or TCP client sends data to the server.
Customer MCU send packets according to the following format, parsing module is finished, only
the n bytes of data sent to the destination address.When data is returned, not analytical data from
serial port output directly.
Table 8
Protocol table of Serial command mode
frame
header
length
functio
n
byte
Backup
data area
Destinati
on port
Target
address
Data
Sum
check
2
2
(n+m+5)
1
2
2
m
n
1
frame
frame
frame
frame header
header
header
header
:
0x55 0xAA
(
Constant
)
Length
Length
Length
Length
:
Starting from the function byte, to Sum check (does not contain the sum check) all bytes.
High byte at the front
Function
Function
Function
Function byte
byte
byte
byte
:
Bit0:
(
UDP:0 ;TCP:1
)
Bit1:
(
Short connection:0;Long connection:1
)
Bit2:
(
IP:0;Domain name:1
)
Bit7:
(
cut protocol:0;full protocol:1
)
Note: currently only supports cut protocol
Notes:
�
Bit1:If it is a short connection, it sends data, and then will be disconnected; if it is long
connection, it sends data, connection will remain, until the re changing 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 the 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
Backup
Backup
Backup data
data
data
data area
area
area
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