Quectel GSM AT Commands Manual V1.3

Quectel_GSM__AT_Commands_Manual_V1.3

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 15

DownloadQuectel GSM  AT Commands Manual V1.3
Open PDF In BrowserView PDF
GSM
Quectel Cellular Engine

HTTP Service
AT Commands
GSM_HTTP_ATC_V1.3

HTTP Service AT Commands

Document Title

HTTP Service AT Commands

Version

1.3

Date

2015-12-29

Status

Release

Document Control ID

GSM_HTTP_ATC_V1.3

l
e
t
l
c
a
e
i
t
u
n
Q ide
f
n
o
C

General Notes
Quectel offers this information as a service to its customers, to support application and
engineering efforts that use the products designed by Quectel. The information provided is
based upon requirements specifically provided to Quectel by the customers. Quectel 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 Quectel 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 Quectel
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 Quectel Wireless Solutions Co., Ltd. 2015

GSM_HTTP_ATC_V1.3

-1-

HTTP Service AT Commands

Contents
Contents ............................................................................................................................................ 2
0. Revision History ........................................................................................................................... 3
1. Introduction ................................................................................................................................... 4
1.1. Reference ........................................................................................................................... 4
2. AT Commands for HTTP Service ................................................................................................. 5
2.1. Overview of AT Commands for HTTP Service ................................................................. 5
2.2. Detailed Description of AT Commands for HTTP Service ............................................... 5
2.2.1.
AT+QHTTPURL Set HTTP Server URL ....................................................... 5
2.2.2.
AT+QHTTPGET Send HTTP GET Request .................................................. 6
2.2.3.
AT+QHTTPREAD Read HTTP Server Response ......................................... 6
2.2.4.
AT+QHTTPPOST Send HTTP POST Request .............................................. 7
2.2.5.
AT+QHTTPDL Download file from HTTP server......................................... 8
3. Supported Unsolicited Result Codes ............................................................................................. 9
3.1. Summary of CME ERROR Codes ..................................................................................... 9
4. Examples ..................................................................................................................................... 11
4.1. Send HTTP GET Request ................................................................................................ 11
4.2. Send HTTP POST Request .............................................................................................. 12
4.3. Download File from HTTP Server ................................................................................... 13

l
e
t
l
c
a
e
i
t
u
n
Q ide
f
n
o
C

GSM_HTTP_ATC_V1.3

-2-

HTTP Service AT Commands

0. Revision History
Revision

Date

Author

Description of change

1.0

2009-07-06

Jay XIN

Initial

1.1

2012-06-04

Will SHAO

Added Command AT+QHTTPDL

1.2

2015-04-13

Will SHAO

Added applicable modules

1.3

2015-12-29

Jelly WANG

Modified the problem that some AT commands
are displayed incompletely.

l
e
t
l
c
a
e
i
t
u
n
Q ide
f
n
o
C
GSM_HTTP_ATC_V1.3

-3-

HTTP Service AT Commands

1. Introduction
Quectel Module has an internal TCP/IP stack that is driven by AT commands and enables the host
application to easily access the Internet service. It includes TCP service, UDP service, FTP service
and HTTP service, etc. This document is a reference guide to all the AT commands and responses
defined for HTTP Service. The advantage of this solution is that it eliminates the need for the
application manufacturer to implement own HTTP protocol, thus minimizing cost and time to
integrate Internet connectivity into a new or existing host application.
This document is applicable to all Quectel GSM modules.

l
e
t
l
c
a
e
i
t
u
n
Q ide
f
n
o
C

1.1. Reference

Table 1: Reference
SN

Document name

Remark

[1]

GSM_TCPIP_AN.pdf

TCPIP Application Notes

[2]

RFC 2616

GSM_HTTP_ATC_V1.3

-4-

HTTP Service AT Commands

2. AT Commands for HTTP Service

2.1. Overview of AT Commands for HTTP Service
Command

Description

AT+QHTTPURL

Set HTTP Server URL

AT+QHTTPGET

Send HTTP GET Request

AT+QHTTPREAD

Read HTTP Server Response

AT+QHTTPPOST

Send HTTP POST Request

AT+QHTTPDL

Download file from http server

l
e
t
l
c
a
e
i
t
u
n
Q ide
f
n
o
C

Execution of above HTTP related AT commands will switch to data mode. To switch back to AT
mode, you can input “+++” and this will terminate the current HTTP AT command. The interval
time between the first “+” and the character before the first “+” MUST NOT be less than 500 ms
and the interval time between the last “+” and the character next to the last “+” MUST NOT be
less than 500 ms and the interval time between each “+” MUST be less than 1000 ms.

2.2. Detailed Description of AT Commands for HTTP Service
2.2.1.

AT+QHTTPURL Set HTTP Server URL

AT+QHTTPURL

Set HTTP Server URL

