SIM7600_MQTT_AT

所需积分/C币:49 2019-03-09 23:56:06 1.04MB PDF

SIM7500_SIM7600_SIM7800 Series_MQTT_AT Command Manual_V1.00
m E SUSEA AOTEOITFany Smart Machine Smart Decision Version History Version Date Chapter What is new V1.00 2018-09-28 New version SIM7500 SIM7600 SIM7800 Series MQTT AT Command Manual 2/41 m E SUSEA AOTEOITFany Smart Machine Smart Decision Contents Version history∴.2 Contents 3 1 Introduction.…n 1■■■■圆■■■■重■口■■■■■■面重■■■■ 4 1.1 The SSL Context Management AT Commands(for SSL/TLS MQTT) 1. 2 The process of Using MQTT AT Commands 2 Description ofaT command 日口m 2. 1 SSL Context Management AT (only for SSL/TLS MQTT) 2.1. 1 AT+CSSLCFG Configure thc SSL Contcxt 2.1.2 AT+CCERTDOWN Download certilicate into the module 4455599 2.1. 3 AT+ccertlist List certificates 2.1 4 AT I CCERTDELE Delete certificates ..10 2.2 MQTT Services AT… 2.2. 1 AT+CMOTTSTART Start mott servic 11 2.2.2 AT+CMQTTSTOP Stop MQTTservice 223AT+ CMQTTACCQ Acquire a client.…..… 12 2.2.4 ATICMQTTREL Release a client 13 2.2.5 AT+CMQTTSSLCFG Set the SSL context(only for SSL/TLS MQTT) .13 2.2.6 AT+CMQTTWILLTOPIC Input thc topic of will mcssagc 14 2.2.7 AT+CMQTTWILLMSG Input the will message 228AT+ CMQTTCONNECT Connect to MQTT server.…,…,…,…, 16 2.2.9 AT ICMQTTDISC Disconnect from server 1 17 2.2.10 AT+CMQTTTOPIC Input the topic of publish message 18 2. 2. 11 AT+-CMQTTPAYLOAD Input the publish message 2.2.12 AT+CMQTTPUb Publish a message to server 20 2.2. 13 AT+CMQTTSUBTOPIC Input the topic of subscribe message 2 2.2. 14 AT+CMQTTSUb Subscribe a mcssagc to scrvcr 22 2.2.15 AT+CMQTTUNSUBTOPIC Input the topic of unsubscribe message 1D面自面国面面国重 2.2.16 AT+CMQTTUNSUB Unsubscribe a message to server 24 2.2.17AT+CMQTTCFG Configure the mott context 25 2. 3 Command result codes and unsolicited codes 26 2. 3. 1 Command rcsult <crr> codcs 26 2.3.2 Unsolicited result codes 27 3 Exampl de …29 3. 1 Access to MOTT server not SSL/TLS 30 3.2 Connect to SSL/TLS MQTT server(not verify server) 32 3.3 Access to SSL/TLS MQTT server(only verify the server) 34 Access to SsL/ TLS MQTT server( verify server and client)……… 36 3. 5 Access to MQTT server without checking UtF& coding :::.·:: 39 SIM7500 SIM7600 SIM7800 Series MQTT AT Command Manual 3/41 m E SUSEA AOTEOITFany Smart Machine Smart Decision This document is a reference guide to all the at commands defined for MQTT. Through these MQTT A commands, you can communicate with a MQTT server 1 Introduction 1. The SsL Context Management AT Commands(for SSL/TLS MQTT) Step 1: Configure SSL version by ATt 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 negoliation stage by AT+CSSLCFG=negotiatetime", <ssl ctx index >, < negotiatetime Step 5: Configure the server root Ca by at+CSslCFG=cacert,<ssl ctx index>, <ca file>. Step 6: Configure the client certificate by at+CsslCFg-clientcert' ssl ctx index>, <clientcert file> Step 7: Configure the client key by at+CsslCFGclientkey', ssl ctx index>, <clientkey file> Step & Download thc certificate into the module by AT+CCERTDOWN Step 9: Dclctc the certificate from the module by at+CCertdele Step 10: List the certificates by AT I CCERTLIST 1.2 The process of Using MQTT AT Commands Step 1: Ensure GPRS network is available before performing SSl related operations Step 2: Configure the parameter of PDP context by at+CGDCONT Step 3: Activate the PDP context to start MQTT service by at+CMQTTSTART. Step 4: Acquire a client by At+-CMQTTACCQ Step 5: Configure SSL context by aT+CSSlCFG (if connect to SSL/TLS MQTT Server) Step 6: Set the SSL context used in SSL connection by AT+CMQTTSSLCFG (if connect to SSL/TLS MQTT server) Step 7: Connect to MQTT server by AT+CMQTTCONNECT Step 8: Subscribe to message by AT+CMQTTSUB SIM7500 SIM7600 SIM7800 Series MQTT AT Command Manual 4/41 m E SUSEA AOTEOITFany Smart Machine Smart Decision Step 9: Unsubscribe to message by AT+CMQTTUNSUB Step 10: Input the topic of a publish message by at+CMQTTTOPIC Step 11: Input thc pay load of a publish mcssage by At+CMQTTPAYLOAD Step 12: Publish message by AT-CMQTTPUB Step 13: Disconnect from the server by ati CmQTtdisc Step 13: Release the client by AT+CMQTTREL Step 14: Deactivate the pDp context to stop mQtt service by at+CMQTTSTOP 2 Description of aT command 2.1 SSL Context Management AT(only for SSL/TLS MQTT) 2.1.1 AT+CSSLCFG Configure the SsL Context AT+CSSLCFG Configure the SSL Context Responsc +CSSLCFG: sslversion (0-9). 0-4) + CFG: 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: clicntkey", (0-9), (5-128) OK Re +CSSlcFG: 0, <sslversion>, <authmode>, <ignoreltime>, <negotiatetime> ca file>, <clientcert file>, <clientkey file +CSSlcFg Rcad command 1, <sslversion>, <authmode>, <ignoreltime>, <negotiatetime> AT+CSSLCFG? ca file>, <clientcert_ file>, clientkey_ file +CSSlCFG 2,<sslversion>, <authmode>, < ignoreltime>, <negotiatetime> ca file>, < clientcert file>, sclientkey file> +CSSLCFG: 3, sslversion>, <authmode>, ignoreltime>, <negotiatetime> SIM7500 SIM7600 SIM7800 Series MQTT AT Command Manual 5/41 m E SUSEA AOTEOITFany Smart Machine Smart Decision ca file>, <clientcert file, sclientkey_file> +CSSLCFG 4 <sslversion> <authmode>, ignoreltime> ca file>, <clientcert file>, <clientkey file] . negotiatetime>, s +CSSLCFG: 5. <sslversion>, sauthmode>, signoreltime>, negotiatetime>,< ca file>, <clientcert file>, <clientkey file> +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.<ssIversion><authmode><ignoreltime> < negotiatetime>< ca file>, clientcert file>, sclientkey file> +CSSLCFG: 9, <sslversion>, <authmode>, ignoreltime>, < negotiatetime> ca file>, <clicntcert file>, sclicntkey_ file> OK 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=<sSI ctx index> OK Write command R esponse /*Configure the version of the specified SSL a)If successfully context米 OK AT+CSSLCFG="sslversion" <ssl_ctx_in b)If failed dex><sslversion> ERROR Write command R esponse " Configure the authentication mode of the a)If successfully specified SSL context/ OK AT+CSSLCFG="authmode" <ssl ctx in b)If failed dex><authmode> ERROR Write Command R esponse /*Configure the ignore local time flag of the a)If successfully specified SsL context OK AT+CSSLCFG="ignorelocaltime" <ssl c b)If failed tx index>, <ignoreltime> ERROR Write Command Response SIM7500 SIM7600 SIM7800 Series MQTT AT Command Manual 6/41 m E SUSEA AOTEOITFany Smart Machine Smart Decision /*Configure the negotiate timeout value of the a)lf successfully specified SSL context/ OK AT+CSSLCFG="negotiatetime" <ssl_ctx b)If failed index><negotiatetime> ERROR Write Command Re esponse /*Configure the server root CA of the a)Ifsuccessfully specified SSL context/ OK AT+CSSLCFG-cacert", <ssl_ctx_index> b)If failed <ca file> ERROR Write command Re esponse /*Configure the client certificate of the a)If successfully specified SSL context*/ OK AT+CSSLCFG="clientcert" <ssl_ctx_ ind b)If failed ex>. <clientcert file> ERROR Write command Response /*Configure the client key of the specified a)If successfully SSL context/ OK AT+CSSLCFG-clientkey", <ssl_ctx_ind b)If failed ex> <clientkey file> ERROR Defined values <ssI ctx index> The SSL context ID. The range is 0-9 <sslversion> The ssl version the defaull value is 4 0-SSL3.0 1-ILS1.0 TLS1.1 3-TLS1.2 4-All The configured version should be support by server. So you should use the default value if you cant confirm the version W hich the server supported cauthmodex The authentication mode. the default value is 0 0-no authentication 1-server authentication. It needs the root Ca of the server 2-server and client authentication. It needs the root ca of the server, the cert and key of the client 3-client autl thentication It needs the cert and key of the client <ignoreltime> The flag to indicate how to deal with expired certificate, the default value is 1 0- care about time check for certification 1-ignore lime check for certification SIM7500 SIM7600 SIM7800 Series MQTT AT Command Manual 7/41 m E SUSEA AOTEOITFany Smart Machine Smart Decision When set the value to 0, it need to set the right current date and time by at+cclk when need ssl certification <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 If the filename contains non-ASCII characters, the file path parameter should contain a prefix of non-ascii and the quotation mark (The string in the quotation mark should be hexadecimal of the filename's UTF& code) There are two ways to download certificate files to module 1. By AT+CCERTDOWN 2. By Ftps or Https commands plEase refer to SIM7500 SIM7600 SIM7800 Series FtPs At Command Manual and sim7500 Sim7600 Sim7800 Series Http At Command manual <clientcert fe> The client cert Mile name Of SSL context. The file name must have type like“ pem or“.der”. The length of filename is from 5 to 128 bytes If the filename contains non-ASCII characters, the file path parameter should contain a prefix of non-ascii and thc quotation mark (The string in the quotation mark should be hexadecimal of the filename's UTF& code) There are two ways to download certificate files to module By At+CCERTDOWN By Ftps or Https commands Please refer to SIM7500 SIM7600 SIM7800 Series FTPs At Command Manual and siM7500 Sim7600 Sim7800 Series Http Al Command manual <clientkey_file> The client kcy file c namc of ssl contcxt. the filc namc must have type like pem"or"der". The length of filename is from 5 to 12 8 byte f the filename contains non-ASCll characters the file path parameter should contain a prefix of non-ascii and the quotation mark(The string in the quotation mark should be hexadecimal of the filenames uTf& code) There are two ways to download certificate files to module 1. BY AT+CCERTDOWN SIM7500 SIM7600 SIM7800 Series MQTT AT Command Manual 8/41 m E SUSEA AOTEOITFany Smart Machine Smart Decision 2. By Ftps or Https commands Please refer to SIM7500 SIM7600 SIM7800 Series FtPs Ar Command Manual and Sim7500 Sim7600 Sim7800 Series Http at Command manual 2,1,2 AT+CCERTDOWn Download certificate into the module AI+CCERTDOWN Download certificate into the module R Test Command + CCERTDOWN:(5-128),(1-10240) AT+CCERTDOWN=? OK Response DIf it can be doy Write command AT+CCERTDOWN-<filename>, <clen> <input data here> b)If failed ERROR Defined values <filename> The name of the certificate/ key file. The file name must have type like"pem"or"der". The length of filename is from 5 te 128 bytes If the filename contains non-ASCII charactcrs, the filc path parameter should contain a prefix of non-ascii, and the quotation mark (The string in the quotation mark should be hexadecimal of the filename's UTF8 code For example: If you want to download a file with name 华pcm”, you should convert thc“中华 pcm"to UTF8 coding (&#x4E2D; &#x534E; pem), then input the hexadecimal (262378344532443B26237835333453B2E70656D) of ute8 coding <len> The length of the file data to send. The range is from 1 to 10240 bytes 2.1 3 AT+CCERTLIST List certificates AT+CCERTLIST List certificates Execute Command Response SIM7500 SIM7600 SIM7800 Series MQTT AT Command Manual 9/41

...展开详情
试读 41P SIM7600_MQTT_AT
img

关注 私信 TA的资源

上传资源赚积分,得勋章
    最新推荐
    SIM7600_MQTT_AT 49积分/C币 立即下载
    1/41
    SIM7600_MQTT_AT第1页
    SIM7600_MQTT_AT第2页
    SIM7600_MQTT_AT第3页
    SIM7600_MQTT_AT第4页
    SIM7600_MQTT_AT第5页
    SIM7600_MQTT_AT第6页
    SIM7600_MQTT_AT第7页
    SIM7600_MQTT_AT第8页
    SIM7600_MQTT_AT第9页
    SIM7600_MQTT_AT第10页
    SIM7600_MQTT_AT第11页
    SIM7600_MQTT_AT第12页
    SIM7600_MQTT_AT第13页

    试读已结束,剩余28页未读...

    49积分/C币 立即下载 >