MQTT +QMTOPEN: 0,-1 Error

Hi! I’m developing MQTT client by using BG95 module.
When I try connect MQTT broker, +QMTOPEN:0,-1 error occurs.
I send AT command by using Python and this script works well on AWS IoT.

I already serach +QMTOPEN related Topic in this forum and check downloaded certification filse and sizes are exactly same with original files. The MQTT server working well on MQTTX program with same certifications (CA or Self signed certificates). Thanks!

ATE0
<< OK
AT+CFUN=1
<< OK
AT+CREG?
<< +CREG: 0,0
<< OK
AT+CEREG?
<< +CEREG: 0,5
<< OK
AT+CGDCONT=1,“IP”,“iot.1nce.net
<< OK
AT+CGATT=1
<< OK
AT+QNWINFO
<< +QNWINFO: “eMTC”,“45006”,“LTE BAND 5”,2600
<< OK
AT+QIACT=1
<< ERROR
AT+QIACT?
<< +QIACT: 1,1,1,“10.248.112.85”
<< OK
Sending ‘ca.crt’ to BG95 as ‘UFS:ca.crt’ (1184 bytes)
AT+QFDEL=“UFS:ca.crt”
<< OK
AT+QFUPL=“UFS:ca.crt”,1184,5000
<< CONNECT
<< +QFUPL: 1184,300
<< OK
Sent file ca.crt to BG95 successfully.
Sending ‘client.crt’ to BG95 as ‘UFS:client.crt’ (1162 bytes)
AT+QFDEL=“UFS:client.crt”
<< OK
AT+QFUPL=“UFS:client.crt”,1162,5000
<< CONNECT
<< +QFUPL: 1162,177f
<< OK
Sent file client.crt to BG95 successfully.
Sending ‘client.key’ to BG95 as ‘UFS:client.key’ (1732 bytes)
AT+QFDEL=“UFS:client.key”
<< OK
AT+QFUPL=“UFS:client.key”,1732,5000
<< CONNECT
<< +QFUPL: 1732,7659
<< OK
Sent file client.key to BG95 successfully.
AT+QMTCFG=“ssl”,0,1,2
<< OK
AT+QMTCFG=“version”,0,4
<< OK
AT+QSSLCFG=“cacert”,2,“UFS:ca.crt”
<< OK
AT+QSSLCFG=“clientcert”,2,“UFS:client.crt”
<< OK
AT+QSSLCFG=“clientkey”,2,“UFS:client.key”
<< OK
AT+QSSLCFG=“seclevel”,2,2
<< OK
AT+QSSLCFG=“sslversion”,2,4
<< OK
AT+QMTOPEN=0,“my mqtt address”,8883
<< OK
<< +QMTOPEN: 0,-1

pls add a at command and try again

AT+QSSLCFG=“sni”,1,2

Thanks for your advice.
I apply sni with 2,0 or 2,1, the result is always same. I will adjust another SSL related parameters.

AT+QMTCFG=“ssl”,0,1,2
<< OK
AT+QMTCFG=“version”,0,3
<< OK
AT+QSSLCFG=“cacert”,2,“UFS:ca.crt”
<< OK
AT+QSSLCFG=“clientcert”,2,“UFS:client.crt”
<< OK
AT+QSSLCFG=“clientkey”,2,“UFS:client.key”
<< OK
AT+QSSLCFG=“seclevel”,2,2
<< OK
AT+QSSLCFG=“sslversion”,2,3
<< OK
AT+QSSLCFG=“sni”,2,1
<< OK
AT+QSSLCFG=“checkhost”,2,1
<< OK
AT+QMTOPEN=0,“my mqtt address”,7008
<< OK
<< +QMTOPEN: 0,-1
AT+QMTCONN=0,“000003”
<< ERROR
MQTT Connection Failed
MQTT Connection or publish failed

Please use MQTTX or mqtt.fx to verify your CA certificate first.

I alreay use MQTTX and there are no problem in CA certification. Thanks for your comment.

Please provide your current firmware version. I plan to send you the latest version to try.

ATI

I really appreciate your help. My F/W is as follow.

BG95M3LAR02A04_01.001.01.001

It is really too old. I have sent the latest firmware version and upgrade tools. Please check them out.

Thanks a lot,

I have tested new firmware but test result was same. +QMTOPEN : 0, -1 error is same.
When I connect to AWS MQTT, it works well. But I try to connect Synology MQTT, it did not work.
If I did not use SSL, it was well connected to Synology. So, I think that there are some problem on CA certification compatibility.

Any way, thanks for your help and wish you have happy new year!