+ QMTCONN: 0,2, + QMTSTAT: 0,1, + QMTSTAT: 0,3, etc. when using the MQTT

Hi
Thank you for your support!
Yes, I established immediately after AT+QMTOPEN ,& issue resolved.But when I check AT+QMTCONN? command ,it gives +CME :ERROR .Please suggest what should be the reason?

Thank you in advance!

Hi Sana
The maximum response time of “AT+QMTCONN?” command is 10s. No command can be executed during the period of no response, otherwise an error will occur。

Hi Abner
Yes ,I wait for atleast 10sec after sending AT+QMTCONN? & meanwhile no other command is executing, still error is coming .I am sending command using Arduino Mega UART to M95 GSM UART.

Thank you in advance!

Hi Sana
First AT+QMTCONN=,""[,""[,""]] and then query.

Hi Abner
Issue solved. Another issue coming ,after AT+QMTCONN? command ,I send AT+QMTPUB=0,1,1,1,“topic”,size,
& immediately send data ,but it gives error +CME:ERROR.Don’t know what is the issue.
Please give me suggestions.
Thank you in advance!

Hi Sana
image
No size
Or confirm whether the TOPIC and device are created on the server.

Hi Abner
Yes, I wrote AT+QMTCONN=0,"","","" & then sent query command.
After this I sent publish command AT+QMTPUB=0,1,1,1,“topic_name” & along with data ,But error is coming. And on server side no topic is created.

Thank you in advance!

Hi Abner,
Please provide me one demo example of MQTT commands sending using UART .
I am unable to publish data to mqtt server using AT commands.
Thank you in advance!

Hi Sana
The TOPIC needs to be created on the MQTT server before the module can send data on the corresponding TOPIC.
Please find the local FAE consulting guidance document.

Hi Abner
I created topic on the Mqtt server,(Uses Mqtt Fx),but when I publish data error coming. On MqttFx data not coming. Please do the needful!

Thank you in advance!

Hi Sana
//Confirm successful network registration
AT+CEREG?
//Open a network for MQTT client.
AT+QMTOPEN=0, “MQTT server address”,1883
OK
+QMTOPEN: 0,0 //Opened the MQTT client network successfully.

//Connect a client to MQTT server.
AT+QMTCONN=0,“clientExample”,“username”,“password”
OK
+QMTCONN: 0,0,0 //Connected the client to MQTT server successfully.

//Subscribe to topics.
AT+QMTSUB=0,1,“topic/example”,2
OK
+QMTSUB: 0,1,0,2

//If a client subscribes to a topic and other devices publish the same topic to the server, the module will
report the following information.
+QMTRECV: 0,0, “topic/example”, “This is the payload related to topic”

//Publish messages.
AT+QMTPUB=0,0,0,0,“topic/pub”

This is test data, hello MQTT. //After receiving „>‟, input data “This is test data, hello MQTT.” and
send it. The maximum length of the data is 1548 bytes and the data
that beyond 1548 bytes will be omitted. After inputting data, tap
“Ctrl+Z” to send.
OK
+QMTPUB: 0,0,0

Hi Abner
Issue resolved.
Thank you for your support!

Hi Sana
OK
If you need relevant information, you can find our local FAE engineer.

Hi Abner
Another issue coming,when I published data with message id 1,i’m getting it’s response with message id 0.
I subscibed to topic with message id 1 ,but i’m getting response with message id zero. What should be the issue here?

Thank you in advance!

Hi Sana
Please confirm whether message id 1 supports publish and subscribe.

Hi @Abner-Q
Thanks for you support!
I have another query ,can we send file(.csv)to mqtt server through M95 gsm. How to do that, if you have one example please provide it.
Thank you in advance!

Hi @Abner-Q
And how to restart M95 GSM using AT+QPOWD=1 command?
I entered command but response coming through M95 GSM.

Thanks in advance!

Hi Sana
There are routines in the Quectel_M95_MQTT_Application_Note_V1.0 document to upload files to the MQTT server.

Thank you for your reply!
I will check in application note & if any issue will let you know.

Thank you!

hi, what is the reason of
+CME ERROR: MQTT link error
+QMTSTAT: 0,6
in this case? can it be for ssl problem?

[2021-11-13 12:34:43:081_S:] AT+CPIN?
[2021-11-13 12:34:43:147_R:] AT+CPIN?
[2021-11-13 12:34:43:147_R:] +CPIN: READY

