Page 1
FTP HTTP AT Commands User Guide AN_SIM900_FTP_HTTP_APP_V1.00...
Page 2
AN_SIM900_FTP_HTTP_Application Note_V1.00_Beta 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.
SIM900 IP APPLICATION VERSION HISTORY Now document: SIM900 IP Application Note” Version 1.00 Version What is new Chapter V1.00 SIM900 IP APPLICATION...
SIM900 IP APPLICATION Contents Version history 1. Introduction 1.1 Scope of the document ..........................7 1.2 Related documents ............................7 1.3 Conventions and abbreviations ........................7 AT commands 2.1 AT+SAPBR..............................8 2.2 Internet HTTP Service Commands ......................9 2.2.1 AT+HTTPINIT..........................9 2.2.2 AT+HTTPTERM..........................
Page 5
SIM900 IP APPLICATION 3.11 FTP ERROR............................34 3.12 FTP OPERATION ERROR........................34 3.13 FTP READ AND WRITE ERROR ...................... 34 SIM900 IP APPLICATION...
SIM900 IP APPLICATION 1. INTRODUCTION 1.1 Scope of the document This document describes how to use AT commands for FTP and HTTP function. 1.2 Related documents [1] SIM900 AT Commands Set. [2] SIM900_TCPIP 1.3 Conventions and abbreviations File Transfer Protocol HTTP Hypertext Transfer Protocol Access Point Name...
SIM900 IP APPLICATION < ConParamTag > bearer parameter “CONTYPE” Type of Internet connection. Value refer to < ConParamValue_ConType> “APN” Access point name string: maximum 50 characters “USER” User name string: maximum 50 characters “PWD” Password string: maximum 50 characters “PHONENUM” Phone number for CSD call “RATE”...
SIM900 IP APPLICATION If error is related to ME functionality: ERROR Parameters Reference Note Before using HTTP service, HTTPINIT should be executed to initialize the HTTP stack firstly. 2.2.2 AT+HTTPTERM AT+HTTPTERM HTTP Service Terminate Test command Response AT+HTTPTERM= Write command Response AT+ HTTPTERM If error is related to ME functionality:...
Page 10
SIM900 IP APPLICATION HTTPParamValue If error is related to ME functionality: > ERROR Parameters < HTTPParamTag > HTTP Parameter “CID” (Mandatory Parameter) bearer profile identifier refer to AT+SAPBR “URL” (Mandatory Parameter) HTTP client URL "http://'server'/'path':'tcpPort' " "server": FQDN or IP-address "path": path of file or directory "tcpPort": If parameter is omitted, the service connects to HTTP default port 80.
SIM900 IP APPLICATION 2.2.4 AT+HTTPDATA AT+HTTPDATA HTTP DATA WRITE Test command Response AT+HTTPDATA=? +HTTPDATA: (1-60416), (1000-120000) Parameters Write command Response AT+HTTPDATA=< size>,<time> DOWNLOAD If error is related to ME functionality: +CME ERROR: <err> Parameters <size> Size in bytes for the data which is put by the command of “POST”. <time>...
Page 12
SIM900 IP APPLICATION Parameter < Method > HTTP method specification: 0: GET 1: POST 2: HEAD <StatusCode> HTTP status code responded by remote server, its identifier refer to HTTP1.1(RFC2616) 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content...
SIM900 IP APPLICATION 417 Expectation Failed 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Time-out 505 HTTP Version not supported 600 Not HTTP PDU 601 Network Error 602 No memory 603 DNS Error 604 Stack Busy <DataLen>...
SIM900 IP APPLICATION Parameters <data> The data of HTTP server response by AT+ HTTPACTION=0 <start_address> The starting point for data output <byte_size> The length for data output <data_len> The actual length for data output Test command Response AT+HTTPREAD=? +HTTPREAD: (1- 318976), (1- 318976) Reference Note The execution is used to send the HTTP server response to UART or...
SIM900 IP APPLICATION Read command Response AT+ FTPPORT? +FTPPORT: < value > Parameters See Write Command Reference Note Numbers above 65535 are illegal as the port identification fields are 16 bits long in the TCP header. 2.3.2 AT+ FTPMODE AT+FTPMODE SET FTP ACTIVE OR PASSIVE MODE Test command Response...
SIM900 IP APPLICATION 2.3.3 AT+FTPTYPE AT+FTPTYPE SET THE TYPE OF DATA TO BE TRANSFERRED Test command Response AT+FTPTYPE =? Parameters Write command Response AT+FTPTYPE =<value> If error is related to ME functionality: ERROR Parameters <value> “A” : for FTP ASCII sessions “I”...
SIM900 IP APPLICATION Write command Response AT+FTPPUTOPT =<value> If error is related to ME functionality: ERROR Parameters <value> “APPE”: for append file “STOU”: for store unique file “STOR”: for store file Default value is “STOR” Read command Response AT+FTPPUTOPT? +FTPPUTOPT: < value > Parameters See Write Command Reference...
SIM900 IP APPLICATION Parameters See Write Command Reference Note 2.3.6 AT+FTPREST AT+FTPREST RESUME BEOKEN DOWNLOADS Test command Response AT+ FTPREST =? Parameters Write command Response AT+FTPREST=<va lue> If error is related to ME functionality: ERROR Parameters <value> broken point to be resumed Read command Response AT+ FTPREST?
SIM900 IP APPLICATION 2.3.7 AT+FTPSERV AT+FTPSERV SET FTP SERVER ADDRESS Test command Response AT+FTPSERV =? Parameters Write command Response AT+FTPSERV =<value> If error is related to ME functionality: ERROR Parameters <value> 32-bit number in dotted-decimal notation (i.e. xxx.xxx.xxx.xxx) or alphanumeric ASCII text string up to 49 characters if DNS is available Read command Response AT+FTPSERV?
SIM900 IP APPLICATION Write command Response AT+FTPUN=<value > If error is related to ME functionality: ERROR Parameters <value> Alphanumeric ASCII text string up to 49 characters. Read command Response AT+FTPUN? +FTPUN: < value > Parameters See Write Command Reference Note 2.3.8 AT+FTPPW AT+FTPPW SET FTP PASSWORD...
SIM900 IP APPLICATION Parameters See Write Command Reference Note 2.3.9 AT+ FTPGETNAME AT+FTPGETNAME SET DOWNLOAD FILE NAME Test command Response AT+FTPGETNAM E =? Parameters Write command Response AT+FTPGETNAM E =<value> If error is related to ME functionality: ERROR Parameters <value> Alphanumeric ASCII text string up to 99 characters Read command Response AT+FTPGETNAM...
SIM900 IP APPLICATION 2.3.10 AT+FTPGETPATH AT+FTPGETPATH SET DOWNLOAD FILE PATH Test command Response AT+FTPGETPATH Parameters Write command Response AT+FTPGETPATH =<value> If error is related to ME functionality: ERROR Parameters <value> Alphanumeric ASCII text string up to 99 characters Read command Response AT+FTPGETPATH +FTPGETPATH: <...
SIM900 IP APPLICATION Write command Response AT+FTPPUTNAM E =<value> If error is related to ME functionality: ERROR Parameters <value> Alphanumeric ASCII text string up to 99 characters Read command Response AT+FTPPUTNAM +FTPPUTNAME: < value > Parameters See Write Command Reference Note 2.3.12 AT+FTPPUTPATH AT+FTPPUTPATH SET UPLOAD FILE PATH...
SIM900 IP APPLICATION Read command Response AT+FTPPUTPATH +FTPPUTPATH: < value > Parameters See Write Command Reference Note 2.3.13 AT+FTPGET AT+FTPGET SET DOWNLOAD FILE Test command Response AT+FTPGET =? Parameters Write command Response If mode is 1, it is a successful FTP get session: AT+FTPGET =<mode>,[<...
SIM900 IP APPLICATION Parameters < mode> 1: for open FTP get session 2: for read FTP download data. <reqlength> Requested number of data bytes (1-1460)to be read <cnflength> Confirmed number of data bytes to be read, which may be less than <length>.
SIM900 IP APPLICATION Write command Response AT+FTPPUT If mode is 1, it is a successful FTP get session: =<mode>,[< reqlength>] +FTPPUT:1,1,<maxlength> If mode is 1, it is a failed FTP get session: +FTPPUT:1,<error> If mode is 2 and <reqlength> is not 0 +FTPPUT:2,<cnflength>...
SIM900 IP APPLICATION Demonstration Syntax Expect Result Configure bearer profile 1 SAPBR=3,1,"Contype","GPRS " AT+SAPBR=3,1,"APN","CMNET" To open a GPRS context. AT+SAPBR =1,1 To query the GPRS context. AT+SAPBR=2,1 +SAPBR: 1,1,"10.89.193.1" To close a GPRS context. AT+SAPBR =0,1 GPRS context released +SAPBR 1: DEACT network 3.2 HTTP GET method Demonstration...
SIM900 IP APPLICATION Set parameters for HTTP session AT+HTTPPARA = “CID”,1 AT+HTTPPARA=“URL”,”www.si m.com” POST the data whose size is 100 AT+HTTPDATA=100,10000 DOWNLOAD Bytes and the maximum latency …… //It is ready to receive time for inputting is 10000 ms. It is data from uart , and DCD has recommended to set the latency time been set to low.
SIM900 IP APPLICATION Set parameters for HTTP session AT+HTTPPARA = “CID”,1 AT+HTTPPARA=“URL”,”www.si m.com” Set proxy server IP address AT+HTTPPARA=“PROIP”,”10.0.0. 172” Set proxy server port AT+HTTPPARA = “PROPORT”,80 GET session start AT+HTTPACTION=0 GET successfully +HTTPACTION:0,200,1000 Read the data of HTTP server AT+HTTPREAD +HTTPREAD: 1000 ….
SIM900 IP APPLICATION 3.7 Set HTTP Download Break Point Parameter Demonstration Syntax Expect Result Init http service AT+HTTPINIT Set parameters for HTTP session AT+HTTPPARA = “CID”,1 Set the URL, the size of gif is 16384 AT+HTTPPARA = “URL”,” bytes http://www.sim.com/img/sim_logo_j r_1003_38.gif”...
SIM900 IP APPLICATION , but AT+FTPGET=2,1024 +FTPGET:2,50 Request to read 1024 bytes Only 50 bytes are now available. 0123456789012345678901234 5678901234567890123456789 Request to read 1024 bytes again. AT+FTPGET=2,1024 +FTPGET:2,0 0 bytes are now available, but it is not the end of session If the module receives data but user +FTPGET:1,1 input...
SIM900 IP APPLICATION Open the FTP put session AT+ FTPPUT =1 FTP session is ready for upload. +FTPPUT:1,1,1280 1280 is the max length of data which can be sent at a time. It depends on the network status. Client requests to send 100 bytes. AT+FTPPUT=2,100 +FTPPUT:2,100 Response will indicates that user...
SIM900 IP APPLICATION If the user do not read data +FTPGET:1,64 for a , the session will time out. long time The connection to the FTP server is closed. 3.11 FTP ERROR Demonstration Syntax Expect Result Set wrong password AT+FTPPW="3214567" Open the FTP Get session AT+ FTPGET =1 FTP session password error.
Page 34
SIM900 IP APPLICATION Read data before “+FTPGET:1,1” is AT+FTPGET=2,1000 ERROR shown Data are available +FTPGET:1,1 Read data after “+FTPGET:1,1” is AT+ FTPGET =1 +FTPGET:2,50 shown 0123456789012345678901234 5678901234567890123456789 Data transfer finished. +FTPGET:1,0 connection to the FTP server is closed. Read data after FTP session is AT+FTPGET=2,1000 ERROR stopped...
Page 35
SIM900 IP APPLICATION Contact us: Shanghai SIMCom Wireless Solutions Ltd. Add: Building A, SIM Technology Building, No.633 Jinzhong Road, Changning District, Shanghai, P. R. China 200335 Tel: +86 21 3252 3300 Fax: +86 21 3252 3301 URL: www.sim.com/wm SIM900 IP APPLICATION...
Need help?
Do you have a question about the SIM900B and is the answer not in the manual?
Questions and answers