当前位置:   article > 正文

SIM7500 SIM7600 SIM800 HTTP_sim7500强制

sim7500强制

解释

//Start HTTP service
AT+HTTPINIT

//Stop HTTP service
AT+HTTPTERM

//Set HTTP Parameters value
/*
<tag>
HTTP parameters:
"URL" (Mandatory Parameter) HTTP client URL
"http://'server'/'path':'tcpPort' " "server": FQDN or IP-address "path": path of file or directory
"tcpPort": default value is 80. Refer to "IETF-RFC 2616".
<value>
String
*/
AT+HTTPPARA=<tag>,<vaule>

//HTTP Method Action
/*
<method>
HTTP method specification:
0: GET
1: POST
2: HEAD
<statuscode>
HTTP Status Code responded by remote server, it identifier refer to HTTP1.1(RFC2616) :
100 Continue
101 Switching Protocols
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
307 Temporary Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Time-out
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Large
415 Unsupported Media Type
416 Requested range not satisfiable
417 Expectation Failed
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Time-out
505 HTTP Version not supported
600 Not HTTP PDU
601 Network Error
602 No memory
603 DNS Error
604 Stack Busy
<datalen>
The length of data received
*/
AT+HTTPACTION=<method>

//Read the HTTP Header Information of Server Response
AT+HTTPHEAD

//Read the HTTP server response
/*
<start_addr>
The starting point for data output.
<byte_size>
The length for data output
<data>
Data from HTTP server or user input
*/
AT+HTTPREAD=<start_addr>,<byte_size>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90

实例

AT+HTTPINIT //初始化HTTP

OK

AT+HTTPPARA="URL","http://cloud.test.cn"    //设置URL参数

OK

AT+HTTPPARA="CONTENT","application/x-www-form-urlencoded"   //设置CONTENT参数

OK

AT+HTTPDATA=4,4000  //设置数据长度

DOWNLOAD
data    //数据
1A<Ctrl+Z>  //发送结束
OK

AT+HTTPACTION=1 //POST

OK


+HTTPACTION: 1, 200, 11

AT+HTTPREAD=0,512   //读取返回数据

+HTTPREAD: 11

AT+HTTPTERM //结束HTTP

OK
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/940783
推荐阅读
相关标签
  

闽ICP备14008679号