Professional Documents
Culture Documents
Simplify Communication
LE
FI
AL
IT
EN
D
FI
N
O
C
M
O
C
M
Version:1.01
Release Date:January 23, 2019
Simplify Communication.
www.simcom.com
Simplify Communication
About Document
Document Information
Document
LE
Title SIM7000 Series_HTTPS_Application Note
Version 1.01
FI
Document Type Application Note
Document Status Released/Confidential
AL
IT
Revision History EN
Revision Date Owner Status / Comments
D
1.00 Sept 28, 2018 Xiaobao.qu First Release
1.01 Jan 23,2019 Xiaobao.qu Modified Charpter 3.3 and max length of some
FI
parameters
N
Related Documents
O
C
SIM7000C-N
SI
Copyrights
This document contains proprietary technical information which is the property of SIMCom Wireless. 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.
Contents
LE
Document Information.............................................................................................................. 2
Revision History ......................................................................................................................... 2
FI
Related Documents ................................................................................................................... 2
Contents ...................................................................................................................................3
AL
1 Purpose of this document .................................................................................................4
IT
2 AT Commands for HTTPS ...................................................................................................4
EN
2.1 Overview ............................................................................................................................. 4
2.2 Detailed Descriptions of Commands ............................................................................. 4
2.2.1 AT+SHCONF Set HTTP(s) Parameter ...................................................................... 4
D
2.2.2 AT+CSSLCFG SSL Configure ............................................................................. 5
2.2.3 AT+SHSSL Select SSL Configure....................................................................... 6
FI
Contact ................................................................................................................................... 16
Developers could understand and develop application quickly and efficiently based on this
document.
LE
FI
2 AT Commands for HTTPS
AL
2.1 Overview
IT
Command Description
EN
AT+SHCONF Set HTTP(s) Parameter
AT+CSSLCFG Analysis SSL Configure
D
OK
OK
Write command Response
AT+SHCONF=<HTTPPar OK
LE
amTag>,<HTTPParamV or
alue> ERROR
<HTTPParaTag> <HTTPParamValue>
FI
"URL" Server URL address(max is 64 bytes)
AL
"server domain[: tcpPort]"
IT
Default 60s. range: 30-1800
"BODYLEN"
EN Set body max length(max is 1024 bytes)
1 IPv6
Parameter Saving AUTO_SAVE
O
Mode
C
2 QAPI_NET_SSL_CA_LIST_E
3 QAPI_NET_SSL_PSK_TABLE_E
<cname> String type(string should be included in quotation marks):
name of cert file
<keyname> String type(string should be included in quotation
marks):name of key file
<passkey> String type (string should be included in quotation
marks):value of passkey
LE
Parameter Saving Mode -
Max Response Time -
FI
Reference -
AL
AT+SHSSL Select SSL Configure
IT
Test command Response EN
AT+SHSSL=? +SHSSL: (0-5), "ca list","cert name"
OK
D
Read command Response
AT+SHSSL? +SHSSL: <index>,<ca list>,<cert name>
FI
OK
N
AT+SHSSL=<index>,<c OK
alist>,<certname> or
C
ERROR
Parameters
M
Reference -
Parameter Saving -
Mode
Max Response Time -
LE
Reference -
FI
2.2.5 AT+SHBOD Set Body
AL
AT+SHBOD Set Body
Test command Response
AT+SHBOD=? +SHBOD: "body",<bodylen>
IT
OK EN
Read command Response
AT+SHBOD? +SHBOD: <body>,<bodylen>
D
OK
FI
<bodylen> or
O
ERROR
Parameters
C
Mode
Max Response Time -
C
Reference Note:
M
OK
OK
Write command Response
LE
AT+SHAHEAD=<typ OK
e>,<value> OR
FI
ERROR
Parameters
<type> Head type (max length is SHCONF Set value)
AL
<value> Head value (max length is SHCONF Set value)
Note: The sum of type and value max length is 350
IT
Parameter Saving AUTO_SAVE
Mode EN
Max Response Time -
Reference Note:
Must be executed after the connection
D
FI
OK
M
OK
M
<value> or
ERROR
Parameters
<key> Set key (max is 64 bytes)
<value> Set value (max is 64 bytes)
Parameter Saving AUTO_SAVE
Mode
LE
Read command Response
AT+SHSTATE? +SHSTATE: <status>
FI
OK
Parameters
AL
<status>
0 Expression HTTP(s) disconnect state;
IT
1 Expression HTTP(s) connect state;
Parameter Saving - EN
Mode
Max Response Time -
Reference -
D
FI
EXECUTIVE Response
C
COMMAND OK
AT+SHCHEAD or
ERROR
M
Parameter Saving -
O
Mode
Max Response Time -
C
Reference Note:
M
OK
OK
Write command Response
AT+SHREQ=<url>,<t OK
ype> or
LE
ERROR
Unsolicited Result Code
FI
+SHREQ: <type string>,<StatusCode>,<DataLen>
Parameters
<url> Request server domain (max is 512 bytes)
AL
<type>
1 GET
IT
2 PUT
3 POSTEN
4 PATCH
5 HEAD
<type string> String of type are GET ,PUT,POST,PATCH,HEAD.
D
<timeout> Waiting for Response time(default is 60 sec)
<StatusCode> HTTP(s) Status Code responded by remote server, it
FI
200 OK
201 Created
C
202 Accepted
203 Non-Authoritative Information
M
204 No Content
205 Reset Content
O
302 Found
303 See Other
SI
LE
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Large
FI
415 Unsupported Media Type
416 Requested range not satisfiable
AL
417 Expectation Failed
500 Internal Server Error
501 Not Implemented
IT
502 Bad Gateway
503 Service Unavailable
EN
504 Gateway Time-out
505 HTTP(s) Version not supported
<DataLen> The length of data got
D
Parameter Saving -
FI
Mode
Max Response Time -
N
Reference Note:
O
OK
Write command Response
SI
AT+SHREAD=<starta OK
ddress>,<datalen> +SHREAD: <data_len>
<data>
+SHREAD: <data_len>
<data>
.....
or
ERROR
LE
<data_len> Return data length max is 2048 bytes once,
if more than 2048 bytes, will return many timer until all
data are read out
FI
<data> Response data
Parameter Saving -
AL
Mode
Max Response Time -
IT
Reference Note:
Read data after request
EN
2.2.12 AT+SHDISC Disconnect HTTP(s)
D
Executive Response
Command OK
N
AT+SHDISC or
O
ERROR
Parameter Saving -
C
Mode
Max Response Time -
M
Reference -
O
C
M
SI
3 Bearer Configuration
Usually module will register PS service automatically.
LE
AT Command Response Description
AT+CPIN? +CPIN:READY Check SIM card status
FI
OK
AT+CSQ +CSQ: 20,0 Check RF signal
AL
OK
AT+CGREG? +CGREG: 0,1 Check PS service
IT
OK EN
AT+COPS? +COPS: 0,0,"460 01",9 Query Network information, operator
and network mode
OK 9, NB-IOT network
D
AT+CGNAPN +CGNAPN: 1,"ctnb" Query CAT-M or NB-IOT network after
FI
OK
C
different cards
AT+CNACT? +CNACT: 1,"10.181.182.177" Get local IP
OK
AT+SHCONF="URL","http://www. OK Set up server URL
baidu.com"
AT+SHCONF="BODYLEN",1024 OK Set HTTP body Set HTTP head length
AT+SHCONF="HEADERLEN",350 OK
AT+SHCONN OK HTTP build
AT+SHBOD="SIMCOMBODY",10 OK Set body value
AT+SHAHEAD="Content-Length"," OK Add head value
120"
AT+SHSTATE? +SHSTATE: 1 Get HTTP status
OK
LE
AT+SHREQ="http://www.baidu.co OK Set request type is GET.
m",1 Get data size is 7382.
+SHREQ: "GET",200,7382
FI
AT+SHBOD="SIMCOMBODY",10 OK
AT+SHREQ="http://www.baidu.co +SHREQ: "POST",302,225 Set request type is POST
AL
m",3 Get data size is 225.
AT+SHREQ="http://www.baidu.co +SHREQ: "PUT",200,116848 Set request type is PUT
m",2 Get data size is 116848.
IT
AT+SHREAD=0,10 OK Read data length is 10
EN Data is <!doctype
+SHREAD: 10
<!doctype
AT+SHDISC OK Disconnect HTTP connect
D
FI
OK
C
.baidu.com"
AT+SHCONF="BODYLEN",1024 OK
AT+SHCONF="HEADERLEN",350 OK
AT+SHCONN OK Connected
AT+SHBOD="SIMCOMBODY",10 OK Set body value
AT+SHAHEAD="Content-Length"," OK Add head value
120"
AT+SHSTATE? +SHSTATE: 1 Get HTTP status
LE
OK
AT+SHREQ="https://www.baidu.c OK Set request type is GET.
FI
om",1 Get data size is 227
+SHREQ: "GET",200,227
AL
AT+SHBOD="SIMCOMBODY",10 OK
AT+SHREQ="https://www.baidu.c +SHREQ: "POST",302,225 Set request type is POST
om",3 Get data size is 225.
IT
AT+SHREQ="https://www.baidu.c +SHREQ: "PUT",302,225 Set request type is PUT
om",2 Get data size is 225.
AT+SHREAD=0,10 OK
EN Read data length is 10
Data is <!doctype
+SHREAD: 10
D
<!doctype
FI
Contact
Address: Building B, No.633 Jinzhong Road, Changning District, Shanghai P.R.China 200335
Zip Code: 200335
LE
Tel: +86-21-31575126
Support: support@simcom.com
FI
AL
IT
EN
D
FI
N
O
C
M
O
C
M
SI