[2021-11-13 12:34:43:147_R:] OK
[2021-11-13 12:34:43:162_S:] AT+CREG?
[2021-11-13 12:34:43:272_R:] AT+CREG?
[2021-11-13 12:34:43:272_R:] +CREG: 0,1

[2021-11-13 12:34:43:272_R:] OK
[2021-11-13 12:34:43:287_S:] AT+CGREG?
[2021-11-13 12:34:43:397_R:] AT+CGREG?
[2021-11-13 12:34:43:397_R:] +CGREG: 0,1

[2021-11-13 12:34:43:397_R:] OK

[2021-11-13 12:34:43:412_S:] AT+QIMODE=0
[2021-11-13 12:34:43:522_R:] AT+QIMODE=0
[2021-11-13 12:34:43:522_R:] OK

[2021-11-13 12:34:43:535_S:] AT+QICSGP=1,“mtnirancell”
[2021-11-13 12:34:43:642_R:] AT+QICSGP=1,“mtnirancell”
[2021-11-13 12:34:43:642_R:] OK

[2021-11-13 12:34:43:658_S:] AT+QIREGAPP
[2021-11-13 12:34:43:765_R:] AT+QIREGAPP
[2021-11-13 12:34:43:765_R:] OK

[2021-11-13 12:34:43:782_S:] AT+QICSGP?
[2021-11-13 12:34:43:892_R:] AT+QICSGP?
[2021-11-13 12:34:43:892_R:] +QICSGP: 1

[2021-11-13 12:34:43:892_R:] OK

[2021-11-13 12:34:43:911_S:] AT+QIACT
[2021-11-13 12:34:44:014_R:] AT+QIACT
[2021-11-13 12:34:44:497_R:] OK

[2021-11-13 12:34:44:515_S:] AT+QILOCIP
[2021-11-13 12:34:44:591_R:] AT+QILOCIP
[2021-11-13 12:34:44:591_R:] 21.46.32.60
[2021-11-13 12:35:00:122_S:] AT+QMTCFG=“SSL”,0,1,2
[2021-11-13 12:35:00:190_R:] AT+QMTCFG=“SSL”,0,1,2
[2021-11-13 12:35:00:190_R:] OK
[2021-11-13 12:35:52:927_S:] AT+QSSLCFG=“seclevel”,1,2
[2021-11-13 12:35:52:998_R:] AT+QSSLCFG=“seclevel”,1,2
[2021-11-13 12:35:52:998_R:] OK
[2021-11-13 12:36:03:998_S:] AT+QSSLCFG=“sslversion”,2,4
[2021-11-13 12:36:04:084_R:] AT+QSSLCFG=“sslversion”,2,4
[2021-11-13 12:36:04:084_R:] OK
[2021-11-13 12:36:12:953_S:] AT+QSSLCFG=“ciphersuite”,2,“0xFFFF”
[2021-11-13 12:36:13:012_R:] AT+QSSLCFG=“ciphersuite”,2,“0xFFFF”
[2021-11-13 12:36:13:012_R:] OK
[2021-11-13 12:36:25:421_S:] AT+Qsslcfg=“ignorertctime”,1
[2021-11-13 12:36:25:495_R:] AT+Qsslcfg=“ignorertctime”,1
[2021-11-13 12:36:25:495_R:] OK
[2021-11-13 12:37:09:265_S:] AT+QMTOPEN=0,“d6b1e9968db74[…].s2.eu.hivemq.cloud”,“8883”
[2021-11-13 12:37:09:359_R:] AT+QMTOPEN=0,“d6b1e9968db74[…].s2.eu.hivemq.cloud”,“8883”
[2021-11-13 12:37:09:359_R:] OK
[2021-11-13 12:37:10:015_S:] AT+QMTCONN=0,“mc60s…”,"[username]","[pass]"
[2021-11-13 12:37:10:086_R:] AT+QMTCONN=0,“mc60s…”,"[username]","[pass]"
[2021-11-13 12:37:10:086_R:] +CME ERROR: invalid parameter
[2021-11-13 12:37:10:995_S:] AT+QMTCONN=0,“mc60s…”,"[username]","[pass]"
[2021-11-13 12:37:11:087_R:] AT+QMTCONN=0,“mc60s…”,"[username]","[pass]"
[2021-11-13 12:37:11:087_R:] +CME ERROR: MQTT link error

[2021-11-13 12:37:11:087_R:] +QMTSTAT: 0,6