1

我正在尝试使用 BG96(使用 AT 命令的 NB-IoT 设备)将我的数据发布到 Amazon Web 服务 我正在关注官方文档(Quectel)所以我配置 SSL 参数(使用命令:at+ qsslcfg=... )并成功启动MQTT SSL连接(AT+QMTOPEN=...)但是当我尝试连接到MQTT服务器(AT+QMTCONN=...)时,连接立即关闭请帮助,我该如何解决这个问题和将我的数据发布到亚马逊网络服务?

AT+QSSLCFG="ciphersuite",1,0x0035
OK
AT+QSSLCFG="sslversion",1,3
OK
AT+QSSLCFG="cacert",1,"ufs:cacert.pem"
OK
AT+QSSLCFG="clientcert",1,"ufs:clientcert.pem"
OK
AT+QSSLCFG="clientkey",1,"ufs:clientkey.pem"
OK
AT+QSSLCFG="seclevel",1,2
OK
AT+QSSLCFG="negotiatetime",1,300
OK
AT+QSSLCFG="ignorelocaltime",1,0
OK
//Configure MQTT session into SSL mode. 
AT+QMTCFG=”SSL”, 0, 1, 1
//Start MQTT SSL connection 
AT+QMTOPEN=0, "a2xxxxxxxxxzxx.iot.us-east-1.amazonaws.com",”8883”
OK // ok 
+QMTOPEN: 0,0 // means the connction is starts succsesfully 
//Connect to MQTT server
AT+QMTCONN=0,"bg96"
ok
+QMTSTAT 0,1 //but this message means that the connection is closed 
4

2 回答 2

0

I find the solution , My problem is that I should create a policy to allow connection to aws and attach this policy to the thing that I create , If nb-iot is used then we shoud configure the DNS address to Google public DNS : 8.8.8.8 and 8.8.4.4 And of course issue all commands attentively to update certificates , configure ssl context , activate tcp context and finally open mqtt connection and connect to publish or subscribe to topic

于 2019-04-20T22:24:55.593 回答
0

我在 BG96 上遇到了同样的问题,端口 8883 上的 MQTTS。根据 AT MQTT 手册,我使用此调制解调器的解决方案是强制 MQTT 版本为“v4”。因此,在您的 AT+QMTCFG="SSL", 0, 1, 1 之后,尝试使用 AT+QMTCFG="version",0,4,然后打开连接并进行身份验证。

于 2019-04-19T12:35:34.943 回答