I am trying to send data from Quectel EC200U-CN to the AWS server using MQTT AT commands.
But the AT+QMTOPEN command always gives a response as +QMTOPEN: 0,5.
Internet is available in a module through a sim.
Please solve the error
Hey All
That error is now resolved. Please resolve the following error.
AT+QMTOPEN=0,“a3…-ats.iot.us-west-2.amazonaws.com”,8883
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,“wqm_test_06”
OK
+QMTCONN: 0,1
+QMTSTAT: 0,3
It should respond +QMTCONN:0,0,0
But I am not receiving this.
The connection state is changing.
Thanks
Hi,
- Check whether the user name and password entered are correct.
- Ensure that the client ID is not occupied.
- Rebuild the MQTT connection and try to send it again CONNECT package to server.
Thank you
Hi Karminder, how did you resolve the first error where you get " +QMTOPEN: 0,5"? Kindly share that information, as I am getting this error and unable to resolve this. Thanks a ton, in advance. - Sudheendran
what is the sequence of commands you are using? I will compare it with my own.
Here is the complete list of commands that I am using…
====================
MQTT commands used
AT
ATI
AT+QFLST=“UFS:*”
AT+QSSLCFG=“cacert”,2,"UFS:cacert.pem "
AT+QSSLCFG=“clientcert”,2,“UFS:client.pem”
AT+QSSLCFG=“clientkey”,2,“UFS:user_key.pem”
AT+QMTCFG=“recv/mode”,0,0,1
AT+QMTCFG=“SSL”,0,1,2
AT+QMTCFG=“version”,0,4
AT+QSSLCFG=“seclevel”,2,2
AT+QSSLCFG=“sslversion”,2,4
AT+QSSLCFG=“ciphersuite”,2,0xFFFF
AT+QSSLCFG=“ignorelocaltime”,2,1
AT+QMTOPEN=0,“”,8883
AT+QMTCONN=0,“mydevice”
The QMTOPEN command fails with “0,5”
====================
AT
OK
ATI
Quectel
EC200U
Revision: EC200UCNAAR02A10M08
OK
AT+CPIN?
+CPIN: READY
OK
AT+CREG?
+CREG: 0,1
OK
AT+CGREG?
+CGREG: 0,1
OK
AT+CSQ
+CSQ: 24,99
OK
AT+COPS?
+COPS: 0,0,“Vodafone”,7
OK
AT+QICSGP=1,1,“www”,“”,“”,0
OK
AT+QIACT=1
OK
AT+QIACT?
+QIACT: 1,1,1,“10.177.75.91”
OK
AT+QFUPL=“UFS:AmazonRootCA1.pem”,1187,100
CONNECT
+QFUPL: 1187,2d19
OK
AT+QFUPL=“UFS:client.pem”,1224,100
CONNECT
+QFUPL: 1224,6912
OK
AT+QFUPL=“UFS:key.pem”,1675,100
CONNECT
+QFUPL: 1675,272f
OK
AT+QMTCFG=“recv/mode”,0,0,1
OK
AT+QMTCFG=“SSL”,1,1,1
OK
AT+QSSLCFG=“cacert”,1,“UFS:AmazonRootCA1.pem”
OK
AT+QSSLCFG=“clientcert”,1,“UFS:client.pem”
OK
AT+QSSLCFG=“clientkey”,1,“UFS:key.pem”
OK
AT+QSSLCFG=“seclevel”,1,2
OK
AT+QSSLCFG=“sslversion”,1,4
OK
AT+QSSLCFG=“ciphersuite”,1,0xFFFF
OK
AT+QSSLCFG=“ignorelocaltime”,1,1
OK
AT+QMTCFG=“VERSION”,1,4
OK
AT+QMTOPEN=1,“a1a2.amazonaws.com”,8883
OK
+QMTOPEN: 1,0
AT+QMTCONN=1,“test”
OK
+QMTCONN: 1,0,0
I have used this command sequence, you can try this. Also, I recommend you run these commands first on quectel terminal.
Thanks Karminder. With some of the commands modified, stepping down to TLS1.2 in AWS, Using the AWS Certificates AS IS (not removing CR/LF characters) I was able to connect. Thanks a ton
“You’re welcome! I’m glad to hear that the changes worked and that you were able to connect successfully. Great job on getting it sorted!”