Quectel M95 MQTT Command not working

Dear All,

i’m working on the M95 Quectel GSM Modem to archive the our goal, well i have to send a data via mqtt from the m95 device. i found list of the AT command for the MQTT but it’s seem it’s not working with the M95 device,

Please do need full.

Thank you

Dear Ketan,
Thanks for your inquiry in Quectel forum.
Please check the firmware you used now(with ATI command to check it), then we can confirm whether it can support MQTT function. As you know that the old firmware can not support MQTT function. Thanks!

Dear sir,

i try with ATI Command and i got a below response.

Quectel_Ltd<\r>
<\n>Quectel_M95<\r>
<\n>Revision: M95FAR02A02<\r>
<\n><\r>
<\n>OK<\r>

Dear Ketan,
Thanks for your information. The firmware you uesd is too old, you need to upgrade the module firmware. Thanks!
You can send email to support@quectel.com to ask for the latest firmware and upgrade tool of M95 module. Thanks!

Dear Sir,

i’ll do that.

Dear Sir,

framework update has been done now MQTT Config command is fine. but i don’t the flow of the MQTT Initialization , i went to the Document but it’s seem not working …
please do needful.

Dear Sir,
About MQTT, please check the following document of MQTT application note, whichl already have the example to guide you how to test it, please check.Thanks!
Quectel_GSM_MQTT_Application_Note_V1.2.pdf (518.0 KB)

The following is the real test log, you also cna check it. Thanks!
GSM MQTT AT Logs.pdf (51.5 KB)

Dear Sir,

I have been checked the Application notes many time. but i’m getting always same response while connection to mqtt broker please do needful at least C Tested Code.

please have a look my test code .

If it is possible to reply back ASAP please reach me out on my email. ketan@wimerasys.com

RDY

+CFUN: 1

+CPIN: READY

Call Ready
AT

OK
AT+QIMODE=0

OK
AT+QICSGP=1,“IDEA”

OK
AT+QIREGAPP

OK
AT+QICSGP?

+QICSGP: 1

OK
AT+QIACT

OK
AT+QMTOPEN=0,“13.253.15.170”,1883

OK

+QMTOPEN: 0,-1

Dear Ketan,
Thanks for your information.
Please check your test code, after you active the context, whether you have check it have obtain the IP address or not ? The error code “-1” means that failed to open network, so it is better to check whether it have obtain the IP address or not. Thanks!
By the way, it is better to check your MQTT server is normal now. Thanks!
image

I trying to connect to broker.hivemq.com but I got also +QMTOPEN: 0,-1

00> 51.023: =========OPEN MQTT BROKER CONNECTION==========
00> 51.024: modem send: AT+QMTOPEN=0,"broker.hivemq.com",1883
00> 
00> 51.080: open response: 
00> OK
00> 
00> 52.173: open response: 
00> +QMTOPEN: 0,-1

answer from ATI

00> Quectel_Ltd
00> Quectel_M95
00> Revision: M95FAR02A08
00> 
00> OK

I got an IP

00> 49.505: modem send: AT+QILOCIP
00> 51.021: LOCAL IP : 
00> 100.114.216.43

I followed this document. https://github.com/bacnh85/Quectel-AT-Examples/blob/master/2G%20IoT%20Module/GSM%20MQTT%20AT%20Logs.md

I could connected to that broker from my laptop using java, c++ and nj. Also from an iPhone and Androids client apps. In both cases using my data plan and wifi.

Thanks

Dear Daleonpz,
It is better to provide your whole test AT log, just form the error code, we only know that it failed to open network. We need to check whether there have any error parameters setting. Thanks!
By the way, if it is the first to create a new topic for you, it is better to create another new topic. Thanks!

Here’s the full log

00> 0.074:  =======POWER UP MODEM=======
00> 0.075: modem power up, start DC-DC
00> 0.076: DC-DC signals power good
00> 1.123: modem signals power up status
00> 1.124: released PWRKey
00> 1.131: led blink red long
00> 1.144: startup done
00> 1.146: modem send: AT
00> 1.648: modem response timeout
00> 1.650: modem send: AT
00> 2.162: modem response timeout
00> 2.163: modem send: AT
00> 2.674: modem response timeout
00> 2.675: modem send: AT
00> 3.185: modem response timeout
00> 3.187: modem send: AT

