Quectel GSM AT Commands Manual V1.4

User Manual:

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

DownloadQuectel GSM  AT Commands Manual V1.4
Open PDF In BrowserView PDF
GSM HTTP
AT Commands Manual
GSM/GPRS Module Series
Rev. GSM_HTTP_AT_Commands_Manual_V1.4
Date: 2017-11-13
Status: Released

www.quectel.com

GSM/GPRS Module Series
GSM HTTP AT Commands Manual

Our aim is to provide customers with timely and comprehensive service. For any
assistance, please contact our company headquarters:
Quectel Wireless Solutions Co., Ltd.
7th Floor, Hongye Building, No.1801 Hongmei Road, Xuhui District, Shanghai 200233, China
Tel: +86 21 5108 6236
Email: info@quectel.com

Or our local office. For more information, please visit:
http://quectel.com/support/sales.htm

For technical support, or to report documentation errors, please visit:
http://quectel.com/support/technical.htm
Or email to: support@quectel.com

GENERAL NOTES
QUECTEL OFFERS THE INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION
PROVIDED IS BASED UPON CUSTOMERS’ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT
TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT
MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT
ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR
RELIANCE UPON THE INFORMATION. ALL INFORMATION SUPPLIED HEREIN IS SUBJECT TO
CHANGE WITHOUT PRIOR NOTICE.

COPYRIGHT
THE INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF
QUECTEL WIRELESS SOLUTIONS CO., LTD. TRANSMITTING, REPRODUCTION, DISSEMINATION
AND EDITING OF THIS DOCUMENT AS WELL AS UTILIZATION OF THE CONTENT ARE
FORBIDDEN WITHOUT PERMISSION. OFFENDERS WILL BE HELD LIABLE FOR PAYMENT OF
DAMAGES. ALL RIGHTS ARE RESERVED IN THE EVENT OF A PATENT GRANT OR
REGISTRATION OF A UTILITY MODEL OR DESIGN.

Copyright © Quectel Wireless Solutions Co., Ltd. 2017. All rights reserved.

GSM_HTTP_AT_Commands_Manual

1 / 16

GSM/GPRS Module Series
GSM HTTP AT Commands Manual

About the Document
History
Revision

Date

Author

Description

1.0

2009-01-04

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.

1.4

2017-11-13

Sherlock ZHAO

Added command AT+QHTTPCFG

GSM_HTTP_AT_Commands_Manual

2 / 16

GSM/GPRS Module Series
GSM HTTP AT Commands Manual

Contents
About the Document ................................................................................................................................ 2
Contents .................................................................................................................................................... 3
1

Introduction ....................................................................................................................................... 4
1.1.
AT Command Syntax ............................................................................................................ 4

2

Description of HTTP AT Commands ............................................................................................... 5
2.1.
AT+QHTTPURL Set URL of HTTP Server.......................................................................... 5
2.2.
AT+QHTTPGET Send GET Request to HTTP Server ........................................................ 5
2.3.
AT+QHTTPPOST Send POST Request to HTTP Server ................................................... 6
2.4.
AT+QHTTPREAD Read Response from HTTP Server ...................................................... 7
2.5.
AT+QHTTPDL Download a File from HTTP Server ............................................................ 8
2.6.
AT+QHTTPCFG Configure Parameters for HTTP Service ................................................. 8

3

Examples ......................................................................................................................................... 10
3.1.
Send GET Request to HTTP Server ................................................................................... 10
3.2.
Send POST Request to HTTP Server ..................................................................................11
3.3.
Download a File From HTTP Server ................................................................................... 12
3.4.
Customize HTTP Header and Show HTTP Response Header ........................................... 12

4

Summary of ERROR Codes............................................................................................................ 14

GSM_HTTP_AT_Commands_Manual

3 / 16

GSM/GPRS Module Series
GSM HTTP AT Commands Manual

1

Introduction

Quectel module provides an internal TCP/IP stack that is driven by AT commands and enables the host
application to easily access the Internet services which include 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.

1.1. AT Command Syntax
Test Command

AT+=?

This command returns the list of parameters and value ranges
set by the corresponding Write Command or internal processes.

Read Command

AT+?

