移远EC20 MQTT协议文档 英文

所需积分/C币:38 2018-12-29 15:29:31 787KB PDF
收藏 收藏
举报

移远EC20的4G模块关于MQTT协议和阿里云的服务器通讯的AT指令文档,实际测试过可以正常连接及数据通讯。
About the document istory Revision Date Author Description 1.0 20180821 Chavis CHEN Initial AT Command Syntax 3.2. Description of MQTT Related AT Commands 777 3.2.1. AT+QMTCFG Configure Optional Parameters of MQTT 3.2.2. AT+QMTOPEN Open a Network for MQTT Client 3.2.3. AT+QMTCLOSE Close a network for mqtt client 3.2.4. AT+QMTCONN Connect a Client to MQTT Server 14 3.2.5. AT+QMTDISC Disconnect a Client from MQTT Server 15 3.2.6. AT+QMTSUb Subscribe to Topics 16 3.2.7. AT+QMTUNS Unsubscribe from Topics 3.2.8. AT+QMTPUBEX Publish Messages 18 3.2.9. AT+QMTRECV Read Messages from Buffers 0 4.1 +QMTSTAT URC to Indicate State Change in MQTT Link Layer 21 4.2.+QMTRECV URC to Notify the Host to read mQTT Packet Data 22 5.1. Example of MQTT Operation without SSL 24 5.2. Example of MQTT Operation with SSL 26 U∈CT∈ table 1, TYPES OF AT COMMANDS AND RESPONSES 7 TABLE 2: MQTT RELATED URCS 21 TABLE 3: ERROR CODES OF THE URC 22 TABLE 4: RELATED DOCUMENTS 29 TABLE 5: TERMS AND ABBREVIATIONS 1 MQTT (Message Queuing Telemetry Transport)is a broker based publish/subscribe messaging protocol designed to be open, simple, lightweight and easy to implement. It is designed for connections with remote locations where a"small code footprint" is required or the network bandwidth is limited This document mainly introduces how to use the mQtt function of Quectel EC2X &EG9x&EM05 modules through AT commands This document is applicable to following Quectel modules EC2x(including EC25, EC21, EC20 R2.0 and EC20 R2. 1) EG9x(including EG91 and EG95) EMO5 This chapter gives the data interaction mechanism of MQTT function MCU Modem Link layer MQTT Server (1)<typo>=0: Rcccivc ACK pac<cts from (2)-typcse1: Packct sending timout and AT+QMTCFG= will client idx AT+QMTOPEN=<clent idx>, <host name>.<porp> TCP-REo TCP SYN CP SYNACK TCP established TCP ACK *QMTOPEN: < ent ldx>, <result T2 is keep allv AT+QMTCONN-<client_idx>, "<cient D5, <option In the absence of a CONN-REQ oK ect packet Receive connect ACK packet +QMTCONN <client_idx resull?[ ret_code> CONN ACK IND AT+CMTSUB AT+QMTSUB-clicnt_idx, <megID SUB REQ(msgld) QMTSUB: tepid, 1,ImIs TCP connection Send subscribe packe Receive subscribe ACK packet I QMTSU3: <client_idx>, <msg D>, <result[, <value> AT+QMTUNS AT+QMTUNS=<clent _idx>,<msgID NS REQ(magid) +QMTUNS: tcpidx, 1, meld Send unsubscribe packet +QMTUNS: <clien. idx ims D>, result> NS ACK-IN) Slup T1 uxr france三scep2 所下+M、y+mFug: <client_ idx>,<msgID>, <qos> PUB-REO Send publish packet AT+QMTCFG PUB ATIQMTFUB-<cl ent_idx>, <msglD>, <qos>1, <ret PUB-REQ(msg Send publish packet K-IND(msgld Reeve publish AC K nacke +QMTPLB: client idx>, msgID>, 'esult, svalue?1 supT1 ur hardy exu吧pz AT+QMTPUB UB=<cl ent_Idx>, msgID>, <qos>=2. <ret qos>-4 an>“<opc +QMTPLB: tcpidx, 1, msgld PUB-REQ (msgld) Recele publish receive packet +GMTPUBREL:tcpidx,1,msgld PUB REL.REQ (msgld) SIaIT tme lease packet Rere ve pulis nmplete packeT PUB CONP-IND(msgld +CMTPUB: <client_id <msgIDs, <cgU, <values cet Receive R +QMTRECV: sclient idx>, <msglD:, topic>, <payload> PL. H-ND(magin publish packet ssage in the form of PUB ACK/REC-REQ(msgldf Send publish reply packet Reply accordin 905> AT IQMTDISC-cclient idx> CISC. REQ Serd disconnect packet CH +QMTDISC: <client idx> result> CP- REQ TCP disconnect request the descripton of carresponding AT +OPAI[I OSF:<client: Idx> <result> TCP disconnected command in Chapter 3.2 This chapter presents the at commands for operating mQtT function 3.1. AT Command Syntax This command returns the list of parameters and value ranges Test Command AT+<X>=? set by the corresponding Write Command or internal processes This command returns the currently set value of the parameter Read Command AT+<x>? or parameters Write Command AT+<x>=< . This command sets the user definable parameter values Execution This command reads non variable parameters affected by AT+<X> Command internal processes in the UE 3.2. Description of MQTT Related AT Commands 3.2.1. AT+QMTCFG Configure Optional Parameters of MQTT The command is used to configure optional parameters of MQTT AT+QMTCFG Configure Optional Parameters of MQTT Test Command Response AT+QMTCFG=? +QMTCFG: "version",(0 5), (3, 4) + QMTCFG:“ pepcid”,(05),(116) + QMTCFG:“ss|"、05),(0,1),(05) +QMTCFG: keepalive, (05),(0 3600) + QMTCFC:“ session”,05),(0,1) + QMTCFG:“ timeout”,(05),(160),(110),(0,1) +QMTCFG: will", (0 5), (0,1)0 2),(0,1),willtopic'", willmes ade + QMTCFG:“ recv//mode”,(05),(0,1),(0,1) + QMTCFG:" aliauth”,(05),“ productkey";“ devicename";de vicesecret OK Write Command If MQTT connection is not established, the response is Configure the MQTT protocol version OK AT+QMTCFG="version", <client_idx> Else the response is ERROR If <ysn> is query the MQTT protocol version Response + QMTCFG:“ version”,<vsn> OK If there is an error related to ME functionality +CME ERROR: <err> Write command If MQTT connection is not established, the response is Configure the PDP to be used by the OK MQTT client Else the response is client idx ERROR f≤>is query the pdp to be used by the MQTT client Response +QMTCFG: pdpcid'", <cid> OK If there is an error related to me functionality +CME ERROR: <err> Write Command If MQTT connection is not established the response is Configure Will information OK Else the response is ERROR If <will fg>, <will gos>, <will retain>, "<will topic>and <will msg> are omitted, query the Will information Response +QMTCFG: will", <will fg L <will_ gos>, <will retain>, "<will topic>”,"< will msg>”] OK If there is an error related to mE functionality + CME ERROR:≤err> Write Command If MQTT connection is not established, the response is Configure timeout of message delivery OK AT+QMTCFG="timeout", <client idx> Else the response is I<pkt_timeout>[ <retry_times>lL, <tim ERROR eout notice>] If <pkt timeout>, <retry times> and <timeout notice> are query the timeout of message delivery Response +QMTCFG:"timeout,, <pkt timeout>, <retry times>, timeo t notice> OK If there is an error related to me functionality +CME ERROR: <err> Rite command If MQTT connection is not established, the response is Configure the session type OK AT+QMTCFG=session", <client idx> Else the response is L<clean session>I ERROR If <clean session> is query the session type Response + QMTCFG:“ session”,< clean session> OK If there is an error related to me functionalit +CME ERROR: <err> Write Command If MQtT connection is not established the response is Configure the keep alive time OK AT+QMTCFG=keepalive",<client_id Else the response is x>L <keep alive time> ERROR If <keep alive time> is query the keep alive time Response +QMTCFG: "keepalive",<keep alive time> OK If there is an error related to mE functionality +CME ERROR: <err>

...展开详情
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
qq_38668761 感觉含金量不高呀
2019-07-12
回复
就是EC20 MQTT协议的文档,你是要一下测试步骤和流程吗?
ababacac 就是一个英文文档,我以为有测试步骤及说明,没啥意思。。
2019-03-13
回复
lw30402048 就是一个英文文档,我以为有测试步骤及说明,没啥意思。。。
2019-01-21
回复
  • 分享达人

    成功上传6个资源即可获取
关注 私信 TA的资源
上传资源赚积分or赚钱
最新推荐