0% found this document useful (0 votes)
53 views

SIM900A at Commands

HTTP (Hypertext Transfer Protocol) can be used with SIM900 modems using various AT commands. The GET method is used to retrieve data from a server, while the POST method posts data to a server. Commands like AT+SAPBR are used to configure the GPRS bearer profile and context. The AT+HTTPINIT, AT+HTTPPARA, AT+HTTPACTION, and AT+HTTPTERM commands are used to initialize an HTTP session, set parameters, send GET/POST requests, and terminate the session. The AT+HTTPDATA and AT+HTTPREAD commands are used to send POST data and read response data from the server.

Uploaded by

Tebogo Sekgwama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

SIM900A at Commands

HTTP (Hypertext Transfer Protocol) can be used with SIM900 modems using various AT commands. The GET method is used to retrieve data from a server, while the POST method posts data to a server. Commands like AT+SAPBR are used to configure the GPRS bearer profile and context. The AT+HTTPINIT, AT+HTTPPARA, AT+HTTPACTION, and AT+HTTPTERM commands are used to initialize an HTTP session, set parameters, send GET/POST requests, and terminate the session. The AT+HTTPDATA and AT+HTTPREAD commands are used to send POST data and read response data from the server.

Uploaded by

Tebogo Sekgwama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

HTTP (Hypertext Transfer Protocol)

To use HTTP function using SIM900 modem follow below AT commands. Two methods are
there namely,

GET: to get data from server.

POST: to post data to server.

First, we need to connect to GPRS by configure bearer profile using AT command as,

Demonstration Syntax ExpectedResponse

AT+SAPBR=3,1,"Contype","GPRS" OK

Configure bearer profile 1

AT+SAPBR=3,1,"APN","internet" OK

To open a GPRS context. AT+SAPBR =1,1 OK

+SAPBR: 1,1,"10.89.193.1"
AT+SAPBR=2,1
OK

To close a GPRS context. AT+SAPBR =0,1 OK

Note: Enter Access Point Name (APN) of corresponding network service provider. E.g. here
we have entered “internet” which is APN of IDEA network.

Now let’s see AT commands for GET method,

HTTP GET method

Demonstration Syntax ExpectedResponse

Initiate http service AT+HTTPINIT OK

AT+HTTPPARA= “CID”,1
OK
Set parameters for HTTP
session
AT+HTTPPARA=
OK
“URL”,”api.thingspeak.com”

GET session start AT+HTTPACTION=0 OK

GET successfully AT+SAPBR =0,1 +HTTPACTION:0,200,1000


+HTTPREAD: 1000
Read the data of HTTP
AT+HTTPREAD Read data….
server
OK

Terminate http service AT+HTTPTERM OK

Note: Enter http client URL. e.g. here we have entered “api.thingspeak.com”.

Now let’s see AT commands for POST method,

HTTP POST method

Demonstration Syntax Expected Response

Initiate http service AT+HTTPINIT OK

AT+HTTPPARA= “CID”,1 OK

Set parameters for HTTP session AT+HTTPPARA= “URL”,”


www.google.com” OK

DOWNLOAD
POST the data whose size is 100Bytes
and the maximum latency time for Enter data of exact size
inputting is 10000ms. It is mentioned in syntax
AT+HTTPDATA=100,10000
recommended to set the latency time OK
long enough to download all the Data
in the latency time. All data has been
received

POST session start AT+HTTPACTION=1 OK

POST successfully +HTTPACTION:1,200,0

Terminate http service AT+HTTPTERM OK

You might also like