Able to open network for MQTT client but connection of a client to MQTT server failing in MC60

Hi,

I am able to open network for MQTT but connection of a client to MQTT Server failing.

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,"8883"
\r\nOK\r\n
+QMTOPEN: 0,0\r\n

AT+QMTCONN=0,"alankrit"
OK
+QMTSTAT: 0,3
+QMTCONN: 0,2

Later when I came across a post that suggested to close the port and then open before trying for connection of a client.

Then on sending that command I am getting error.
"AT+QMTCLOSE=0\r\n"

\r\nERROR\r\n"

Can anyone suggest me what’s wrong happening ?

mqtt_conn

Hi,
Please verify that your server requires username and password or not? If needed, you need to write the user name and password when executing QMTCONN:
image
You also can verify the server is connected properly or not via the MQTT.fx tool.

Hi,

  1. I have verified my servers does not require ID or password.
  2. If I try writing dummy ID and Password in the code using QMTCONN it is not helping. As my servers don’t need it.

I tried simulating with MQTT.fx tool.

It is working with same certificates that I am using in my code on that tool. I am able to Publish and Subscribe using this tool.

I am storing certificates in RAM.

I am using Section 5.2 of this document.
Quectel_GSM_MQTT_Application_Note_V1.2.pdf (518.0 KB)

AT+QMTCONN is failing.

I am attaching the pics for better understanding.

Hi Alankrit
Can you please help to share the complete AT logs.

Hi,

I am using Firmware version MC60CAR01A13 on Quectel MC60.

Here, is the sequence of commands I am using.

I tried 2 sequence of commands:

CASE 1:

ATI

Quectel_Ltd

Quectel_MC60

Revision: MC60CAR01A13

OK

AT+QIMUX=1

OK

AT+QINDI=1

OK

AT+QSECWRITE=“RAM:ca_cert.pem”,1206,100

CONNECT

+QSECWRITE: 1206,7e53

OK

AT+QSECWRITE=“RAM:client_cert.pem”,1220,100

CONNECT

+QSECWRITE: 1220,2c19

OK

AT+QSECWRITE=“RAM:client_key.pem”,1675,100

CONNECT

+QSECWRITE: 1675,6f71

OK

AT+QIFGCNT=0

OK

AT+QICSGP=1,“airteliot.com

+QICSGP: 1

OK

AT+QIREGAPP

OK

AT+QIACT
OK

AT+QILOCIP

100.93.169.87

AT+QSSLCFG=“ignorertctime”,1

OK

AT+QSSLCFG=“sslversion”,0,4

OK

AT+QSSLCFG=“ciphersuite”,0,“0XFFFF”

OK

AT+QSSLCFG=“seclevel”,0,2

OK

AT+QSECREAD=“RAM:ca_cert.pem”

+QSECREAD: 1,7e53

OK

AT+QSECREAD=“RAM:client_cert.pem”

+QSECREAD: 1,2c19

OK

AT+QSECREAD=“RAM:client_key.pem”

+QSECREAD: 1,6f71

OK

AT+QSSLCFG=“cacert”,0,“RAM:ca_cert.pem”

OK

AT+QSSLCFG=“clientcert”,0,“RAM:client_cert.pem”

OK

AT+QSSLCFG=“clientkey”,0,“RAM:client_key.pem”

OK

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,“8883”

+QMTOPEN: 0,0

AT+QMTCONN=0,“alankrit”

+QMTSTAT: 0,3
+QMTCONN: 0,2

/===================================================================/

CASE 2:

ATI

Quectel_Ltd

Quectel_MC60

Revision: MC60CAR01A13

OK

AT+QIMUX=1

OK

AT+QINDI=1

OK

AT+QSECWRITE=“RAM:ca_cert.pem”,1206,100

CONNECT

+QSECWRITE: 1206,7e53

OK

AT+QSECWRITE=“RAM:client_cert.pem”,1220,100

CONNECT

+QSECWRITE: 1220,2c19

OK

AT+QSECWRITE=“RAM:client_key.pem”,1675,100

CONNECT

+QSECWRITE: 1675,6f71

OK

AT+QIFGCNT=0

OK

AT+QICSGP=1,“airteliot.com

+QICSGP: 1

OK

AT+QIREGAPP

OK

AT+QIACT
OK

AT+QILOCIP

100.93.169.87

AT+QSSLCFG=“ignorertctime”,1

OK

AT+QSSLCFG=“sslversion”,0,4

OK

AT+QSSLCFG=“ciphersuite”,0,“0XFFFF”

OK

AT+QSSLCFG=“seclevel”,0,2

OK

AT+QSECREAD=“RAM:ca_cert.pem”

+QSECREAD: 1,7e53

OK

AT+QSECREAD=“RAM:client_cert.pem”

+QSECREAD: 1,2c19

OK

AT+QSECREAD=“RAM:client_key.pem”

+QSECREAD: 1,6f71

OK

AT+QSSLCFG=“cacert”,0,“RAM:ca_cert.pem”

OK

AT+QSSLCFG=“clientcert”,0,“RAM:client_cert.pem”

OK

AT+QSSLCFG=“clientkey”,0,“RAM:client_key.pem”

