BC660K-GL MQTTS Connection

Does anyone successfully connected BC660K-GL with MQTTS server? I was able to connect to an MQTTS connection with BC66. But with the same certificate and combining it with MQTT and SSL Application notes for BC660 is not working for BC660K-GL. The response i get after AT+QMTCONN=<TCP_connectID>,[,[,]] is +QMTSTAT: <TCP_connectID>,1
error code is 1 which means “Connection is closed or reset by its remote peer” as per MQTT Application note.

Thanks,
Amal Prakash

Could you show me your detailed AT process?

Following are the commands used with BC660

RDY

+CFUN: 1

+CPIN: READY

+IP: 2405:0203:40a4:19ba:0000:0000:fb48:990e
AT+QSCLK=0

OK
AT+QBAND?

+QBAND: 5

OK
AT+QSSLCFG=0,0,“seclevel”,1

OK
AT+QSSLCFG=0,0,“cacert”

-----BEGIN CERTIFICATE-----
…<actual_certificate>…
-----END CERTIFICATE-----

+QSSLCFG: 0,0,“cacert”,1756

OK
AT+QSCLK=1

OK
AT+QMTCFG=“ssl”,3,1,0,0

OK
AT+QMTCFG=“version”,3,1

OK
AT+QMTOPEN=3,“<target_host>”,1887

OK

+QMTOPEN: 3,-1

+QNBIOTEVENT: “ENTER DEEPSLEEP”

First, verify that your MQTT server is connected using MQtt.fx.

Second, you can turn off PSM mode and try again by executing the following instructions

The AT + QSSLCFG = 0, 0, “sslversion”, 4

I’ve verified the server with MQtt.fx software and it connects without any error. Also i’ve added the AT command you mensioned. But it shows the same error - +QMTOPEN: 3,-1

Can we do an example with the following test MQTT server with SSL?

If you can try this setup working with BC660, then i think that will be helpful ! Atleast for testing the SSL/MQTTS

@tabor.tang-Q , @herbert.pan-Q

I have connected it. The BC660K-GL works differently than the BC66. When you send a message. It expects a prompt, then send the message, but it looks like you are having problems with the certificate.

'qsslcfg=1,5,"cacert"',                 # Send a cert
'qsslcfg=1,5,"seclevel",1',             # Set security to client cert (1 server cert required)
'qmtcfg="ssl",0,1,1,5',                 # Turn on SSL
'qmtopen=0,"test.mosquitto.org",8883',  # Open the MQTT broker
'qmtconn=0,"{}"', 

I tested with the public Eclipse broker. and it worked on both.

Thanks @PeteD for the AT Commands.

I’ve also worked with BC66 with the above commands and i was able to connect to mqtts server and send messages. But now i upgraded to BC660K-GL and with the same procedure i did for BC66. but it fails on BC660K-GL

I have both the BC66 and the BC660K-GL. Try it with the mosquitto public broker and see if it works.

Hi @PeteD ,
I tried but failed. Could you please share the AT Commands you used for BC660K-GL for connecting to mosquitto?

PFA the log from EPAT

@tabor.tang-Q @herbert.pan-Q @Akshay_Mahajan

Please provide your detailed test commands and results, do not hide any information, I will perform the same verification

That is client specific information. I cannot share it publically. The system works the same as the publically available mqtt broker server broker.emqx.io. That is why i tried with this → Free Public MQTT Broker for IoT Testing | EMQ. There they have their specific certificates also.

i will upload its log also.

Quectel_映云EMQ平台MQTT对接指导参考.pdf (1.2 MB)

Please find the logs for emqx

From EPAT


From QCOM

Let me try your document also of EMQX Cloud

please save EPAT’s log,Send to me

Sure. i will send it now.

Plese check your inbox