logo资料库

BC26手把手阿里云物联网平台.pdf

第1页 / 共15页
第2页 / 共15页
第3页 / 共15页
第4页 / 共15页
第5页 / 共15页
第6页 / 共15页
第7页 / 共15页
第8页 / 共15页
资料共15页,剩余部分请下载后查看
1、 登录阿里云,没有账号的可以自己注册一个,免费的 2、 在产品栏搜索“物联网设备接入”,点击进入 3、 进入“管理控制台” 4、 “设备管理”→“产品”→“创建产品” 创思通信 csic.taobao.com
5、创建“高级版” 创思通信 csic.taobao.com
5、 添加设备 创思通信 csic.taobao.com
创思通信 csic.taobao.com
用三元组连接阿里云 AT+QMTCFG=“ALIAUTH”,[,“”,“”,“”] “ALIAUTH”:连接阿里云固定用“ALIAUTH” :MQTT socket identifier, 范围:0~5 “”,“”,“”为阿里云三元组 返回:“OK” 则正确 例子: AT+QMTCFG="ALIAUTH",0,"a1OnKJbarIJ","test001","cG1TFsiEmGwRkYfcQnRmYzpU NqES48cd" OK 创思通信 csic.taobao.com
AT+QMTOPEN=,“”, :MQTT socket identifier, 范围:0~5 “”:连接阿里云是为"iot-as-mqtt.cn-shanghai.aliyuncs.com" :端口号,1883 返回: OK +QMTOPEN: , Result of the command execution -1 Failed to open network 0 Opened network successfully 1 Wrong parameter 2 MQTT identifier is occupied 3 Failed to activate PDP 4 Failed to parse domain name 5 Network disconnection error 例子: AT+QMTOPEN=0,"iot-as-mqtt.cn-shanghai.aliyuncs.com",1883 OK +QMTOPEN: 0,0 AT+QMTCONN=,“”[,“”[,“”]] :MQTT socket identifier ,范围:0~5 “”:客户端设备 ID “”,“”在上面已设置,无需再设置 返回: 创思通信 csic.taobao.com
OK +QMTCONN: ,[,] Result of the command execution 0 Sent packet successfully and received ACK from server 1 Packet retransmission 2 Failed to send packet Connect return code 0 Connection Accepted 1 Connection Refused: Unacceptable Protocol Version 2 Connection Refused: Identifier Rejected 3 Connection Refused: Server Unavailable 4 Connection Refused: Bad User Name or Password 5 Connection Refused: Not Authorized 例子: AT+QMTCONN=0,"test001" OK +QMTCONN: 0,0,0 Publish Messages AT+QMTPUB AT+QMTPUB=? +QMTPUB: (0-5),,,,"","" OK 创思通信 csic.taobao.com
//订阅服务器主题 AT+QMTSUB=0,1,"/a1OnKJbarIJ/test002/user/get",0 OK +QMTSUB: 0,1,0,1 创思通信 csic.taobao.com
分享到:
收藏