Cannot connect M66 to IBM bluemix server using MQTT AT commands

Hi, I am getting some error while trying to connect to my IBM server using M66 module with AT commands. I am pasting the log below.

AT

OK
AT+QMTOPEN=0,".messaging.internetofthings.ibmcloud.com",1883

OK

+QMTOPEN: 0,0
AT+QMTCONN=?

+QMTCONN: (0-5),""[,""[,""]]

OK
AT+QMTCONN=0,“MY IBM CLIENT ID”[,“MY IBM USERNAME”[,“MY IBM PASSWORD”]]
+CME ERROR: 3518

I confirmed that server runs at the moment and other devices (WiFi) were connected successfully. Please let me know what went wrong

Hi,

Could you please check the clientID, username, password in the following command?
AT+QMTCONN=0,“MY IBM CLIENT ID”[,“MY IBM USERNAME”[,“MY IBM PASSWORD”]]
User name and password are optional and you don’t need to use “[” character in the command.

Please see the following example MQTT application.

Please refer to the attached MQTT application document to get more detailed information about the commands. Quectel_GSM_MQTT_Application_Note_V1.2.pdf (518.0 KB)

ATI

Quectel_Ltd
Quectel_M66
Revision: M66FAR02A06BT

OK
AT+CPIN?

+CPIN: READY

OK
AT+CREG?

+CREG: 0,1

OK
AT+CGREG?

+CGREG: 0,1

OK
AT+QIFGCNT=0

OK
AT+QIDNSIP=0

OK
AT+QICSGP=1,“internet”

OK
AT+QIREGAPP

OK
AT+QIACT

OK
AT+QILOCIP

10.85.38.164
AT+QMTOPEN=1,“test.mosquitto.org”,1883

OK

+QMTOPEN: 1,0
AT+QMTOPEN?

+QMTOPEN: 1,“test.mosquitto.org”,1883

OK
AT+QMTCONN=1,“clientID123”

OK

+QMTCONN: 1,0,0
AT+QMTSUB=1,1,“topic/test1”,2

OK

+QMTSUB: 1,1,0,2

+QMTRECV: 1,0,topic/test1,test1

+QMTRECV: 1,0,topic/test1,message to topic/test1
AT+QMTPUB=1,1,2,1,“topic/test1”

module sent messafe  ge 

OK

+QMTRECV: 1,1,topic/test1,module sent messag

+QMTPUB: 1,1,0
AT+QMTPUB=1,1,2,1,“topic/test1”

module sent message to topic/test1

OK

+QMTRECV: 1,2,topic/test1,module sent message to topic/test1

+QMTPUB: 1,1,0

+QMTPUB: 1,1,0

Hi, Thank you for your reply.Here I lists what I have done after,

  • Followed your example code,

AT

OK
ATI

Quectel_Ltd
Quectel_M66
Revision: M66FAR02A04BT

OK
AT+CPIN?

+CPIN: READY

OK
AT+CREG?

+CREG: 0,1

OK
AT+CGREG?

+CGREG: 0,1

OK
AT+QIFGCNT=0

OK
AT+QIDNSIP=0

OK
AT+QICSGP=1,“internet”

OK
AT+QIREGAPP

OK
AT+QIACT

OK
AT+QILOCIP

10.66.98.29
AT+QMTOPEN=1,"<MY_BMIX_ORG_ID>.messaging.internetofthings.ibmcloud.com",1883

OK

+QMTOPEN: 1,0
AT+QMTCONN=1,“a:5xxxxxxxxxxxxxxd80” // edited

OK

+QMTSTAT: 1,3

+QMTCONN: 1,2


  • Also tried the format AT+QMTCONN=1,“CLIENT_ID”[,“BMIX_USER”[,“BMIX_KEY”]]
    This time, results => +CME ERROR: 3518

  • Another format tried => AT+QMTCONN=0,“CLIENT_ID”,“BMIX_USER”,"BMIX_KEY"
    Result is =>
    +QMTSTAT: 0,3
    +QMTCONN: 0,2

I have double checked the Client ID,User and key ,but couldnt find any difference.Also these credentials have been used by us for a couple of years successfully.I found the only difference between the example code provided and mine was the firmware version.

In example code above its Revision: M66FAR02A06BT and in my case its Revision: M66FAR02A04BT.

I am really stuck with this activity and expects your valuable reply.

Hi
As per our mail communication your issue resolved, It was issue with your SIM card.

Regards
Rahul

Ya, It was a problem related to the SIM card I used. Thank u very much for your supprt.

Hi @rahul.mahakalkar

I have a similar issue, however my CME 3518 error occurs when the AT+QMTSUB command is run. Please see below commands log and where the error occurs. Your assistance will be much appreciated.

AT+CGREG?

+CGREG: 1,1

OK
Return value from AT COMMAND return: 0
AT+QIFGCNT=0

OK
Return value from AT COMMAND return: 0
AutoFlush
AT+QICSGP=1,“internet”

OK
Return value from AT COMMAND return: 0
AutoFlush
AT+QIREGAPP

OK
Return value from AT COMMAND return: 0
AutoFlush
SYSTEM:Housekeeping
AT+QIACT

OK
Return value from AT COMMAND return: 0
AT+QMTCFG=“SHOWRECVLEN”,1,1

OK
Return value from AT COMMAND return: 0
SYSTEM:Housekeeping
AT+QMTCFG=“VERSION”,1,1

OK
Return value from AT COMMAND return: 0
AutoFlush
AT+QMTOPEN=0,"[my mqtt server]",1883

OK
Return value from AT COMMAND return: 0
//<Open a MQTT client successfully
AutoFlush
AT+QMTCONN=0,“WernesExample”

OK
Return value from AT COMMAND return: 0
//<Connect to MQTT server successfully

AutoFlush
AT+QMTSUB=0,1,“topic/example”,0

+CME ERROR: 3518
Return value from AT COMMAND return: -1
AT+QMTSUB=0,1,“Protecto”,0

+CME ERROR: 3518
Return value from AT COMMAND return: -1