This command returns the currently set value of the parameter
or parameters.

Write Command

AT+=<…>

This command sets the user-definable parameter values.

Execution
Command

AT+

This command reads non-variable parameters affected by
internal processes in the GSM engine.

GSM_HTTP_AT_Commands_Manual

4 / 16

GSM/GPRS Module Series
GSM HTTP AT Commands Manual

2

Description of HTTP AT Commands

2.1. AT+QHTTPURL Set URL of HTTP Server
AT+QHTTPURL Set URL of HTTP Server
Test Command

Response

AT+QHTTPURL=?

+QHTTPURL: (1-2048),(1-65535)
OK

Write Command

Response

AT+QHTTPURL=[,]

CONNECT
If there is an error related to ME functionality:
ERROR
+CME ERROR: 

Maximum Response Time

Determined by  (default 120s)

Parameter



Numeric type. The length of URL. The range is 1-2048. Unit: byte.
Numeric type. The maximum time for inputting URL. The range is 1-65535, and the
default value is 120. Unit: second.



Integer type. The error code of the operation. Please refer to Chapter 4.

2.2. AT+QHTTPGET
AT+QHTTPGET

Send GET Request to HTTP Server

Send GET Request to HTTP Server

Test Command

Response

AT+QHTTPGET=?

+QHTTPGET: (1-65535)[,(15-65535)[,(0-102400)]]
OK

Write Command

GSM_HTTP_AT_Commands_Manual

Response

5 / 16

GSM/GPRS Module Series
GSM HTTP AT Commands Manual

AT+QHTTPGET=[,[,]]

OK
If there is an error related to ME functionality:
ERROR
+CME ERROR: 

Maximum Response Time

Determined by  (default 120s)

Parameter


The maximum timeout waiting for reading data from server after sending HTTP
GET request to server successfully. AT+QHTTPREAD will be invalid if idle time
after AT+QHTTPGET is longer than the time of . The range is
1-65535, and the default value is 120. Unit: second.



The time waiting for data from server after sending HTTP GET request to server
successfully. If there is no data coming from server within timeout value, an error
will be returned. The range is 15-65535, and the default value is 120. Unit:
second.



Integer type. Indicates the data bytes to download from HTTP server. The range is
0-102400, and the default value is 0.



Integer type. The error code of the operation. Please refer to Chapter 4.

2.3. AT+QHTTPPOST
AT+QHTTPPOST

Send POST Request to HTTP Server

Send POST Request to HTTP Server

Test Command

Response

AT+QHTTPPOST=?

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

Write Command

Response

AT+QHTTPPOST=[,[,]]

CONNECT

OK
If there is an error related to ME functionality:
ERROR
+CME ERROR: 

Maximum Response Time

GSM_HTTP_AT_Commands_Manual

120s

6 / 16

GSM/GPRS Module Series
GSM HTTP AT Commands Manual

Parameter



Size of the post body. The range is 1-29696. Unit: byte.
Maximum time for inputting the data. The range is 1-65535, and the default value is
120.

 The maximum timeout waiting for reading data from server after sending HTTP POST
request to server successfully. AT+QHTTPREAD will be invalid if the idle time after
AT+QHTTPGET is longer than the time of . The range is 1-65535,
and the default value is 120. Unit: second.



The POST data to input from UART.
Integer type. The error code of the operation. Please refer to Chapter 4.

2.4. AT+QHTTPREAD
AT+QHTTPREAD

Read Response from HTTP Server

Read Response from HTTP Server

Test Command

Response

AT+QHTTPREAD=?

+QHTTPREAD: (1-65535)
OK

Write Command

Response

AT+QHTTPREAD=

CONNECT

OK
If there is an error related to ME functionality:
ERROR
+CME ERROR: 

Maximum Response Time

Determined by  (default 120s)

Parameter


The maximum waiting time for reading response from HTTP Server. HTTP session will
be closed when timeout. The range is 1-65535, and the default value is 120. Unit:
second.




The data of HTTP server responds.
Integer type. The error code of the operation. Please refer to Chapter 4.

GSM_HTTP_AT_Commands_Manual

7 / 16

GSM/GPRS Module Series
GSM HTTP AT Commands Manual

