Problem with MQTT AT commands on MC60

We are having troubles using the MQTT AT commands on MC60.module replies for all commands such as AT+QMTCFG=keepalive,version,ssl,timeout.But it always returns simply error without any errror code for AT+QMTOPEN=1,“m16.cloudmqtt.com”,13537

Dear Naveen Subramani,
Thanks for your inquiry in Quectel forums. Normally, it will return the following information if open MQTT successful, even it have any error, it also will return the error code. Thanks!
image
And please make sure you have wait enough time, and the maximum response time of this command is about 75s. Please doubke check it. Thanks!

This is the error,i always got.

<-- GSM Network Status:2 -->
<-- GPRS Network Status:0 -->
<-- CFUN Status:1 -->
<-- SIM Card Status:1 -->
<-- GPRS Network Status:2 -->
<-- Sys Init Status 2 -->
<-- Sys Init Status 3 -->
<-- GSM Network Status:1 -->
<-- GPRS Network Status:1 -->
AT

OK
AT+QMTCFG=“WILL”,2,0,0,0,“HI”,“JH”

OK
AT+QMTCFG=“TIMEOUT”,2,10,5

OK
AT+QMTCFG=“SESSION”,2,0

OK
AT+QMTCFG=“KEEPALIVE”,2,120

OK
AT+QMTCFG=“VERSION”,2,1

OK
AT+QMTOPEN=2,“159.65.152.75”,1883

ERROR

Dear Naveen Subramani,
If your MQTT server do not need SSL, it is better to refer to the example to test it, just confirm whether it is the reason of the parameter setting or the network. Thanks!

This command also not working.
OpenCPU: Customer Application
<-- RIL is ready -->
<-- GSM Network Status:2 -->
<-- GPRS Network Status:0 -->
<-- CFUN Status:1 -->
<-- SIM Card Status:1 -->
<-- GPRS Network Status:2 -->
<-- Sys Init Status 2 -->
<-- Sys Init Status 3 -->
<-- GSM Network Status:1 -->
<-- GPRS Network Status:1 -->
AT+QMTCFG=“ALIAUTH”,0,“oyjtmPl5a5j”,“MQTT_TEST”,“wN9Y6pZSIIy7Exa5qVzcmigEGO4kAaz Z”

OK
AT+QMTOPEN=0,“iot-as-mqtt.cn-shanghai.aliyuncs.com”,1883

ERROR
AT+QMTOPEN?

OK

1 Like

Dear Navee,
The example i send to you is just for your reference, you should change the matched parameters with your MQTT server, cannot just copy the parameters in the example. Thanks!

Sir,But we dont have an acount in ALI CLOUD services, Before one week i bought this module,First time the MQTT was worked very well using these AT commands,Next day itself stucked with this error.I have two development kits but this error occurs in all kits.

Dear Naveen Subramani,
It is no need must to use ALI Cloud service, you can use your own MQTT server to test. It is just an example. Thanks!
From your describption, it is better to check whether the SIM card is normal, or your test server is normal. Thanks!

Dear Kyson,
The simcard status is 1 and i also change many simcards,Our test server is also normal. The signal range is 22,0.But still now i cant open mqtt connection.Thanks!

1 Like

Dear Naveen Subramani,
If everything is normal, it is really very strange that it will have issue. It is better to check what changes you have done, what parameters you have setting ? If your test server do not use SSL, it is better do not set much parameters, just follow up the examples to set the needed command; if your server use SSL, it is better to upload the certifictae file to module before you set the MQTT related parameters. Thanks!
By the way, you also can reflash the firmware of the module to test again which can erasure the orevious setting. Thanks!
If it is still have the issue, please contact our local FAE to get support on site, or you can send email to support@quectel.com. It may need to catch debug log to analyze the reason. Thanks!

Dear Kyson,
Can i Know how to reflash the firmware of mc60.Some times I got this error
Other URC: type=101

Dear Naveen Subramani,
If you want to reflash the firmware, please tell me the current firmware version that you used, then i can provide you the matched latest firmware and upgrade tool. Thanks!
Of course, you can contact our local FAE to get support or send email to support@quectel.com. Thanks!

Dear Kyson,
Yesterday I upgraded the firmware successsfully,I successfully working in MQTT using AT commands,But i need to develop my application in opencpu,when i working in opencpu again it leads to error during AT+QMTOPEN.The publish subscribe is occurs in normal AT command method.

