SIM900_IP_Application Note_V1.01
Smart Machine Smart Decision
Document Title:
Version:
Date:
Status:
SIM900 IP Application Note
1.01
2011-03-23
Release
SIM900_IP_Application Note_V1.01
Document Control ID:
General Notes
SIMCom offers this information as a service to its customers, to support application and
engineering efforts that use the products designed by SIMCom. The information provided is based
upon requirements specifically provided to SIMCom by the customers. SIMCom has not
undertaken any independent search for additional relevant information, including any information
that may be in the customer’s possession. Furthermore, system validation of this product designed
by SIMCom within a larger electronic system remains the responsibility of the customer or the
customer’s system integrator. All specifications supplied herein are subject to change.
Copyright
This document contains proprietary technical information which is the property of SIMCom
Limited., copying of this document and giving it to others and the using or communication of the
contents thereof, are forbidden without express authority. Offenders are liable to the payment of
damages. All rights reserved in the event of grant of a patent or the registration of a utility model
or design. All specification supplied herein are subject to change without notice at any time.
Copyright © Shanghai SIMCom Wireless Solutions Ltd. 2011
SIM900_IP_Application Note_V1.01 2011.03.23
3
Smart Machine Smart Decision
Contents
Version history ................................................................................................................................5
1.
Bearer Configure.................................................................................................................6
1.1 Bearer Profile...........................................................................................................................6
2.
HTTP Application ...............................................................................................................7
2.1 HTTP GET Method .................................................................................................................7
2.2 HTTP POST Method ...............................................................................................................7
2.3 HTTP HEAD Method..............................................................................................................8
2.4 Set Proxy HTTP Server ...........................................................................................................8
2.5 Set HTTP Redirection Parameter.............................................................................................9
2.6 Set HTTP Download Break Point Parameter.........................................................................10
3.
FTP Application.................................................................................................................10
3.1 FTP GET Method ..................................................................................................................11
3.2 FTP PUT Method...................................................................................................................12
3.3 FTP Time Out ........................................................................................................................13
3.4 FTP Error...............................................................................................................................14
3.5 FTP Operation Error..............................................................................................................14
3.6 FTP READ and WRITE Error...............................................................................................14
3.7 Set FTP Download Break Point Parameter............................................................................15
Appendix........................................................................................................................................17
Related Documents .................................................................................................17
Conventions and Abbreviations ..............................................................................17
A.
B.
SIM900_IP_Application Note_V1.01 2011.03.23
4
Smart Machine Smart Decision
Version history
Date
2010-11-15
2011-3-23
Version Description of change
1.00
1.01
Origin
Added new chapter 3.7 to describes how to use FTP
broken download resuming function.
Author
Chenyang
SCOPE
This document describes how to use the HTTP and FTP function of SIM900 through AT
commands.
Examples are also given for reference. This document can be used for SIM900 serial modules, like
SIM900, SIM900D, SIM900B and SIM900A.
This document is subject to change without notice at any time.
SIM900_IP_Application Note_V1.01 2011.03.23
5
Smart Machine Smart Decision
1. Bearer Configure
The bearer contexts of HTTP and FTP applications can be set or activated by SAPBR command.
1.1 Bearer Profile
Demonstration
Configure bearer profile 1
To open a GPRS context.
Syntax
AT+SAPBR=3,1,"Contype","G
PRS"
AT+SAPBR=3,1,"APN","CM
NET"
AT+SAPBR =1,1
Expect Result
OK
OK
OK
To query the GPRS context.
AT+SAPBR=2,1
+SAPBR:
1,1,"10.89.193.1"
OK
OK
To close a GPRS context.
GPRS context is released by
network
AT+SAPBR =0,1
+SAPBR 1: DEACT
SIM900_IP_Application Note_V1.01 2011.03.23
6
Smart Machine Smart Decision
2. HTTP Application
Hyper Text Transfer Protocol application provides a mode to alternate of HTTP server. The basic
application contains GET, POST, HEAD methods; it also supports proxy server, redirection,
broken transfer resuming functions.
2.1 HTTP GET Method
Download data from HTTP server
Demonstration
Init http service
Syntax
AT+HTTPINIT
Set parameters
session
for HTTP
GET session start
GET successfully
AT+HTTPPARA = “CID”,1
AT+HTTPPARA=“URL”,”ww
w.sim.com”
AT+HTTPACTION=0
the data of HTTP
Read
server
AT+HTTPREAD
Terminate http service
AT+HTTPTERM
Expect Result
OK
OK
OK
OK
+HTTPACTION:0,200,10
00
+HTTPREAD: 1000
…. //output the data to
uart
OK
OK
2.2 HTTP POST Method
Upload data to HTTP server
Demonstration
Init http service
Set parameters
session
for HTTP
Syntax
AT+HTTPINIT
AT+HTTPPARA = “CID”,1
AT+HTTPPARA=“URL”,”ww
w.sim.com”
Expect Result
OK
OK
OK
SIM900_IP_Application Note_V1.01 2011.03.23
7
Smart Machine Smart Decision
POST the data whose size is
100 Bytes and the maximum
latency time for inputting is
10000 ms. It is recommended
to set the latency time long
enough to allow downloading
all the data.
POST session start
POST successfully
AT+HTTPDATA=100,10000
AT+HTTPACTION=1
DOWNLOAD
…… //It is ready to
receive data from uart, and
DCD has been set to low.
OK //All data has been
received over, and DCD is
set to high.
OK
+HTTPACTION:1,200,0
Terminate http service
AT+HTTPTERM
OK
2.3 HTTP HEAD Method
Get HTTP head information from HTTP server
Demonstration
Init http service
Syntax
AT+HTTPINIT
Set parameters
session
for HTTP
HEAD session start
HEAD successfully
AT+HTTPPARA = “CID”,1
AT+HTTPPARA=“URL”,”ww
w.sim.com”
AT+HTTPACTION=1
Expect Result
OK
OK
OK
OK
+HTTPACTION:1,200,0
Terminate http service
AT+HTTPTERM
OK
2.4 Set Proxy HTTP Server
It provides the method to use proxy HTTP server.
Demonstration
Init http service
Syntax
AT+HTTPINIT
Set parameters
session
for HTTP
AT+HTTPPARA = “CID”,1
AT+HTTPPARA=“URL”,”ww
w.sim.com”
Expect Result
OK
OK
OK
SIM900_IP_Application Note_V1.01 2011.03.23
8
Smart Machine Smart Decision
Set proxy server IP address
Set proxy server port
GET session start
GET successfully
AT+HTTPPARA=“PROIP”,”1
0.0.0.172”
AT+HTTPPARA =
“PROPORT”,80
AT+HTTPACTION=0
the data of HTTP
Read
server
AT+HTTPREAD
Terminate http service
AT+HTTPTERM
2.5 Set HTTP Redirection Parameter
It provides the method to use HTTP redirection function.
Demonstration
Init http service
Syntax
AT+HTTPINIT
OK
OK
OK
+HTTPACTION:0,200,10
00
+HTTPREAD: 1000
…. //output the data to
uart
OK
OK
Expect Result
OK
OK
for HTTP
Set parameters
session
Set the redirection parameter
AT+HTTPPARA = “CID”,1
AT+HTTPPARA = “REDIR”,1 OK
Set the URL
GET session start
GET successfully
AT+HTTPPARA=“URL”,”ww
w.sim.com/abcde”
AT+HTTPACTION=0
Read the response of HTTP
server
AT+HTTPREAD
Terminate http service
AT+HTTPTERM
OK
OK
+HTTPACTION:0,200,10
00
+HTTPREAD: 1000
…. //output the data to
uart
OK
OK
SIM900_IP_Application Note_V1.01 2011.03.23
9