Page 1
SIM7500_SIM7600_SIM7800 Series_SSL_AT Command Manual_V1.00 LTE Module Shanghai SIMCom Wireless Solutions Ltd. Building A, SIM Technology Building, No.633, Jinzhong Road Changning District 200335 Tel:86-21-31575100/31575200 support@simcom.com www.simcom.com...
Page 2
Manual_V1.00 General Notes 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.
Smart Machine Smart Decision Version History Version Date Chapter What is new V1.00 2018-09-28 New version SIM7500_SIM7600_SIM7800 Series_SSL_AT Command Manual 2 / 36...
Smart Machine Smart Decision Contents Version History ..............................2 Contents ................................3 Introduction .............................. 4 1.1 The SSL Context Management AT Commands ................... 4 1.2 The process of Using SSL AT Commands ....................4 2 Description of AT Command ........................5 2.1 SSL Context Management AT ........................
Smart Machine Smart Decision 1 Introduction 1.1 The SSL Context Management AT Commands Step 1: Configure SSL version by AT+CSSLCFG=“sslversion”,<ssl_ctx_index>,<sslversion>. Step 2: Configure SSL authentication mode by AT+CSSLCFG=“authmode”,<ssl_ctx_index>, <authmode>. Step 3: Configure the flag of ignore local time by AT+CSSLCFG=“ignorlocaltime”,<ssl_ctx_index>,<ignoreltime>. Step 4: Configure the max time in SSL negotiation stage by AT+CSSLCFG=“negotiatetime”,<ssl_ctx_index>,<negotiatetime>.
Smart Machine Smart Decision 2 Description of AT Command 2.1 SSL Context Management AT 2.1.1 AT+CSSLCFG Configure the SSL Context AT+CSSLCFG Configure the SSL Context Response +CSSLCFG: "sslversion",(0-9),(0-4) +CSSLCFG: "authmode",(0-9),(0-3) +CSSLCFG: "ignorelocaltime",(0-9),(0,1) Test Command +CSSLCFG: "negotiatetime",(0-9),(10-300) AT+CSSLCFG=? +CSSLCFG: "cacert",(0-9),(5-128) +CSSLCFG: "clientcert",(0-9),(5-128) +CSSLCFG: "clientkey",(0-9),(5-128) Response +CSSLCFG:...
Page 7
Smart Machine Smart Decision +CSSLCFG: 6,<sslversion>,<authmode>,<ignoreltime>,<negotiatetime>,< ca_file>,<clientcert_file>,<clientkey_file> +CSSLCFG: 7,<sslversion>,<authmode>,<ignoreltime>,<negotiatetime>,< ca_file>,<clientcert_file>,<clientkey_file> +CSSLCFG: 8,<sslversion>,<authmode>,<ignoreltime>,<negotiatetime>,< ca_file>,<clientcert_file>,<clientkey_file> +CSSLCFG: 9,<sslversion>,<authmode>,<ignoreltime>,<negotiatetime>,< ca_file>,<clientcert_file>,<clientkey_file> Response Write Command +CSSLCFG: Query the configuration of the specified <ssl_ctxindex>,<sslversion>,<authmode>,<ignoreltime>,<ne SSL context gotiatetime>,<ca_file>,<clientcert_file>,<clientkey_file> AT+CSSLCFG=<ssl_ctx_index> Write Command Response a)If successfully: Configure the version of the specified SSL context AT+CSSLCFG="sslversion",<ssl_ctx_in b)If failed:...
Page 8
Smart Machine Smart Decision _index>,<negotiatetime> ERROR Write Command Response a)If successfully: Configure the server root CA of the specified SSL context AT+CSSLCFG="cacert",<ssl_ctx_index> b)If failed: ,<ca_file> ERROR Write Command Response a)If successfully: Configure the client certificate of the specified SSL context AT+CSSLCFG="clientcert",<ssl_ctx_ind b)If failed: ex>,<clientcert_file>...
Page 9
Smart Machine Smart Decision <negotiatetime> The timeout value used in SSL negotiate stage. The range is 10-300 seconds. The default value is 300. <ca_file> The root CA file name of SSL context. The file name must have type like “.pem” or “.der”.The length of filename is from 5 to 128 bytes.
Smart Machine Smart Decision Command Manual 2.1.2 AT+CCERTDOWN Download certificate into the module AT+CCERTDOWN Download certificate into the module Response Test Command +CCERTDOWN: (5-128),(1-10240) AT+CCERTDOWN=? Response a)If it can be download: > Write Command AT+CCERTDOWN=<filename>,<len> <input data here> b)If failed: ERROR Defined Values <filename>...
Smart Machine Smart Decision <CR><LF>] Defined Values <filename> The certificate/key files which has been downloaded to the module. If the filename contains non-ASCII characters, it will show the non-ASCII characters as UTF8 code. 2.1.4 AT+CCERTDELE Delete certificates AT+CCERTDELE Delete certificate from the module Response a)If delete successfully: Write Command...
Smart Machine Smart Decision AT+CCHSET Configure the report mode of sending and receiving Response Test Command +CCHSET: (0,1),(0,1) AT+CCHSET=? Response Read Command +CCHSET: <report_send_result>,<recv_mode> AT+CCHSET? Response Write Command a)If successfully: AT+CCHSET=<report_send_result>[,<re b)If failed: cv_mode>] ERROR Defined Values <report_send_result> Whether to report result of CCHSEND, the default value is 0: 0 –...
Smart Machine Smart Decision Response a)If successfully: Write Command AT+CCHMODE=<mode> b)If failed: ERROR Defined Values <mode> The mode value: 0 – Normal. 1 – Transparent mode The default value is 0. 2.2.3 AT+CCHSTART Start SSL service AT+CCHSTART is used to start SSL service by activating PDP context. You must execute AT+CCHSTART before any other SSL related operations.
Smart Machine Smart Decision NOTE: If you don’t set the SSL context by this command before connecting to SSL/TLS server by AT+CCHOPEN, the CCHOPEN operation will use the SSL context as same as index <session_id> (the 1st parameter of AT+CCHOPEN) when connecting to the server. AT+CCHSSLCFG Set the SSL context Response + CCHSSLCFG: (0,1),(0-9)
Smart Machine Smart Decision b)If successfully: +CCHCLOSE: <session_id>,0 c)If successfully in transparent mode: CLOSED d)If failed: ERROR Defined Values <session_id> The session index to operate. It’s from 0 to 1. The result code: 0 is success. Other values are failure. Please <err>...
Smart Machine Smart Decision blocked. b)If parameter is wrong or other errors occur: ERROR Defined Values <session_id> The session_id to operate. It’s from 0 to 1. <len> The length of data to send. Its range is from 1 to 2048 bytes. <unsent_len_0>...
Smart Machine Smart Decision calling. It will read all the received data when the value is greater than the length of RX data cached for session <session_id>. 0 means the maximum bytes to receive is 2048 bytes. (But, when 2048 is greater than the length of RX data cached for session <session_id>, 0 means the length of RX data cached for session <session_id>).
Smart Machine Smart Decision Not set certificates 2.3.2 Unsolicited result codes Unsolicited codes +CCHEVENT: <session_id>,RECV In manual receiving mode, when new data of a connection EVENT arriving to the module, this unsolicited result code will be reported to MCU. +CCH_RECV_CLOSED: When receive data occurred any error, this unsolicited result <session_id>,<err>...
Smart Machine Smart Decision // Specify the parameter value of the PDP context corresponding to cid AT+CGSOCKCONT=1,"IP","CMNET" AT+CGPADDR +CGPADDR: 1,10.49.14.68 //ensure the first PDP context get a IP address +CGPADDR: 4,0.0.0.0 Note: usually CSOCKAUTH and CSOCKSETPN parameter are kept default if not care about. 3.1 Access to TCP server Following commands shows how to communicate with a TCP server.
Page 22
Smart Machine Smart Decision Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: zh-cn,zh;q=0.5 Accept-Encoding: gzip, deflate Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Cookie: BAIDUID=D6F6D0D297CCAE39BD45C683996696C7:FG=1; Hm_lvt_9f14aaa038bbba8b12ec2a4a3e51d254=1321597443439; USERID=e194072f4759c0f7c2b6e5d3b09298984fd1 +CCHSEND: 0,0 //report the received data from server +CCHRECV: DATA,0,757 HTTP/1.1 302 Found Connection: Keep-Alive Content-Length: 225 Content-Type: text/html Date: Wed, 05 Sep 2018 08:59:38 GMT Location: https://www.baidu.com/ Server: BWS/1.1...
Smart Machine Smart Decision AT+CCHSTOP +CCHSTOP: 0 3.2 Access to SSL/TLS server (not verify server and client) Following commands shows how to access to a SSL/TLS server without verifying the server. It needs to configure the authentication mode to 0, and then it will connect to the server successfully. // Set the SSL version of the first SSL context AT+CSSLCFG=”sslversion”,0,4 // Set the authentication mode(not verify server) of the first SSL context...
Page 24
Smart Machine Smart Decision Content-Length: 0 +CCHSEND: 0,0 //report the received data from server +CCHRECV: DATA,0,917 HTTP/1.1 200 OK Accept-Ranges: bytes Cache-Control: no-cache Connection: Keep-Alive Content-Length: 227 Content-Type: text/html Date: Tue, 04 Sep 2018 06:21:35 GMT Etag: "5b7b7f40-e3" Last-Modified: Tue, 21 Aug 2018 02:56:00 GMT P3p: CP="...
Smart Machine Smart Decision +CCHCLOSE: 0 //stop SSL Service AT+CCHSTOP +CCHSTOP: 0 3.3 Access to SSL/TLS server (only verify the server) Following commands shows how to access to a SSL/TLS server with verifying the server. It needs to configure the authentication mode to 1 and the right server root CA, and then it will connect to the server successfully. // Set the SSL version of the first SSL context AT+CSSLCFG=”sslversion”,0,4 // Set the authentication mode(verify server) of the first SSL context...
Page 26
Smart Machine Smart Decision +CCHOPEN: 0,0 //send data to server AT+CCHSEND=0,121 >GET / HTTP/1.1 Host: www.baidu.com User-Agent: MAUI htp User Agent Proxy-Connection: keep-alive Content-Length: 0 +CCHSEND: 0,0 //report the received data from server +CCHRECV: DATA,0,917 HTTP/1.1 200 OK Accept-Ranges: bytes Cache-Control: no-cache Connection: Keep-Alive Content-Length: 227...
Smart Machine Smart Decision </body> </html> //Disconnect from the Service AT+CCHCLOSE=0 +CCHCLOSE: 0 //stop SSL Service AT+CCHSTOP +CCHSTOP: 0 3.4 Access to SSL/TLS server (verify server and client) Following commands shows how to access to a SSL/TLS server with verifying the server and client. It needs to configure the authentication mode to 2, the right server root CA, the right client certificate and key, and then it will connect to the server successfully.
Page 28
Smart Machine Smart Decision // Enable reporting +CHSEND result AT+CCHSET=1 // start SSL service, activate PDP context AT+CCHSTART +CCHSTART: 0 // Set the first SSL context to be used in the SSL connection AT+CCHSSLCFG=0,0 //connect to SSL/TLS server AT+CCHOPEN=0, ”www.baidu.com”,443,2 +CCHOPEN: 0,0 //send data to server AT+CCHSEND=0,121...
Page 30
Smart Machine Smart Decision // Set the authentication mode(only verify client) of the first SSL context AT+CSSLCFG=”authmode”,0,3 // Set the client certificate of the first SSL context AT+CSSLCFG=”clientcert”,0,”cert.pem” // Set the client key of the first SSL context AT+CSSLCFG=”clientkey”,0,”key_cert.pem” // Enable reporting +CHSEND result AT+CCHSET=1 // start SSL service, activate PDP context...
Smart Machine Smart Decision 3.6 Access to SSL/TLS server in transparent mode Following commands shows how to access to a SSL/TLS server with not verifying the server in transparent mode. It needs to configure the sending and receiving mode to 1(the transparent mode). Only the session 0 is support the transparent mode.
Need help?
Do you have a question about the SIM7600 Series and is the answer not in the manual?
Questions and answers