0

I tried to connect the BG96 to the amazon server but, once the communication was open (AT + QMTOPEN = ... return + QMTOPEN: 1.0), if I try to connect with my object (AT + QMTCONN = 1, "thingname ") replies ok and + QMTSTAT: 1,1 (connection broken).

With other devices (raspberry pi or arduino) the connection happens without problems, so I would exclude server side configuration problems as for this topic: error when publish data to aws IoT using BG96 and MQTT protocol

Theese are the AT - commands:

AT+QSSLCFG="ciphersuite",1,0x0035
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="sslversion",1,4
OK
AT+QSSLCFG="seclevel",1,2
OK
AT+QSSLCFG="negotiatetime",1,300
OK
AT+QSSLCFG="ignorelocaltime",1,0
OK
AT+QICSGP=1,1,"wap.tim.it"
OK
AT+QICSGP=1
+QICSGP: 1,"wap.tim.it","","",1
OK
AT+QIACT?
+QIACT: 1,1,1,"***.**.**.***"
OK
AT+QMTOPEN=1,"**************.iot.us-east-2.amazonaws.com",8443
OK
+QMTOPEN: 1,0
AT+QMTCONN=1,"thingName"
OK
+QMTSTAT: 1,1

1 Answers1

0

I found the problem, this is the correct code to connect with MQTT and TLS the BG96 module to Amazon AWS:

AT+QICSGP=1,1,"Your APN"
OK
AT+QICSGP=1
+QICSGP: 1,"wap.tim.it","","",1
OK
AT+QIACT=1
OK
AT+QIACT?
+QIACT: 1,1,1,"***.***.***.***"
OK
AT+QMTCFG="SSL", 1, 1, 1
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="sslversion",1,4
OK
AT+QSSLCFG="seclevel",1,2
OK
AT+QSSLCFG="ciphersuite",1,0xFFFF
OK
AT+QSSLCFG="ignorelocaltime",1
+QSSLCFG: "ignorelocaltime",1,1
AT+QMTOPEN=1,"*********.iot.us-east-2.amazonaws.com",8883
OK
+QMTOPEN: 1,0
AT+QMTCONN=1,"YOUR_THING_NAME"
OK
+QMTCONN: 1,0,0
AT+QMTSUB=1,1,"YOUR_TOPIC",1
OK    
+QMTSUB: 1,1,0,1
AT+QMTPUBEX=1,1,1,0,"YOUR_TOPIC","TEXT_TO_PUBLISH"
OK
+QMTPUB: 1,1,0