00> 3.206: modem send: ATI
00> 3.280: ATI response ATI
00> Quectel_Ltd
00> Quectel_M95
00> Revision: M95FAR02A08
00> OK
00> 3.282: modem responded to first AT

00> 3.283:  =======CONFIGURING MODEM=======
00> 3.284: modem send: ATE0
00> 3.307: ATE0 Response ATE0
00> OK
00> 3.309: 
00> 4.019: AT+CFUN: 

00> 29.358: AT+QOPS: 
00> Call Ready
00> +QOPS: 1,"Telekom Deutschland GmbH","TDG","26201"
00> 1,972D,0592,17,19,57
00> 2,972D,F336,15,9,118
00> 3,972D,5344,0F,6,61
00> 4,972D,DE21,3E,5,64
00> 5,972D,1749,14,4,74
00> 6,972D,4C93,13,4,123
00> 7,972D,275B,0F,3,116

00> +QOPS: 1,"Vodafone","Vodafone","26202"
00> 1,10AC,1DBB,1C,24,6
00> 2,10AC,1DC6,1E,15,44
00> 3,10AC,1DBC,31,11,2
00> 4,10AC,5265,37,13,42
00> 5,10AC,0AE8,34,10,45
00> 6,10AC,525B,2A,11,48

00> +QOPS: 1,"E-Plus","E-Plus","26203"
00> 1,8CDC,6724,3E,24,983
00> 2,8CDD,5980,18,21,669
00> 3,8CDC,5793,1E,22,755
00> 4,8CDC,678D,3E,16,988
00> 5,8CDC,678B,3B,15,668
00> 6,8CDD,0B60,3A,18,753
00> 7,8CDC,1904,3A,15,1000
00> 8,8CDD,096E,38,13,977
00> 9,8CDD,B506,1C,9,985
00> 10,8CDC,B544,3B,11,1018
00> OK

00> 29.364: parsing qops......
00> 29.618: found 30 lines and 3 carriers
00> 29.620: parsing carrier 0
00> 29.621: found mncmcc: 26201
00> 29.622: found cell   id:1426, lac:38701,mnc:1,mcc:262,rx:19
00> 29.625: found cell   id:62262, lac:38701,mnc:1,mcc:262,rx:9
00> 29.627: found cell   id:21316, lac:38701,mnc:1,mcc:262,rx:6
00> 29.629: found cell   id:56865, lac:38701,mnc:1,mcc:262,rx:5
00> 29.632: found cell   id:5961, lac:38701,mnc:1,mcc:262,rx:4
00> 29.634: found cell   id:19603, lac:38701,mnc:1,mcc:262,rx:4
00> 29.637: found cell   id:10075, lac:38701,mnc:1,mcc:262,rx:3
00> 29.639: parsing carrier 1
00> 29.640: found mncmcc: 26202
00> 29.641: found cell   id:7611, lac:4268,mnc:2,mcc:262,rx:24
00> 29.644: found cell   id:7622, lac:4268,mnc:2,mcc:262,rx:15
00> 29.646: found cell   id:7612, lac:4268,mnc:2,mcc:262,rx:11
00> 29.648: found cell   id:21093, lac:4268,mnc:2,mcc:262,rx:13
00> 29.651: found cell   id:2792, lac:4268,mnc:2,mcc:262,rx:10
00> 29.653: found cell   id:21083, lac:4268,mnc:2,mcc:262,rx:11
00> 29.656: parsing carrier 2
00> 29.657: found mncmcc: 26203
00> 29.658: found cell   id:26404, lac:36060,mnc:3,mcc:262,rx:24
00> 29.660: found cell   id:22912, lac:36061,mnc:3,mcc:262,rx:21
00> 29.663: found cell   id:22419, lac:36060,mnc:3,mcc:262,rx:22
00> 29.665: found cell   id:26509, lac:36060,mnc:3,mcc:262,rx:16
00> 29.668: found cell   id:26507, lac:36060,mnc:3,mcc:262,rx:15
00> 29.670: found cell   id:2912, lac:36061,mnc:3,mcc:262,rx:18
00> 29.673: found cell   id:6404, lac:36060,mnc:3,mcc:262,rx:15
00> 29.675: found cell   id:2414, lac:36061,mnc:3,mcc:262,rx:13
00> 29.677: found cell   id:46342, lac:36061,mnc:3,mcc:262,rx:9
00> 29.680: found cell   id:46404, lac:36060,mnc:3,mcc:262,rx:11
00> 29.683: took cells: 6 4 5