2.5. AT+QHTTPDL Download a File from HTTP Server
AT+QHTTPDL Download a File from HTTP Server
Test Command

Response

AT+QHTTPDL=?

+QHTTPDL: "filename"[,[,(1-65535)]]
OK

Write Command

Response

AT+QHTTPDL=“”[,[,]]

OK
Finally, if the file is downloaded successfully, response:
+QHTTPDL: 
,, If there is an error related to ME functionality: ERROR +CME ERROR: Reference Determined by (default 120s) Parameter The path of the file to be stored, such as “RAM:1.txt”. The maximum size of the file to be downloaded. The default value is 10240. Unit: byte. It is only used for RAM file. The maximum waiting time for downloading a file from HTTP Server. HTTP session will be closed when timeout. The range is 1-65535, and the default value is 120. Unit: second.
The length of the data downloaded. The content length. If the 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 Chapter 4. Integer type. The error code of the operation. Please refer to Chapter 4. 2.6. AT+QHTTPCFG AT+QHTTPCFG Configure Parameters for HTTP Service Configure Parameters for HTTP Service Test Command Response AT+QHTTPCFG=? +QHTTPCFG: ("requestheader","responseheader"),(0,1) OK GSM_HTTP_AT_Commands_Manual 8 / 16 GSM/GPRS Module Series GSM HTTP AT Commands Manual Write Command Response AT+QHTTPCFG="requestheader"[,] If is not omitted, response: OK or +CME ERROR: Else, query the current setting +QHTTPCFG: "requestheader", OK Write Command Response AT+QHTTPCFG="responseheader"[,< responseheader>] If is not omitted, response: OK or +CME ERROR: Else, query the current setting +QHTTPCFG: "responseheader", OK Reference Parameter Numeric type. It indicates if customizing HTTP request header is allowed or not. 0 Disable the customization HTTP request header 1 Enable the customization HTTP request header Numeric type. It indicates if outputting HTTP response header is allowed or not 0 Disable the output of HTTP response header 1 Enable the output of HTTP response header Integer type. The error code of the operation. Please refer to Chapter 4. GSM_HTTP_AT_Commands_Manual 9 / 16 GSM/GPRS Module Series GSM HTTP AT Commands Manual 3 Examples 3.1. Send GET Request to HTTP Server AT+QIFGCNT=0 OK AT+QICSGP=1,"CMNET" //Set APN OK AT+QIREGAPP //Optional OK AT+QIACT //Optional OK AT+QHTTPURL=79,30 //Set URL CONNECT //For example, input 79 bytes: http://api.efxnow.com/DEMOWebServices2.8/Service.asmx/Echo?Message=helloquectel. OK AT+QHTTPGET=60 OK AT+QHTTPREAD=30 CONNECT //Send GET Request to HTTP server. //Read the response of HTTP server. //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 //Deactivate PDP context. GSM_HTTP_AT_Commands_Manual 10 / 16 GSM/GPRS Module Series GSM HTTP AT Commands Manual 3.2. Send POST Request to HTTP Server AT+QIFGCNT=0 OK AT+QICSGP=1,"CMNET" OK //Set APN AT+QIREGAPP OK //Optional AT+QIACT OK //Optional AT+QHTTPURL=58,30 //Set URL CONNECT //For example, input 58 bytes: http://api.efxnow.com/DEMOWebServices2.8/Service.asmx/Echo OK //POST the data whose size is 18 bytes and the maximum latency time for inputting is 50s. //It is recommended to set the latency time as long as enough to download all the data in the latency time. AT+QHTTPPOST=18,50,10 CONNECT //This means module enters into data mode and is ready to receive data from UART. //For example, input 18 bytes: Message=helloworld. OK //This means all data has been received, 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 OK AT+QIDEACT DEACT OK //Deactivate PDP context. GSM_HTTP_AT_Commands_Manual 11 / 16 GSM/GPRS Module Series GSM HTTP AT Commands Manual 3.3. Download a File From HTTP Server AT+QIFGCNT=0 OK AT+QICSGP=1,"CMNET" OK AT+QIREGAPP OK AT+QIACT OK //Set APN //Optional //Optional AT+QHTTPURL=36,30 //Set URL CONNECT //for example, input 36 bytes: http://220.180.239.212:8005/100K.txt OK AT+QHTTPGET=60 OK //Send GET Request to HTTP server. AT+QHTTPDL="RAM:1.TXT",1024 //Download the file to RAM:1.TXT, and the maximum size of the file is 1024 bytes. +QHTTPDL: 1024,102400,401 OK 3.4. Customize HTTP Header and Show HTTP Response Header AT+QHTTPCFG="requestheader",1 OK AT+QHTTPCFG ="responseheader",1 OK AT+QHTTPURL=58 CONNECT //Input URL "http://api.efxnow.com/DEMOWebServices2.8/Service.asmx/Echo". OK GSM_HTTP_AT_Commands_Manual 12 / 16 GSM/GPRS Module Series GSM HTTP AT Commands Manual AT+QHTTPPOST=229 CONNECT //Input customers’ own header like below: POST /DEMOWebServices2.8/Service.asmx/Echo HTTP/1.1 Host: api.efxnow.com Accept: */* User-Agent: QUECTEL_MODULE Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Content-Length: 18 Message=helloworld OK AT+QHTTPREAD=30 CONNECT //The data returned from server is as below: HTTP/1.1 200 OK Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Date: Sat, 17 Aug 2013 05:06:23 GMT Content-Length: 170 Message='helloworld' ASCII:104 101 108 108 111 119 111 114 108 100 OK GSM_HTTP_AT_Commands_Manual 13 / 16 GSM/GPRS Module Series GSM HTTP AT Commands Manual 4 Summary of ERROR Codes The error code indicates an error related to mobile equipment or network. The details about are described in the following table. Table 1: Summary of Error Codes Meaning 3801 HTTP timeout 3802 HTTP busy 3803 HTTP UART busy 3804 HTTP get no request 3805 HTTP network busy 3806 HTTP network open failed 3807 HTTP network no configuration 3808 HTTP network deactivated 3809 HTTP network error 3810 HTTP URL error 3811 HTTP empty URL 3812 HTTP IP address error 3813 HTTP DNS error 3814 HTTP socket create error 3815 HTTP socket connect error GSM_HTTP_AT_Commands_Manual 14 / 16 GSM/GPRS Module Series GSM HTTP AT Commands Manual 3816 HTTP socket read error 3817 HTTP socket write error 3818 HTTP socket closed 3819 HTTP data encode error 3820 HTTP data decode error 3821 HTTP read timeout 3822 HTTP response failed 3823 Incoming call busy 3824 Voice call busy 3825 Input timeout 3826 Wait data timeout 3827 Wait HTTP response timeout 3828 Memory allocation failed 3829 HTTP need relocation 3830 Queclocator location failed 4000 Exceed max length 4001 Open file failed 4002 Write file failed 4003 Get size failed 4004 Read failed 4005 List file failed 4006 Delete file failed 4007 Get Disk info failed GSM_HTTP_AT_Commands_Manual 15 / 16 GSM/GPRS Module Series GSM HTTP AT Commands Manual 4008 No space 4009 Timeout 4010 File not found 4011 File too large 4012 File already exist 4013 Invalid parameter 4014 Driver error 4015 Create failed 4016 Access denied 4017 File too large GSM_HTTP_AT_Commands_Manual 16 / 16

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : No
Encryption                      : Standard V4.4 (128-bit)
User Access                     : Print, Copy, Extract, Print high-res
Author                          : kelly
Create Date                     : 2017:11:13 13:32:42+08:00
Modify Date                     : 2017:11:13 13:33:06+08:00
Language                        : zh-CN
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-20:48:00
Format                          : application/pdf
Creator                         : kelly
Creator Tool                    : Microsoft® Word 2010
Metadata Date                   : 2017:11:13 13:33:06+08:00
Producer                        : Microsoft® Word 2010
Document ID                     : uuid:03128f86-2ba5-4709-837c-488259fa93d7
Instance ID                     : uuid:04191fc2-48f0-4292-8c53-fdefc4ca19e5
Page Mode                       : UseOutlines
Page Count                      : 17
EXIF Metadata provided by EXIF.tools

Navigation menu