Dear Naveen Subramani,
If that, it is better to check your code to confirm whether there have any issue. Thanks!
And you can contact our local FAE to support you on site, this issue may need to check the code and catch debug log. Thanks!
By the way, you also can send email to suppport@quectel.com to get local support.Thanks!

Dear sir,
I am also facing the issue with QMTCFG command configuration.
AT+QMTCFG=“ALIAUTH”,0,“oyjtmPl5a5j”,“MQTT_TEST”,“wN9Y6pZSIIy7Exa5qVzcmigEGO4kAazZ”
what is ALIAUTH?
what is 0 ?
what is oyjtmPl5a5j?
what is MQTT_TEST?
wht is wN9Y6pZSIIy7Exa5qVzcmigEGO4kAazZ ?
and how to replace the bove arguments with my cloudmqtt server?

I am using cloud mqtt server which is open source or free version!
from that cloudmqtt I have got the server ip,user, password,port, ssl port ,web socket port.

now please help me to configure the parameters for AT+QMTCFG …?

to connect cloud mqtt what type I need to select from the below :
WILL”
“TIMEOUT”
“SESSION”
“KEEPALIVE”
“SSL”
“ALIAUTH”

Thank you !

Dear Ramesh Noothi,
For your issue, it is better to check the following MQTT application note which already introduce what is the meaning of the parameters used in command AT+QMTCFG, please check it. Thanks!
Quectel_GSM_MQTT_Application_Note_V1.2.pdf (518.0 KB)
And there are also have the example of MQTT connection with or without SSL, please check the example. You can get the answer from the document. Thanks!

Hi sir,
Thank you for your quick response . I had checked the application note and under stood the parameters and bases on the application note I have created commands as per my knowledge
as below:
AT+QMTCFG =“WILL”,0,0,1,“test”,“HI”
AT+QMTCFG=“TIMEOUT”,0,10,5,0
AT+QMTCFG=“SESSION”,0,1
AT+QMTCFG=“KEEPALIVE”,0,120
AT+QMTCFG=“VERSION”,0,1
AT+QMTCFG=“SSL”,0,0,0
AT+QMTCFG=“ALIAUTH”,0,“password”,“username”,“wN9Y6pZSIIy7Exa5qVzcmigEGO4kAazZ”
AT+QMTOPEN=0,“xxx.cloudmqtt.com”,xxxxx
AT+QMTCONN = 0,“test”,“username”,“password”
AT+QMTSUB=0,1,“topic/example”,0
AT+QMTSUB=0,1,“topic/pub”,0
AT+QMTPUB=0,1,0,0,“topic/pub”
This is test data, hello MQTT. CTRL+Z
AT+QMTDISC=0

Note: connection id is :0, SSL is disabled,device secret is anything correct ?

I am bit confusing with the config type "“aliauth”
AT+QMTCFG=“ALIAUTH”,0,“password”,“username”,“wN9Y6pZSIIy7Exa5qVzcmigEGO4kAazZ”
should i use same as above or any thing i need to change please help me.

thank you.

Hi sir,
In my case I had a cloud mqtt server which is free server to test.
from that free server i had

server xxx.xxxxxxx.com
User xxxxxxxxx
Password xxxxxxxxxx
Port xxxx
SSL Port xxxxx
Websockets Port (TLS only) xxxxx

but <product_key> Product key obtained from Ali cloud
<device_name> Device name obtained from Ali cloud
<device_secret> Device secret obtained from Ali cloud

is product key is nothing but password?
is device name is nothing but username?
device_secret - i dont have this from cloud mqtt !

I think you understood my problem clearly.Please give some deep solution !

Thank you.
Ramesh Noothi.

Dear Ramesh Noothi,
Please check the following example about MQTT with and without SSL. Hopefully it is useful to you. Thanks!
GSM MQTT AT Logs.pdf (51.5 KB)


Please note that Ali cloud is just an example, you do not need to use it. It is just for your reference. Thanks!

hi , i’m facing the same issue.
i’m successfully getting ok response for AT command other than AT+QMTCFG, but when iam trying to do the same using RIL , it is giving “ERROR” response even for AT+QMTOPEN. did you solved your issue. if yes plz guide me.

any help would be appreciated,
Thank you