A7600 Series HTTP (S)
A7600 Series HTTP (S)
A7600 Series HTTP (S)
HTTP(S)_Application Note
LTE Module
GENERAL NOTES
COPYRIGHT
www.simcom.com 1 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
About Document
Version History
Scope
This document presents the AT Command Set for SIMCom A7600 Series, including A7600XX-XXXX,
A5360E, and A7670X.
www.simcom.com 2 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
Contents
Contents ................................................................................................................................. 3
1 Introduction ...................................................................................................................... 4
1.1 Purpose of the document ................................................................................................................. 4
1.2 Related documents .......................................................................................................................... 4
1.3 Conventions and abbreviations ....................................................................................................... 4
1.4 The process of Using HTTP(S) AT Commands ............................................................................... 5
1.5 Error Handling.................................................................................................................................. 6
1.5.1 Executing HTTP(S) AT Commands Fails.......................................................................... 6
1.5.2 PDP Activation Fails ......................................................................................................... 6
1.5.3 Error Response of HTTP(S) Server.................................................................................. 6
4 Appendix ........................................................................................................................ 18
4.1 Summary of Error Codes .......................................................................................................... 18
4.2 Unsolicited Result Codes .......................................................................................................... 19
www.simcom.com 3 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
1 Introduction
Based on module AT command manual, this document will introduce HTTP application process.
Developers could understand and develop application quickly and efficiently based on this document.
In application, controlling device controls the GSM engine by sending AT Command via its serial interface.
The controlling device at the other end of the serial line is referred to as following term:
TE (Terminal Equipment);
DTE (Data Terminal Equipment) or plainly "the application" which is running on an embedded system;
Other Conventions:
PDP(Packet Data Protocol);
FTP(File Transfer Protocol);
SSL(Secure Sockets Layer);
TLS(Transport Layer Security);
www.simcom.com 4 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
Signal quality:
Execute AT+CSQ to query signal quality.If
rssi is equals to 99,please check SIM card Query signal quality by AT+CSQ
status or reboot the module
+CSQ: <rssi>,<ber>,0 < rssi < 31
CS Service:
If <stat> of AT+CREG? equals to 1,it means
that the module has registered on CS Query CS service by AT+CREG?
domain service.Reboot the module if fals
to registered on CS domain.
+CREG: 0,1
PS Serivce:
If <stat> of AT+CGREG?/AT+CEREG? equals Query PS service by
to 1,it means that the module has AT+CGREG?/AT+CEREG?
registered on PS domain service.
UE system information:
If <System Mode> is “NO SERVICE”,it Query UE information by AT+CPSI?
NO SERVICE
means network status has some problem.
AT+HTTPINIT: AT+HTTPINIT
AT+HTTPINIT also can activate the PDP
(PDP active and initialize HTTP(S)
Context.But It can not customize PDP
service)
activation parameters.
If you want to access https server, Set the SSL context id for HTTPS
Y
‘SSLCFG’ should be set, but it’s HTTPS? AT+HTTPPARA=”SSLCFG”,<sslcfg_id> session.
optional according to https server. (optional)
www.simcom.com 5 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
When executing HTTP(S) AT commands, if ERROR response is received from the module, please check
whether the U(SIM) card is inserted and whether it is +CPIN: READY returned when executing
AT+CPIN?.
If it is failed to activate a PDP context with AT+CGACT command, please check the following
configurations:
1. Query the PS domain status by AT+CGREG? and make sure the PS domain has been registered.
2. Query the PDP context parameters by AT+CGDCONT? and make sure the APN of the specified PDP
context has been set.
3. Make sure the specified PDP context ID is neither used by PPP nor activated by AT+CGACT
command.
If all above configurations are correct, but activating the PDP context by AT+CGACT command still fails,
please reboot the module to resolve this issue. After rebooting the module, please check the
configurations mentioned above for at least.
www.simcom.com 6 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
Command Description
AT+HTTPINIT Start HTTP service
AT+HTTPTERM Stop HTTP Service
AT+HTTPPARA Set HTTP Parameters value
AT+HTTPACTION HTTP Method Action
AT+HTTPHEAD Read the HTTP Header Information of Server Respons
AT+HTTPREAD Read the response information of HTTP Server
AT+HTTPDATA Input HTTP Data
AT+HTTPPOSTFILE Send HTTP Request to HTTP(S) server by File
AT+HTTPREADFILE Receive HTTP Response Content to a file
www.simcom.com 7 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
3 HTTP(S) Examples
AT+CSQ
+CSQ: 23,0
OK
AT+CREG?
+CREG: 0,1
OK
AT+CGREG?
+CGREG: 0,1
OK
AT+CPSI?
+CPSI:
LTE,Online,460-00,0x333C,39589680,308,EUT
RAN-BAND3,1350,5,0,0,54,0,22
OK
//In WCDMA/GSW,you need to continue to
execute the following instructions
AT+CGDCONT=cid,”ip”,”APN”
OK
AT+CGACT=1,cid
OK
AT+CGACT=?
+CGACT: 1,1
OK
www.simcom.com 8 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
OK
//set the URL which will be accessed, for HTTP,
the request URL begins with “HTTP://”
AT+HTTPPARA="URL","http://opinion.people.
com.cn/GB/n1/2018/0815/c1003-30228758.html
"
OK
AT+HTTPACTION=0 //send HTTP GET request
OK //22505 is the length of HTTP response
information
+HTTPACTION: 0,200,22505
AT+HTTPHEAD //read the HTTP response header
+HTTPHEAD: 387 //387 is the length of response header
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html
Connection: close
Date: Thu, 16 Aug 2018 05:13:36 GMT
Powered-By-ChinaCache: MISS from
06053423gG.15
ETag: W/"5b7379f5-57e9"
Last-Modified: Wed, 15 Aug 2018 00:55:17
GMT
Expires: Thu, 16 Aug 2018 05:18:36 GMT
Vary: Accept-Encoding
X-Cache-Hits: 14
Content-Length: 22505 // Content-Length indicates the length of HTTP
CC_CACHE: TCP_REFRESH_HIT response information is 22505 bytes
Accept-Ranges: bytes
+HTTPREAD: 500
<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-tra
nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="text/html;charset=GB2312"/>
<meta http-equiv="Content-Language"
www.simcom.com 9 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
content="utf-8" />
<meta content="all" name="robots" />
<title>人民日报钟声:牢记历史是为了更好开创未
来--观点--人民网 </title>
<meta name="keywords" content="" />
<meta name="description" content=" 日方
应在正确对待历史?
+HTTPREAD: 0
+HTTPACTION: 1,500,30
AT+HTTPHEAD
+HTTPHEAD: 258
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 20 Aug 2018 04:18:58 GMT
Connection: close
Content-Length: 30
OK
AT+HTTPREAD=0,30
OK
+HTTPREAD: 30
www.simcom.com 10 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
+HTTPACTION: 2,200,387
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html
Connection: close
Vary: Accept-Encoding
Powered-By-ChinaCache: MISS from
06053423gG.15
ETag: W/"5b7379f5-57e9"
Last-Modified: Wed, 15 Aug 2018 00:55:17 GMT
Content-Length: 22505
X-Cache-Hits: 14
Date: Thu, 16 Aug 2018 10:58:00 GMT
Expires: Thu, 16 Aug 2018 11:03:00 GMT
CC_CACHE: TCP_REFRESH_HIT
Accept-Ranges: bytes
OK
AT+HTTPTERM //stop HTTP Service
OK
www.simcom.com 11 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
+HTTPPOSTFILE: 200,14615
AT+HTTPHEAD //read the HTTP server response header
information.
+HTTPHEAD: 773
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 14615
Content-Type: text/html
Date: Thu, 13 Sep 2018 05:14:30 GMT
Etag: "5b8641dc-3917"
Last-Modified: Wed, 29 Aug 2018 06:49:00 GMT
P3p: CP=" OTI DSP COR IVA OUR IND COM "
Pragma: no-cache
Server: BWS/1.1
Set-Cookie:
BAIDUID=A374BCFD28DFEEAF0BA0C4EEAC7
7B0B0:FG=1; expires=Thu, 31-Dec-37 23:55:55
GMT; max-age=2147483647; path=/;
domain=.baidu.com
Set-Cookie:
BIDUPSID=A374BCFD28DFEEAF0BA0C4EEAC
77B0B0; expires=Thu, 31-Dec-37 23:55:55 GMT;
max-age=2147483647; path=/;
domain=.baidu.com
Set-Cookie: PSTM=1536815670; expires=Thu,
31-Dec-37 23:55:55 GMT;
max-age=2147483647; path=/;
domain=.baidu.com
Vary: Accept-Encoding
X-Ua-Compatible: IE=Edge,chrome=1
OK
AT+HTTPREADFILE="readbaidu.dat" //read the HTTP server response content to a file
named readbaidu.dat, saved to local storage
OK
+HTTPREADFILE: 0
AT+HTTPTERM //stop HTTP Service
OK
www.simcom.com 12 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
HTTP/1.1 200 OK
Server: bfe/1.0.8.13-sslpool-patch
Date: Thu, 16 Aug 2018 11:38:08 GMT
Content-Type: text/css
Content-Length: 52060
Connection: close
ETag: "5a323f72-cb5c"
Last-Modified: Thu, 14 Dec 2017 09:08:02 GMT
Expires: Sat, 18 Aug 2018 09:50:53 GMT
Age: 2425635
Accept-Ranges: bytes
Cache-Control: max-age=2592000
Vary: Accept-Encoding
Ohc-Response-Time: 1 0 0 0 0 0
OK
AT+HTTPREAD=0,500 //read the response information of HTTPS server,
the length to read is 500 bytes
OK
+HTTPREAD: 500
.s-cardsetting{position:relative;text-align:left;p
adding:22px 25px 0 25px;border:1px solid
www.simcom.com 13 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
#e3e3e3;width:843px}.main .sui-dialog-cardsett
ing{opacity:.98;filter:alpha(opacity=98);positio
n:absolute;border:none;display:none;_height:1
86px}.sui-dialog-cardsetting{opacity:.98!import
ant;filter:alpha(opacity=98)!important;border:n
one!important}.sui-dialog-cardsetting .sui-dialo
g-title{height:42px;line-height:42px;text-indent:
21px}.s-cardsetting-content .s-mod-item
b,.sui-dialog-cardsetting .sui-dialog-c
+HTTPREAD: 0
AT+HTTPTERM //stop HTTP Service
OK
+HTTP_PEER_CLOSED
AT+HTTPHEAD //read HTTPS response header .
+HTTPHEAD: 377
HTTP/1.1 200 OK
Server: openresty
Date: Mon, 20 Aug 2018 03:20:30 GMT
www.simcom.com 14 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
Content-Type: application/octet-stream
Connection: close
Set-Cookie:
uuid_tt_dd=10_37481894210-1534735230305-44
5993; Expires=Thu, 01 Jan 2025 00:00:00 GMT;
Path=/; Domain=.csdn.net;
Set-Cookie:
dc_session_id=10_1534735230305.501284;
Expires=Thu, 01 Jan 2025 00:00:00 GMT;
Path=/; Domain=.csdn.net;
OK
AT+HTTPREAD=0,10 //read the response information of HTTPS server,
the length to read is 10 bytes
OK
HTTP/1.1 200 OK
Server: bfe/1.0.8.13-sslpool-patch
Date: Thu, 16 Aug 2018 11:46:22 GMT
Content-Type: text/css
Content-Length: 52060
Connection: close
ETag: "5a323f72-cb5c"
Last-Modified: Thu, 14 Dec 2017 09:08:02 GMT
www.simcom.com 15 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
OK
AT+HTTPTERM //stop HTTP Service
OK
+HTTPPOSTFILE: 200,14615
AT+HTTPHEAD //read HTTPS response header .
+HTTPHEAD: 773
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 14615
Content-Type: text/html
Date: Thu, 13 Sep 2018 05:14:30 GMT
Etag: "5b8641dc-3917"
Last-Modified: Wed, 29 Aug 2018 06:49:00 GMT
P3p: CP=" OTI DSP COR IVA OUR IND COM "
Pragma: no-cache
Server: BWS/1.1
Set-Cookie:
BAIDUID=A374BCFD28DFEEAF0BA0C4EEAC7
7B0B0:FG=1; expires=Thu, 31-Dec-37 23:55:55
GMT; max-age=2147483647; path=/;
domain=.baidu.com
Set-Cookie:
BIDUPSID=A374BCFD28DFEEAF0BA0C4EEAC
77B0B0; expires=Thu, 31-Dec-37 23:55:55 GMT;
max-age=2147483647; path=/;
domain=.baidu.com
www.simcom.com 16 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
OK
AT+HTTPREADFILE="readbaidu.dat"
OK
AT+HTTPTERM //stop HTTP Service
OK
www.simcom.com 17 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
4 Appendix
<statuscode> Meaning
100 Continue
101 Switching Protocols
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
307 Temporary Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Lenth Required
412 Precondition Failed
413 Request Entity Too Large
www.simcom.com 18 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
URC Meaning
It’s a notification message. While received, it means the connection has
+HTTP_PEER_CLOSED
been closed by server.
+HTTP_NONET_EVENT It’s a notification message. While received, it means now the network is
unavailable.
<errcode> Meaning
0 Success
701 Alert state
702 Unknown error
703 Busy
704 Connection closed error
705 Timeout
706 Receive/send socket data failed
707 File not exists or other memory error
708 Invalid parameter
709 Network error
710 start a new ssl session failed
711 Wrong state
www.simcom.com 19 / 20
A7600 Series_HTTP(S)_Application Note_V1.00
www.simcom.com 20 / 20