00> 29.684: ========INSTALLING CERTIFICATES==========
00> 29.685: modem send: AT+QMTCFG="SSL",0,1,2
00> 29.723: AT+QMTCFG: 
00> OK
00> 29.724: modem send: AT+QSECWRITE="RAM:ca_cert.pem",1908,100
00> 29.787: AT+QSECWRITE: 
00> CONNECT
00> 29.788: modem send: -----BEGIN CERTIFICATE-----
// Certificate Here
0> -----END CERTIFICATE-----
00> 31.830: done CA: 
00> +QSECWRITE: 1908,147c
00> OK
00> 31.832: modem send: AT+QSECREAD="RAM:ca_cert.pem"
00> 31.902: CHECKSUM of CERT 
00> +QSECREAD: 1,147c
00> OK

00> 31.903: ========CONFIGURING SSL========
00> 31.905: modem send: AT+QSSLCFG="cacert",1,"RAM:ca_cert.pem"
00> 31.961: QSSLCFG cacert path: 
00> OK
00> 31.962: modem send: AT+QSSLCFG="seclevel",1,2
00> 32.004: QSSLCFG seclevel: 
00> OK
00> 32.005: modem send: AT+QSSLCFG="sslversion",1,4
00> 32.048: QSSLCFG sslversion: 
00> OK
00> 32.049: modem send: AT+QSSLCFG="ciphersuite",1,"0XFFFF"
00> 32.101: QSSLCFG ciphersuit: 
00> OK
00> 32.102: modem send: AT+QSSLCFG="ignorertctime",1
00> 32.147: QSSLCFG ignoretime: 
00> OK

00> 32.149: ========NETWORK REGISTRATION========
00> 32.150: modem send: AT+CREG?
00> 33.181: cereg status: 
00> +CREG: 0,2
00> 60.052: ========NETWORK REGISTRATION========
00> 60.053: modem send: AT+CREG?
00> 60.085: cereg status: 
00> +CREG: 0,5

00> 60.087: ========CONNECTING TO APN=========
00> 60.088: modem send: AT+COPS?
00> 60.136: connected: 
00> +COPS: 0,0,"E-Plus"
00> OK
00> 60.138: modem send: AT+CSQ
00> 60.175: connected: 
00> +CSQ: 11,0
00> OK
00> 60.176: modem send: AT+QIMODE=0
00> 60.203: QIMODE = : 
00> OK
00> 60.204: modem send: AT+QICSGP=1,"iot.1nce.net"
00> 60.252: set APN: 
00> OK
00> 60.253: modem send: AT+QIREGAPP
00> 60.280: QIREGAPP: 
00> OK
00> 60.281: modem send: AT+QICSGP?
00> 60.321: CONNECTING MODE : 
00> +QICSGP: 1
00> OK
00> 60.323: modem send: AT+QIACT
00> 63.437: QIACT: 
00> OK
00> 63.439: modem send: AT+QILOCIP
00> 64.951: modem response timeout
00> 64.953: LOCAL IP : 
00> 100.114.216.43

00> 64.954: =========OPEN MQTT BROKER CONNECTION==========
00> 64.955: modem send: AT+QMTOPEN=0,"broker.hivemq.com",1883
00> 65.010: open response: 
00> OK
00> 66.824: open response: 
00> +QMTOPEN: 0,-1

00> 66.825: =========OPEN MQTT BROKER CONNECTION==========
00> 66.826: modem send: AT+QMTOPEN=0,"broker.hivemq.com",1883
00> 66.881: open response: 
00> OK
00> 68.384: open response: 
00> +QMTOPEN: 0,-1

00> 68.385: ========POWER OFF MODULE=========
00> 68.386: modem powerdown
00> 69.186: wait for modem status to go down

the problem was with the certificate. Wrong certificate. thanks!

Hello,
The document named “Quectel_GSM_MQTT_Application_Note_V1.2.pdf” is found only in this forum topic and nowhere else. Is it an official document, does M95 support MQTT fully with its own commands?
Thx