Convert Server User Manual
Jinan USR IOT Technology Limited
18 / 41
Data:
Data:
Data:
Data:
Variable length,the maximum not exceeding 1000bytes.
Sum
Sum
Sum
Sum check:
check:
check:
check:
From the function word to check byte (does not 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
Function byte:0x00 (UDP;Short connection;IP;cut protocol)
Destination port:0x21 0x00(33)
Target address:0x85 0x00 0xA8 0xC0 (192.168.0.133)
Data:0x01(data length :1)
Sum check:0x0f (0x00+0x00+0x00+0x21+0x00+0x85+0x00+0xA8+0xC0+0x01=0x0f)
5.2.3.
5.2.3.
5.2.3.
5.2.3. HTTPD
HTTPD
HTTPD
HTTPD Client
Client
Client
Client mode
mode
mode
mode
This mode is used to send data to the HTTP server.
After setting the HTTP header format by webpage or AT command, the data sent each time by UART will add
the HTTP header automatically.Convenient for the user directly submit data or read data from the HTTP
server.
Below is the specific application, for example:
The first set HTTP parameters using AT instructions.
AT+HTTPURL=192.168.1.1,80
The serveraddress and portsettings
AT+HTTPTP=POST
Set the HTTP type, GET, PUT or
POST
AT+HTTPPH=/set
Set the path,the mostis50 bytes
AT+HTTPCN=keep-alive
Set the Connection,maximum length
of 20bytes
AT+HTTPUA=lwip13.2
Set the User-Agent,maximum length
of 20bytes
If the sending data is 1234.In the 80 port of 192.168.1.1 will receive the following data
POST /set HTTP /1.1
Connection:keep-alive
User-Agent:lwip1.3.2
Content-Length:4
Host:192.168.1.1:80
1234
If the HTTP type is GET, the 80 port 192.168.1.1 receive data
POST /set
1234
HTTP /1.1
Connection:keep-alive
User-Agent:lwip1.3.2
Content-Length:0