Test Command
AT+QHTTPURL=?

Response
+QHTTPURL: (1-450),(1-65535)
OK

Parameter
See Write Command

Write Command
AT+QHTTPURL=,

Response
CONNECT

If error is related to ME functionality:
ERROR
+CME ERROR: 

Parameter

The length in bytes of the URL.
 Maximum time in seconds to input URL.
Reference

GSM_HTTP_ATC_V1.3

If sending HTTP GET Request, for example, input URL path:
http://api.efxnow.com/DEMOWebServices2.8/Service.asmx/Echo?
Message=helloquectel
-5-

HTTP Service AT Commands

If sending HTTP POST Request, for example, input URL path:
http://api.efxnow.com/DEMOWebServices2.8/Service.asmx/Echo
Server address must be provided as IP address in standard
dot-format (e.g. “192.168.1.1”) or as server address names
resolvable by a DNS server (e.g. “api.efxnow.xom”).

2.2.2.

AT+QHTTPGET Send HTTP GET Request

AT+QHTTPGET Send HTTP GET Request
Test Command
AT+QHTTPGET=?

Response
+QHTTPGET: (1-65535)

l
e
t
l
c
a
e
i
t
u
n
Q ide
f
n
o
C
OK

Parameter
See Write Command

Write Command
AT+QHTTPGET=

Response
OK

If error is related to ME functionality:
ERROR
+CME ERROR: 

Parameter
 Time in seconds. AT+QHTTPREAD will be
invalid if the idle time after AT+QHTTPGET is
longer than the time of .

Reference

2.2.3.

AT+QHTTPREAD Read HTTP Server Response

AT+QHTTPREAD Read HTTP Server Response
Test Command
AT+QHTTPREAD=?

Response
+QHTTPREAD: (1-65535)
OK

Parameter
See Write Command

Write Command
AT+QHTTPREAD=

Response
CONNECT

OK
If error is related to ME functionality:

GSM_HTTP_ATC_V1.3

-6-

HTTP Service AT Commands

ERROR
+CME ERROR: 
Parameter
 Time in seconds. It will close http session when
timeout.

The data of HTTP server responds.
Reference

2.2.4.

AT+QHTTPPOST Send HTTP POST Request

l
e
t
l
c
a
e
i
t
u
n
Q ide
f
n
o
C

AT+QHTTPPOST Send HTTP POST Request
Test Command
AT+QHTTPPOST=?

Response
+QHTTPPOST: (1-29696),(1-65535),(1-65535)
OK

Parameter
See Write Command

Write Command
AT+QHTTPPOST=,,

Response
CONNECT

OK

If error is related to ME functionality:
ERROR
+CME ERROR: 
Parameter







Size in bytes of the body data to POST.
Maximum time in seconds to input the body
data.
Time in seconds. AT+QHTTPREAD will be
invalid
if
the
idle
time
after
AT+QHTTPGET is longer than the time of

Input the body data to POST from UART.

Reference

GSM_HTTP_ATC_V1.3

-7-

HTTP Service AT Commands

2.2.5.

AT+QHTTPDL Download file from HTTP server

AT+QHTTPDL Download file from HTTP server
Test Command
AT+QHTTPDL=?

Response
+QHTTPDL:"filename"[,[,(1-65535)]]
OK
Parameter
See Write Command

Write Command
AT+QHTTPDL=
“”[,
[,< wait_time>]]

Response
OK

