TCP/IP testing with Simcom SIM7000, SIM800 and SIM53XX Modules


Steps to test TCP/IP with SIM7000, SIM800 and SIM53XX Modules

  • Verify that the device is registered with the network provider
  • Set up the APN using the AT+CSTT command
  • Get the local IP address with AT+CIFSR comamnd
  • Bring up the wireless connection using the AT+CIICR command
  • Start the TCP connection with AT+CIPSTART command
  • Once TCP connection has been successfully established, send data using the AT+CIPSEND command.

AT Command Tester Tool provides an interface to test the TCP connection with the Simcom modules. Enter the APN information. Use the default server/port or enter the server you want to connect.

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

Try the script in AT Command Tester tool.

//Script: simcom_tcp_7000x_800x_53xx.at
//Use this script to test TCP AT commands with Simcom modules.
//This script can be used on following Simcom modules-
//SIM7000X, SIM800X, SIM53xx

//Set the APN
AT+CSTT="soracom.io"

WAIT=2

//Bring up Connection...
AT+CIICR

WAIT=2

//Get the local IP Address
AT+CIFSR

WAIT=2

//Start the TCP connection
AT+CIPSTART="TCP","postman-echo.com","80"

WAIT=3

//Send client data
AT+CIPSEND

WAIT=2

//Send the HTTP formatted data
<cr><lf>GET https://postman-echo.com/ip HTTP/1.0<cr><lf>Host:www.m2msupport.netConnection:keep-alive<cr><lf>

//Send the CTRL+Z character
^z

Output of the script in the AT Command Tester tool.

AT+CSTT="soracom.io"
OK
APN setup for TCP connection successful..

AT+CIICR
OK
Connection bring up successful..

AT+CIFSR
10.153.58.89
AT+CIPSTART="TCP","postman-echo.com","80"
OK

CONNECT OK
TCP connection success

AT+CIPSEND
>
GET https://postman-echo.com/ip HTTP/1.0
Host:www.m2msupport.netConnection:keep-alive



SEND OK
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Fri, 15 Mar 2019 12:57:42 GMT
ETag: W/"15-jIJx5VbR/rFNv8IxQMKrYBOY6lU"
Server: nginx
set-cookie: sails.sid=s%3AY9MPv4AuczljI1VxOXv7VCMvC2fKhpHN.sJLKb8StuyV4%2FKfr2utFIvTfIFtMdAgM3anOaR6pl0I; Path=/; HttpOnly
Vary: Accept-Encoding
Content-Length: 21
Connection: Close

{"ip":"18.195.64.41"}
CLOSED
TCP connection is closed by remote server

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