USR-DR404 user manual
Jinan USR IOT Technology Limited
20
Bit7
:(
Simple protocol
:
0
;
Full protocol
:
1
)
Note: Only simple protocols are currently supported.
Note
:
For Bit1, long connection, then after sending data, 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 length of the destination address is the length of the entire domain name string (where the
last byte of the destination address is 0x00, is the end of the string, the length of the domain name is indefinite)
For Bit7, under the simple protocol, the reply frame contains only data; under the full protocol, the reply frame will fail
to send, waiting for timeout, and the frame format of the response device IP under UDP broadcast.
Reserved parameter
:
First byte: long connection, 0X00.
Second byte: reserved.
Destination port
:
Low byte first, such as port 33, here is 21 00.
Destination address
:
If it is IP, it is 4 bytes. For example, 192.168.0.133 means 85 00 A8 C0; if it is a domain name, the address length is
indefinite and ends with “\ 0”.
Data
:
Variable length, up to 1000 bytes
Parity
:
From the function code, to the byte before the parity, add. The following are examples of specific applications:
Send data
:
55 aa 00 0a 00 00 00 21 00 85 00 A8 C0 01 0f
Length type 00 0a
:
Length: n+m+5, here is 10
Function code 00
:
UDP mode
Destination IPaddress 85 00 A8 C0
:
192.168.0.133
Data 00
:
Length is 1,
Parity
:
0x00+0x00+0x00+0x21+0x00+0x85+0x00+0xA8+0xC0+0x01=0x0f
3.1.3. HTTPD Client Mode
The HTTPD Client mode supports three HTTP request methods: POST, PUT, and GET. After setting the specific content
of the HTTP header through the AT command or the web page, each time data is sent, the WIFI serial server will
automatically encapsulate the sent data into HTTP protocol data and send it to the designated HTTP server. The data
received from the server will be directly transmitted to the serial port without any processing.
The following are specific application examples:
First set HTTP parameters through AT command:
No.
Item
Description