OK

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,“8883”

+QMTOPEN: 0,0

AT+QMTCLOSE=0

+QMTCLOSE: 0,0

AT+QMTCONN=0,“alankrit”

+CME ERROR: 3518

/======================================================================/

Hi Alankrit
Add AT+QMTCFG=“SSL”,0,1,0 command to configure the SSL before AT+QMTOPEN and test it.

Hi,

ATI

Quectel_Ltd

Quectel_MC60

Revision: MC60CAR01A13

OK

AT+QIMUX=1

OK

AT+QINDI=1

OK

AT+QSECWRITE=“RAM:ca_cert.pem”,1206,100

CONNECT

+QSECWRITE: 1206,7e53

OK

AT+QSECWRITE=“RAM:client_cert.pem”,1220,100

CONNECT

+QSECWRITE: 1220,2c19

OK

AT+QSECWRITE=“RAM:client_key.pem”,1675,100

CONNECT

+QSECWRITE: 1675,6f71

OK

AT+QIFGCNT=0

OK

AT+QICSGP=1,“airteliot.com

+QICSGP: 1

OK

AT+QIREGAPP

OK

AT+QIACT
OK

AT+QILOCIP

100.93.169.87

AT+QSSLCFG=“ignorertctime”,1

OK

AT+QSSLCFG=“sslversion”,0,4

OK

AT+QSSLCFG=“ciphersuite”,0,“0XFFFF”

OK

AT+QSSLCFG=“seclevel”,0,2

OK

AT+QSECREAD=“RAM:ca_cert.pem”

+QSECREAD: 1,7e53

OK

AT+QSECREAD=“RAM:client_cert.pem”

+QSECREAD: 1,2c19

OK

AT+QSECREAD=“RAM:client_key.pem”

+QSECREAD: 1,6f71

OK

AT+QSSLCFG=“cacert”,0,“RAM:ca_cert.pem”

OK

AT+QSSLCFG=“clientcert”,0,“RAM:client_cert.pem”

OK

AT+QSSLCFG=“clientkey”,0,“RAM:client_key.pem”

OK

AT+QMTCFG=“SSL”,0,1,0
OK

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,“8883”

+QMTOPEN: 0,-1

I tried the command mentioned on the post but now even the network is not opening for the MQTT client.

Don’t understand what’s wrong with this

Try QCOM software to write the certificate and try.
you can downloads it from below link.
https://cnquectel-my.sharepoint.com/:u:/g/personal/india-fae_quectel_com/ETtAe9O5WTZCn0_qmqgJxMUBT1malui6PGT6QJa8F54BrA?e=e8bBv7

please follow below procedure.

if still getting error please write mail to support@quectel.com

Hi,

I tried sending AT COMMANDS using QCOM along with certificates but still the same error is coming.

I don’t understand why is that happening.

AT

OK

ATE1

OK

ATV1

OK

AT+CLIP=0

OK

AT+CNMI=0,0,0,0,0

OK

AT+CREG=0

OK

AT+CPIN?
+CPIN: READY
OK

AT+CREG?
+CREG: 0,1
OK

AT+CGEREP=0
OK

AT+CGREG=0
OK

AT+QCGTIND=0
OK

AT+QEXTUNSOL=“SQ”,0
OK

AT+QEXTUNSOL=“FN”,0
OK

AT+QEXTUNSOL=“BM”,0
OK

AT+QREFUSECS=1,1
OK

AT+QIMUX=1
OK

AT+QINDI=1
OK

AT+QSECWRITE=“RAM:ca_cert.pem”,1206,100

CONNECT
+QSECWRITE: 1206,7a44
OK

AT+QSECWRITE=“RAM:client_cert.pem”,1220,100
CONNECT
+QSECWRITE: 1220,2c3e
OK

AT+QSECWRITE=“RAM:client_key.pem”,1675,100
CONNECT
+QSECWRITE: 1675,4871
OK

AT+QIFGCNT=0
OK

AT+QICSGP=1,“airteliot.com
OK

AT+QIREGAPP
OK

AT+QIACT
OK

AT+QILOCIP
100.126.235.102

AT+QSSLCFG=“ignorertctime”,1
OK

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

AT+QSSLCFG=“ciphersuite”,0,“0XFFFF”
OK

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

AT+QSECREAD=“RAM:ca_cert.pem”
+QSECREAD: 1,7a44
OK

AT+QSECREAD=“RAM:client_cert.pem”
+QSECREAD: 1,2c3e
OK

AT+QSECREAD=“RAM:client_key.pem”
+QSECREAD: 1,4871
OK

AT+QSSLCFG=“cacert”,0,“RAM:ca_cert.pem”
OK

AT+QSSLCFG=“clientcert”,0,“RAM:client_cert.pem”
OK

AT+QSSLCFG=“clientkey”,0,“RAM:client_key.pem”
OK

AT+QMTCFG=“SSL”,0,1,0
OK

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,"8883"
OK
+QMTOPEN: 0,-1

I request you to support us to resolve the issue.

Thanks

hi
please write mail to support@quectel.com

hi @alankrit2197 i am facing same issue. you got what is issue with