페이지 선택
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in pages

HTTP(S)-POST 

Practice communication between server and client using HTTP POST method with LTE-M/CAT-M1 module.

 

 

 

 

 

2. HTTP POST-EX1 → SIM7000 &  SIM7070, SIM7080, SIM7090

 

NO Command Response 설명
1 PDP Context 설정    
  AT+SHCONF=”URL”,”http://httpbin.org” OK Set up server URL
  AT+SHCONF=”BODYLEN”,1024 OK Set HTTP body length
  AT+SHCONF=”HEADERLEN”,350 OK Set HTTP head length
  AT+SHCONN OK Connect to HTTP server
  AT+SHSTATE?

+SHSTATE: 1

OK

Check HTTP status
  AT+SHCHEAD OK Clear HTTP header
  AT+SHAHEAD=”Content-Type”,”application/x-www-form-urlencoded” OK Add header content
  AT+SHAHEAD=”Cache-control”,”no-cache”\r OK Add header content
  AT+SHAHEAD=”Connection”,”keep-alive” OK Add header content
  AT+SHAHEAD=”Accept”,”*/*” OK Add header content
  AT+SHCPARA\r OK Add header content
  AT+SHPARA=”product”,”apple” OK Add header content
  AT+SHPARA=”price”,”1″ OK Add header content
  AT+SHREQ=”/post”,3

OK

+SHREQ: “POST”,200,452

POST method
  AT+SHREAD=0,452

OK

+SHREAD: 452
{
“args”: {},
“data”: “”,
“files”: {},
“form”: {
“price”: “1”,
“product”: “apple”
},
“headers”: {
“Accept”: “*/*”,
“Cache-Control”: “no-cache”,
“Content-Length”: “21”,
“Content-Type”: “application/x-www-form-urlencoded”,
“Host”: “httpbin.org”,
“X-Amzn-Trace-Id”: “Root=1-647c4af4-5943ae433d86f78966284579”
},
“json”: null,
“origin”: “193.181.246.191”,
“url”: “http://httpbin.org/post”
}

 
  AT+SHDISC OK  

 

 

 

 

 

 

2. HTTP POST-EX2 → SIM700 & SIM7070, SIM7080, SIM7090

 

NO Command Response 설명
1 PDP Context 설정    
2 AT+SHCONF=”URL”,”http://httpbin.org” OK Set up server URL
3 AT+SHCONF=”BODYLEN”,1024 OK Set HTTP body length
4 AT+SHCONF=”HEADERLEN”,350 OK Set HTTP head length
5 AT+SHCONN OK Connect to HTTP server
6 AT+SHSTATE?

+SHSTATE: 1

OK

Check HTTP status
7 AT+SHCHEAD OK Clear HTTP header
8 AT+SHAHEAD=”Content-Type”,”application/x-www-form-urlencoded” OK Add header content
9 AT+SHAHEAD=”Cache-control”,”no-cache”\r OK Add header content
10 AT+SHAHEAD=”Connection”,”keep-alive” OK Add header content
11 AT+SHAHEAD=”Accept”,”*/*” OK Add header content
12 AT+SHBOD=29,10000 > Add header content
13 {“title”:”Hello http server”} OK Add header content
14 AT+SHREQ=”/post”,3

OK

+SHREQ: “POST”,200,452

POST method
15 AT+SHREAD=0,452

OK

+SHREAD: 452
{
“args”: {},
“data”: “”,
“files”: {},
“form”: {
“price”: “1”,
“product”: “apple”
},
“headers”: {
“Accept”: “*/*”,
“Cache-Control”: “no-cache”,
“Content-Length”: “21”,
“Content-Type”: “application/x-www-form-urlencoded”,
“Host”: “httpbin.org”,
“X-Amzn-Trace-Id”: “Root=1-647c4af4-5943ae433d86f78966284579”
},
“json”: null,
“origin”: “193.181.246.191”,
“url”: “http://httpbin.org/post”
}

Read data length is 457
16 AT+SHDISC OK Disconnect HTTP

 

 

 

 

Adsense

 

 WiFi IoT Module

 

www.mxchip.com

 

 

 Bluetooth Module

www.feasycom.com

 

 

 5G/LTE/CAT-M1/NB-IoT

 

www.simcom.com

 

Viewed Page List