HTTP testing with Simcom SIM7500, SIM7600, SIM7100 and SIM53XX Modules


Steps to test HTTP GET with SIM7500, SIM7600, SIM7100 and SIM53XX Modules

  • Verify that the device is registered with the network provider
  • Specify the host name with the AT+CHTTPACT command
  • Once the device responds with +CHTTPACT: REQUEST, send the HTPP formatted data
  • If the request is successful, HTTP response is sent with the +CHTTPACT:DATA response from the device.

AT Command Tester Tool provides an interface to test the HTTP GET connection with the Simcom modules. Enter the host name and the URL fields and press the ‘HTTP GET’ button.

For HTTP POST,

  • Specify the host name with the AT+CHTTPACT command
  • Build HTTP POST request with the host name, URL and the post parameters.
  • AT Command Tester Tool provides an interface to test the HTTP POST connection with the Simcom modules. Enter the host name, URL and the post data  fields and press the ‘HTTP POST’ button.

HTTP GET SCRIPT MODE

HTTP GET function can also be tested with script mode in the AT Command Tester tool.

Try the script in AT Command Tester tool.

//Script: simcom_http_get_53xx_7500x_7600x.at
//Use this script to test HTTP GET AT command with Simcom modules.
//This script can be used on following Simcom modules-
//SIM53XX, SIM7100X, SIM7500X, SIM7600X

//Launch the HTTP Operation
AT+CHTTPACT="httpbin.org",80

//Wait for the +CHTTPACT: REQUEST from the module
WAIT=1


//Build a HTTP GET request
// are script commands for carriage retun and line feed
//^z is a script command to send the CTRL+Z character
GET http://httpbin.org/get HTTP/1.1Host: httpbin.orgUser-Agent: AT Command TesterContent-Length: 0<cr><lf><cr><lf>^z<cr><lf> 

Output of the script in the AT Command Tester tool.

AT+CHTTPACT="httpbin.org",80

+CHTTPACT: REQUEST
GET http://httpbin.org/get HTTP/1.1
Host: httpbin.org
User-Agent: AT Command Tester
Content-Length: 0


OK

+CHTTPACT: DATA,404
http/1.1 200 ok
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
date: fri, 22 mar 2019 04:50:32 gmt
server: nginx
content-length: 184
connection: keep-alive

{
  "args": {}, 
  "headers": {
    "Host": "httpbin.org", 
    "User-Agent": "AT Command Tester"
  }, 
  "origin": "216.3.13.179, 216.3.13.179", 
  "url": "https://httpbin.org/get"
}

+CHTTPACT: 0

HTTP POST SCRIPT MODE

Try the script in AT Command Tester tool.

//Script: simcom_http_get_53xx_7500x_7600x.at
//Use this script to test HTTP POST AT command with Simcom modules.
//This script can be used on following Simcom modules-
//SIM53XX, SIM7100X, SIM7500X, SIM7600X

//Launch the HTTP Operation
AT+CHTTPACT="httpbin.org",80

//Wait for the +CHTTPACT: REQUEST from the module
WAIT=1


//Build a HTTP POST request
// are script commands for carriage retun and line feed
//^z is a script command to send the CTRL+Z character
//The content length should match the post data
POST http://httpbin.org/post HTTP/1.1Host: httpbin.orgUser-Agent: AT Command TesterContent-Length: 23parm1=data1&parm2=data2
^z


Output of the script in the AT Command Tester tool.

AT+CHTTPACT="httpbin.org",80

+CHTTPACT: REQUEST
POST http://httpbin.org/post HTTP/1.1
Host: httpbin.org
User-Agent: AT Command Tester
Content-Length: 23

parm1=data1&parm2=data2


OK

+CHTTPACT: DATA,520
http/1.1 200 ok
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
date: fri, 22 mar 2019 04:59:33 gmt
server: nginx
content-length: 300
connection: keep-alive

{
  "args": {}, 
  "data": "parm1=data1&parm2=data2", 
  "files": {}, 
  "form": {}, 
  "headers": {
    "Content-Length": "23", 
    "Host": "httpbin.org", 
    "User-Agent": "AT Command Tester"
  }, 
  "json": null, 
  "origin": "216.3.13.179, 216.3.13.179", 
  "url": "https://httpbin.org/post"
}

+CHTTPACT: 0


 
 
 
Keywords: Module , M2M , GPRS , 3G , through AT commands,