l
e
t
l
c
a
e
i
t
u
n
Q ide
f
n
o
C
Finally, if download the file successfully, response
+ QHTTPDL:
,, If error is related to ME functionality: ERROR +CME ERROR: Parameter
The path of the file to be stored, such as “RAM:1.txt” The maximum size of the file to be download. Default is 10240. Unit: byte. It is only used for RAM file. Time in seconds. It will close HTTP session when timeout. The length of data has been download The content length. If the content-length is unknown, then set it to -1. If all data has been downloaded, the is 0, else it is a numeric to indicate the type of error, please refer to the chapter 3. A numeric to indicate the type of error, please refer to the chapter 3. Reference GSM_HTTP_ATC_V1.3 -8- HTTP Service AT Commands 3. Supported Unsolicited Result Codes 3.1. Summary of CME ERROR Codes Final result code +CME ERROR: indicates an error related to mobile equipment or network. The operation is similar to ERROR result code. None of the following commands in the same Command line is executed. Neither ERROR nor OK result code shall be returned. The following is just the new code for HTTP. About other codes, please refer to [1]. 3822 l e t l c a e i t u n Q ide f n o C 3823 incoming call busy 3824 voice call busy 3825 input timeout 3826 wait data timeout 3827 wait http response timeout 3828 alloc memory fail values used by common messaging commands: Code of Meaning 3801 HTTP time out 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 GSM_HTTP_ATC_V1.3 HTTP busy HTTP UART busy HTTP get no request HTTP network busy HTTP network open failed HTTP network no config HTTP network deactive HTTP network error HTTP url error HTTP empty url HTTP ip addr error HTTP DNS error HTTP socket create error HTTP socket connect error HTTP socket read error HTTP socket write error HTTP socket close HTTP data encode error HTTP data decode error HTTP to read timeout HTTP response failed -9- HTTP Service AT Commands 3829 HTTP need relocation 4000 Exceed max length 4001 Open file fail 4002 Write file fail 4003 Get size fail 4004 Read fail 4005 List file fail 4006 Delete file fail 4007 Get Disk info fail 4008 No space 4009 Time out 4010 4011 4012 4013 4014 4015 4016 4017 l e t l c a e i t u n Q ide f n o C GSM_HTTP_ATC_V1.3 File not found File too large File already exist Invalid parameter Driver error Create fail Access denied File too large - 10 - HTTP Service AT Commands 4. Examples 4.1. Send HTTP GET Request AT+QIFGCNT=0 OK AT+QICSGP=1,"CMNET" OK //Set APN AT+QIREGAPP OK //Optional l e t l c a e i t u n Q ide f n o C AT+QIACT OK //Optional AT+QHTTPURL=79,30 //Set the URL CONNECT …. //for example, input 79 bytes: http://api.efxnow.com/DEMOWebServices2.8/Service.asmx/Echo?Message=helloquectel OK AT+QHTTPGET=60 OK //Send HTTP GET Request AT+QHTTPREAD=30 //Read the response of HTTP server. CONNECT …. //Output the response data of HTTP server to UART. //for example, UART outputs: Message='helloquectel' ASCII:104 101 108 108 111 113 117 101 99 116 101 108 OK AT+QIDEACT DEACT OK GSM_HTTP_ATC_V1.3 //Deactivate GPRS PDP connect. - 11 - HTTP Service AT Commands 4.2. Send HTTP POST Request AT+QIFGCNT=0 OK AT+QICSGP=1,"CMNET" OK AT+QIREGAPP OK //Set APN //Optional l e t l c a e i t u n Q ide f n o C AT+QIACT OK AT+QHTTPURL=58,30 //Optional //Set the URL CONNECT …. //for example, input 58 bytes: http://api.efxnow.com/DEMOWebServices2.8/Service.asmx/Echo OK AT+QHTTPPOST=18,50,10 //POST the data whose size is 18 Bytes and the maximum latency time for inputting is 50 s. It is recommended to set the latency time as long as enough to download all the data in the latency time. CONNECT //This means it is ready to receive data from UART. And DCD has been set to low. Receive data from UART and not echo. //for example, input 18 bytes: Message=helloworld OK //This means all data has been received over, and DCD is set to high. AT+QHTTPREAD=30 //Read the response of HTTP server. CONNECT …. //Output the response data of HTTP server to UART //for example, UART outputs: Message='helloworld' ASCII:104 101 108 108 111 119 111 114 108 100 GSM_HTTP_ATC_V1.3 - 12 - HTTP Service AT Commands OK AT+QIDEACT DEACT OK //Deactivate GPRS PDP connect. 4.3. Download File from HTTP Server AT+QIFGCNT=0 OK l e t l c a e i t u n Q ide f n o C AT+QICSGP=1,"CMNET" OK //Set APN AT+QIREGAPP OK //Optional AT+QIACT OK //Optional AT+QHTTPURL=29,30 //Set the URL CONNECT …. //for example, input 29 bytes: http://api.efxnow.com/1.TXT OK AT+QHTTPGET=60 OK //Send HTTP GET Request AT+QHTTPDL=“RAM:1.TXT”,1024 //Download the file to“RAM:1.TXT” ,max size is 1024 bytes + QHTTPDL:100,100,0 OK GSM_HTTP_ATC_V1.3 - 13 - Shanghai Quectel Wireless Solutions Co., Ltd. Office 501, Building 13, No.99, Tianzhou Road, Shanghai, China 201103 Tel: +86 21 5108 6236 Mail: info@quectel.com

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Has XFA                         : No
Language                        : zh-CN
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-20:48:00
Format                          : application/pdf
Creator                         : J.xin
Create Date                     : 2015:12:29 17:00:52+08:00
Creator Tool                    : Microsoft® Word 2010
Modify Date                     : 2015:12:29 17:02:34+08:00
Metadata Date                   : 2015:12:29 17:02:34+08:00
Producer                        : Microsoft® Word 2010
Document ID                     : uuid:fbf98b31-49b1-4b8d-ad32-401f2c4302d8
Instance ID                     : uuid:02c66ecc-3a61-4ff8-91b6-feb22cdcd69f
Page Mode                       : UseOutlines
Page Count                      : 15
Author                          : J.xin
EXIF Metadata provided by EXIF.tools

Navigation menu