SIM800 Series_SSL
_Application Note
GPRS Module
SIMCom Wireless Solutions Limited
Building B, SIM Technology Building, No.633, Jinzhong Road
Changning District, Shanghai P.R. China
Tel: 86-21-31575100
support@simcom.com
www.simcom.com
SIM800 Series_SSL_Application Note_V1.05
Document Title:
Version:
Date:
Status:
GENERAL NOTES
SIM800 Series_SSL_Application Note
1.05
2020.10.16
Released
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. FURTHERMORE, SYSTEM VALIDATION OF THIS PRODUCT
DESIGNED BY SIMCOM 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 SIMCOM WIRELESS SOLUTIONS LIMITED COPYING, TO OTHERS AND USING THIS DOCUMENT,
ARE FORBIDDEN WITHOUT EXPRESS AUTHORITY BY SIMCOM. OFFENDERS ARE LIABLE TO THE
PAYMENT OF INDEMNIFICATIONS. ALL RIGHTS RESERVED BY SIMCOM IN THE PROPRIETARY
TECHNICAL INFORMATION ,INCLUDING BUT NOT LIMITED TO REGISTRATION GRANTING OF A
PATENT , A UTILITY MODEL OR DESIGN. ALL SPECIFICATION SUPPLIED HEREIN ARE SUBJECT TO
CHANGE WITHOUT NOTICE AT ANY TIME.
SIMCom Wireless Solutions Limited
Building B, SIM Technology Building, No.633 Jinzhong Road, Changning District, Shanghai P.R. China
Tel: +86 21 31575100
Email: simcom@simcom.com
For more information, please visit:
https://www.simcom.com/download/list-863-en.html
For technical support, or to report documentation errors, please visit:
https://www.simcom.com/ask/ or email to: support@simcom.com
Copyright © 2020 SIMCom Wireless Solutions Limited All Rights Reserved.
www.simcom.com
2 / 25
SIM800 Series_SSL_Application Note_V1.05
About Document
Version History
Version Date
V1.00
V1.01
2013.10.18
2013.06.30
Owner
Hanjun.Liu
Ping.Zhang/
Hanjun.Liu
V1.02
V1.03
2016.11.17 Wenjie.Lai
2019.12.10
Chengliang.Wang
Xiaohui.Xu
V1.04
2020.6.15
V1.05
2020.10.16
Liuyang.Zhang
/Wenjie.Lai
Jia.tao/Wenjie.Lai
Scope
What is new
First Release
Add scope
Chapter2.4, Add description of TCP over SSL
Chapter2.5, Add description of SSL certificate
Chapter2.6, Add SSL option
Chapter3.8,3.9,3.10 Add examples
Scope
Chapter 2.7,Add AT+SSLSETROOT
Chapter 2.8,Add AT+SSLDEROOT
Chapter 2.9,AT+SSLDECLI
Chapter 3.11,Add examples
Chapter 3.12, Add examples
Chapter 3.13, Add examples
All
Chapter 3.5,Add client certificate file type
Document style
This document presents the AT command of SSL operation and application examples. This document can
apply to SIM800 series modules with SSL function.
www.simcom.com
3 / 25
SIM800 Series_SSL_Application Note_V1.05
Contents
2.1
2.2
2.3
2.4
About Document.................................................................................................................................. 3
Version History.........................................................................................................................................................3
Scope........................................................................................................................................................................ 3
Contents................................................................................................................................................. 4
Introduction.................................................................................................................................... 5
1
Purpose of the document...........................................................................................................................5
1.1
Related Documents.................................................................................................................................... 5
1.2
Conventions and abbreviations................................................................................................................ 5
1.3
2 SSL Function..................................................................................................................................6
SSL Description...........................................................................................................................................6
HTTPS Description..................................................................................................................................... 6
FTPS Description........................................................................................................................................ 7
EMAIL Encrypted Transmission Description.......................................................................................... 7
3 AT command.................................................................................................................................. 8
AT+EMAILSSL Set Email to Use SSL Function.................................................................................... 8
AT+HTTPSSL Set HTTP to Use SSL Function...................................................................................9
AT+FTPSSL Set FTP to Use SSL Function...................................................................................... 10
AT+CIPSSL Set TCP to Use SSL Function.......................................................................................10
AT+SSLSETCERT Import SSL Client Client Certificate File with Private Key............................ 11
AT+SSLOPT SSL Option......................................................................................................................12
AT+SSLSETROOT Import SSL Root Certificate File...................................................................... 12
AT+SSLDEROOT Delete SSL Root Certificate File.........................................................................13
AT+SSLDECLI Delete SSL Client Certificate File............................................................................14
4 SSL Examples..............................................................................................................................15
EMAIL Send Encrypted Mail with Normal Port.................................................................................... 15
4.1
EMAIL Send Encrypted Mail with Encryption Port.............................................................................. 16
4.2
EMAIL Receive Encrypted Mail with Normal Port...............................................................................16
4.3
EMAIL Receive Encrypted Mail with Encryption Port.........................................................................18
4.4
HTTPS Get Method with HTTPS........................................................................................................... 19
4.5
FTP Get Method with Implicit FTPS...................................................................................................... 20
4.6
Set FTP Get Method with Explicit FTPS...............................................................................................21
4.7
Establish a TCP Client Connection over SSL......................................................................................22
4.8
Establish a TCP Client Connection over SSL in Multi Connection...................................................22
4.9
4.10 Import a SSL Client Certificate File with Private Key..........................................................................24
Import a SSL Root Certificate File......................................................................................................... 24
4.11
4.12 Delete a SSL Root Certificate File......................................................................................................... 25
4.13 Delete a SSL Client Certificate File....................................................................................................... 25
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
www.simcom.com
4 / 25
SIM800 Series_SSL_Application Note_V1.05
1 Introduction
1.1Purpose of the document
Based on module AT command manual, this document will
EMAIL and FTP function.
introduce SSL operations, including HTTP,
Developers could understand and develop application quickly and efficiently based on this document.
1.2Related Documents
[1] SIM800 Series_AT Command Manual
1.3Conventions and abbreviations
Abbreviation
URC
TE
TA
DTE
DCE
ME
MS
SSL
TLS
Description
Unsolicited request code
Terminal Equipment
Terminal Adapter
Data Terminal Equipment or plainly "the application" which is running on an
embedded system
Data Communication Equipment or facsimile DCE(FAX modem, FAX board)
Mobile Equipment
Mobile Station
Secure Socket Layer
Transport Layer Security
www.simcom.com
5 / 25
SIM800 Series_SSL_Application Note_V1.05
2 SSL Function
2.1SSL Description
Secure socket layer (SSL), a security protocol, is first put forward by Netscape at the same time as they
lunch the first version of Web Browser, the purpose is to provide security and data integrity for network
communication. SSL encrypts network connection at the transport layer.
SSL uses public key technology to ensure the confidentiality and reliability of communication between
applications, so that the communication between client and server application will not be intercepted by the
aggressor. It can be supported on both the server and the client ends, has become the industry standard
secure communication on the internet. The current Web browsers generally combine the HTTP and SSL,
enabling secure communication. This Agreement and its successor is TLS (Transport Layer Security).
TLS using the key algorithm provided endpoint authentication and secure communication on the Internet,
which is based on public key infrastructure (PKI). However, in the example of a typical implementation, only
the network service provider is reliable authentication, the client is not necessarily. This is because the
public key infrastructure common in commercial operation, electronic signature certificate is usually
required to pay for. Protocol
is designed in a way to make the master-slave architecture application
communication itself prevent eavesdropping, tampering, and message forgery.
SIM800 series support SSL2.0, SSL3.0, TLS1.0 and TLS1.2.
2.2HTTPS Description
HTTPS is the HTTP channel which targets secure, in simple terms is safe version of HTTP. Added layer of
SSL below HTTP, security of HTTPS is based on SSL, so the details please see the SSL encryption.
It is a URI scheme (abstract identifier system), syntax similar to http: System. For secure HTTP data
transmission. HTTPS:URL shows that it uses HTTP, but HTTPS exists a default port different with HTTP
and has an encryption / authentication layer (between HTTP and TCP). This system was originally
developed by Netscape for providing authenticated and encrypted communication method, and now it is
widely used in security-sensitive communication on the World Wide Web, such as transaction payment.
www.simcom.com
6 / 25
SIM800 Series_SSL_Application Note_V1.05
2.3FTPS Description
FTPS is a multi-transmission protocol, equivalent to the encrypted version of the FTP. It is an enhanced
FTP protocol which uses standard FTP protocol and commands in the Secure Sockets Layer. It add SSL
security features for FTP protocol and data channels. FTPS is also known as "FTP-SSL" and
"FTP-over-SSL". SSL is a protocol which encrypts and decrypts data in secure connection between client
and an SSL-enabled server.
2.4EMAIL Encrypted Transmission Description
To receive Email, SIM800 series support SSL encrypted POP3 protocol which is called POP3S. It will use
special port, default port: 995. To send Email, SIM800 series use HTTPS communication, default port: 465.
SIM800 series also supports the use of ordinary port, through the STARTTLS (SMTP) and STLS (POP3) to
enable encryption transmission.
www.simcom.com
7 / 25
SIM800 Series_SSL_Application Note_V1.05
3 AT command
SIM800 series modules provide encrypted link AT command is as follows:
Command
AT+EMAILSSL
AT+HTTPSSL
AT+FTPSSL
AT+CIPSSL
AT+SSLSETCERT
AT+SSLOPT
AT+SSLSETROOT
AT+SSLDEROOT
AT+SSLDECLI
Description
Set EMAIL to use SSL function
Set HTTP to use SSL function
Set FTP to use SSL function
Set TCP to use SSL function
Import SSL client certificate file
SSL option
Import SSL root certificate file
Delete SSL root certificate file
Delete SSL Client Certificate File
3.1AT+EMAILSSL Set Email to Use SSL Function
AT+EMAILSSL Set EMAIL to Use SSL Function
Test Command
AT+EMAILSSL=?
Response
+EMAILSSL: (list of supported s)
OK
Response
+EMAILSSL:
Read Command
AT+EMAILSSL?
Write Command
AT+EMAILSSL=
Parameter Saving Mode
Max Response Time
Reference
OK
Response
OK
NO_SAVE
-
An error code will return if the SSL channel setup failure or
communication errors happened when sending mail:
+SMTPSEND:
An error code when sign POP3 server:
+POP3IN:
www.simcom.com
8 / 25