Able to open network for MQTT client but connection of a client to MQTT server failing in MC60

Hi,

I am able to open network for MQTT but connection of a client to MQTT Server failing.

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,"8883"
\r\nOK\r\n
+QMTOPEN: 0,0\r\n

AT+QMTCONN=0,"alankrit"
OK
+QMTSTAT: 0,3
+QMTCONN: 0,2

Later when I came across a post that suggested to close the port and then open before trying for connection of a client.

Then on sending that command I am getting error.
"AT+QMTCLOSE=0\r\n"

\r\nERROR\r\n"

Can anyone suggest me what’s wrong happening ?

mqtt_conn

Hi,
Please verify that your server requires username and password or not? If needed, you need to write the user name and password when executing QMTCONN:
image
You also can verify the server is connected properly or not via the MQTT.fx tool.

Hi,

  1. I have verified my servers does not require ID or password.
  2. If I try writing dummy ID and Password in the code using QMTCONN it is not helping. As my servers don’t need it.

I tried simulating with MQTT.fx tool.

It is working with same certificates that I am using in my code on that tool. I am able to Publish and Subscribe using this tool.

I am storing certificates in RAM.

I am using Section 5.2 of this document.
Quectel_GSM_MQTT_Application_Note_V1.2.pdf (518.0 KB)

AT+QMTCONN is failing.

I am attaching the pics for better understanding.

Hi Alankrit
Can you please help to share the complete AT logs.

Hi,

I am using Firmware version MC60CAR01A13 on Quectel MC60.

Here, is the sequence of commands I am using.

I tried 2 sequence of commands:

CASE 1:

ATI

Quectel_Ltd

Quectel_MC60

Revision: MC60CAR01A13

OK

AT+QIMUX=1

OK

AT+QINDI=1

OK

AT+QSECWRITE=“RAM:ca_cert.pem”,1206,100

CONNECT

+QSECWRITE: 1206,7e53

OK

AT+QSECWRITE=“RAM:client_cert.pem”,1220,100

CONNECT

+QSECWRITE: 1220,2c19

OK

AT+QSECWRITE=“RAM:client_key.pem”,1675,100

CONNECT

+QSECWRITE: 1675,6f71

OK

AT+QIFGCNT=0

OK

AT+QICSGP=1,“airteliot.com

+QICSGP: 1

OK

AT+QIREGAPP

OK

AT+QIACT
OK

AT+QILOCIP

100.93.169.87

AT+QSSLCFG=“ignorertctime”,1

OK

AT+QSSLCFG=“sslversion”,0,4

OK

AT+QSSLCFG=“ciphersuite”,0,“0XFFFF”

OK

AT+QSSLCFG=“seclevel”,0,2

OK

AT+QSECREAD=“RAM:ca_cert.pem”

+QSECREAD: 1,7e53

OK

AT+QSECREAD=“RAM:client_cert.pem”

+QSECREAD: 1,2c19

OK

AT+QSECREAD=“RAM:client_key.pem”

+QSECREAD: 1,6f71

OK

AT+QSSLCFG=“cacert”,0,“RAM:ca_cert.pem”

OK

AT+QSSLCFG=“clientcert”,0,“RAM:client_cert.pem”

OK

AT+QSSLCFG=“clientkey”,0,“RAM:client_key.pem”

OK

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,“8883”

+QMTOPEN: 0,0

AT+QMTCONN=0,“alankrit”

+QMTSTAT: 0,3
+QMTCONN: 0,2

/===================================================================/

CASE 2:

ATI

Quectel_Ltd

Quectel_MC60

Revision: MC60CAR01A13

OK

AT+QIMUX=1

OK

AT+QINDI=1

OK

AT+QSECWRITE=“RAM:ca_cert.pem”,1206,100

CONNECT

+QSECWRITE: 1206,7e53

OK

AT+QSECWRITE=“RAM:client_cert.pem”,1220,100

CONNECT

+QSECWRITE: 1220,2c19

OK

AT+QSECWRITE=“RAM:client_key.pem”,1675,100

CONNECT

+QSECWRITE: 1675,6f71

OK

AT+QIFGCNT=0

OK

AT+QICSGP=1,“airteliot.com

+QICSGP: 1

OK

AT+QIREGAPP

OK

AT+QIACT
OK

AT+QILOCIP

100.93.169.87

AT+QSSLCFG=“ignorertctime”,1

OK

AT+QSSLCFG=“sslversion”,0,4

OK

AT+QSSLCFG=“ciphersuite”,0,“0XFFFF”

OK

AT+QSSLCFG=“seclevel”,0,2

OK

AT+QSECREAD=“RAM:ca_cert.pem”

+QSECREAD: 1,7e53

OK

AT+QSECREAD=“RAM:client_cert.pem”

+QSECREAD: 1,2c19

OK

AT+QSECREAD=“RAM:client_key.pem”

+QSECREAD: 1,6f71

OK

AT+QSSLCFG=“cacert”,0,“RAM:ca_cert.pem”

OK

AT+QSSLCFG=“clientcert”,0,“RAM:client_cert.pem”

OK

AT+QSSLCFG=“clientkey”,0,“RAM:client_key.pem”

OK

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,“8883”

+QMTOPEN: 0,0

AT+QMTCLOSE=0

+QMTCLOSE: 0,0

AT+QMTCONN=0,“alankrit”

+CME ERROR: 3518

/======================================================================/

Hi Alankrit
Add AT+QMTCFG=“SSL”,0,1,0 command to configure the SSL before AT+QMTOPEN and test it.

Hi,

ATI

Quectel_Ltd

Quectel_MC60

Revision: MC60CAR01A13

OK

AT+QIMUX=1

OK

AT+QINDI=1

OK

AT+QSECWRITE=“RAM:ca_cert.pem”,1206,100

CONNECT

+QSECWRITE: 1206,7e53

OK

AT+QSECWRITE=“RAM:client_cert.pem”,1220,100

CONNECT

+QSECWRITE: 1220,2c19

OK

AT+QSECWRITE=“RAM:client_key.pem”,1675,100

CONNECT

+QSECWRITE: 1675,6f71

OK

AT+QIFGCNT=0

OK

AT+QICSGP=1,“airteliot.com

+QICSGP: 1

OK

AT+QIREGAPP

OK

AT+QIACT
OK

AT+QILOCIP

100.93.169.87

AT+QSSLCFG=“ignorertctime”,1

OK

AT+QSSLCFG=“sslversion”,0,4

OK

AT+QSSLCFG=“ciphersuite”,0,“0XFFFF”

OK

AT+QSSLCFG=“seclevel”,0,2

OK

AT+QSECREAD=“RAM:ca_cert.pem”

+QSECREAD: 1,7e53

OK

AT+QSECREAD=“RAM:client_cert.pem”

+QSECREAD: 1,2c19

OK

AT+QSECREAD=“RAM:client_key.pem”

+QSECREAD: 1,6f71

OK

AT+QSSLCFG=“cacert”,0,“RAM:ca_cert.pem”

OK

AT+QSSLCFG=“clientcert”,0,“RAM:client_cert.pem”

OK

AT+QSSLCFG=“clientkey”,0,“RAM:client_key.pem”

OK

AT+QMTCFG=“SSL”,0,1,0
OK

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,“8883”

+QMTOPEN: 0,-1

I tried the command mentioned on the post but now even the network is not opening for the MQTT client.

Don’t understand what’s wrong with this

Try QCOM software to write the certificate and try.
you can downloads it from below link.
https://cnquectel-my.sharepoint.com/:u:/g/personal/india-fae_quectel_com/ETtAe9O5WTZCn0_qmqgJxMUBT1malui6PGT6QJa8F54BrA?e=e8bBv7

please follow below procedure.

if still getting error please write mail to support@quectel.com

Hi,

I tried sending AT COMMANDS using QCOM along with certificates but still the same error is coming.

I don’t understand why is that happening.

AT

OK

ATE1

OK

ATV1

OK

AT+CLIP=0

OK

AT+CNMI=0,0,0,0,0

OK

AT+CREG=0

OK

AT+CPIN?
+CPIN: READY
OK

AT+CREG?
+CREG: 0,1
OK

AT+CGEREP=0
OK

AT+CGREG=0
OK

AT+QCGTIND=0
OK

AT+QEXTUNSOL=“SQ”,0
OK

AT+QEXTUNSOL=“FN”,0
OK

AT+QEXTUNSOL=“BM”,0
OK

AT+QREFUSECS=1,1
OK

AT+QIMUX=1
OK

AT+QINDI=1
OK

AT+QSECWRITE=“RAM:ca_cert.pem”,1206,100

CONNECT
+QSECWRITE: 1206,7a44
OK

AT+QSECWRITE=“RAM:client_cert.pem”,1220,100
CONNECT
+QSECWRITE: 1220,2c3e
OK

AT+QSECWRITE=“RAM:client_key.pem”,1675,100
CONNECT
+QSECWRITE: 1675,4871
OK

AT+QIFGCNT=0
OK

AT+QICSGP=1,“airteliot.com
OK

AT+QIREGAPP
OK

AT+QIACT
OK

AT+QILOCIP
100.126.235.102

AT+QSSLCFG=“ignorertctime”,1
OK

AT+QSSLCFG=“sslversion”,0,4
OK

AT+QSSLCFG=“ciphersuite”,0,“0XFFFF”
OK

AT+QSSLCFG=“seclevel”,0,2
OK

AT+QSECREAD=“RAM:ca_cert.pem”
+QSECREAD: 1,7a44
OK

AT+QSECREAD=“RAM:client_cert.pem”
+QSECREAD: 1,2c3e
OK

AT+QSECREAD=“RAM:client_key.pem”
+QSECREAD: 1,4871
OK

AT+QSSLCFG=“cacert”,0,“RAM:ca_cert.pem”
OK

AT+QSSLCFG=“clientcert”,0,“RAM:client_cert.pem”
OK

AT+QSSLCFG=“clientkey”,0,“RAM:client_key.pem”
OK

AT+QMTCFG=“SSL”,0,1,0
OK

AT+QMTOPEN=0,“a34dgndp911utd-ats.iot.ap-south-1.amazonaws.com”,"8883"
OK
+QMTOPEN: 0,-1

I request you to support us to resolve the issue.

Thanks

hi
please write mail to support@quectel.com

hi @alankrit2197 i am facing same issue. you got what is issue with

Hi

I am facing some problems or error,

please guide me.
13:50:31.209 → AT

13:50:31.209 → OK
13:50:41.164 → AT+CMEE=2

13:50:41.164 → OK
13:51:39.900 → AT+IPR?

13:51:39.900 → +IPR: 9600
13:51:39.900 →
13:51:39.900 → OK
13:52:49.890 → AT+CIMI

13:52:49.890 → 404909248077023
13:52:49.890 →
13:52:49.890 → OK
13:53:32.151 → AT+QCCID

13:53:32.151 → 8991900992480770230F
13:53:32.198 →
13:53:32.198 → OK
13:54:34.480 → AT+COPS?

13:54:34.480 → +COPS: 0,0,“airtel”
13:54:34.533 →
13:54:34.533 → OK
13:55:01.169 → AT+CSQ

13:55:01.169 → +CSQ: 19,0
13:55:01.216 →
13:55:01.216 → OK
13:57:24.191 → AT+CREG?

13:57:24.191 → +CREG: 0,1
13:57:24.191 →
13:57:24.191 → OK
13:57:32.597 → AT+CGREG?

13:57:32.597 → +CGREG: 0,1
13:57:32.644 →
13:57:32.644 → OK
13:58:29.692 → AT+QIREGAPP?

13:58:29.692 → +QIREGAPP: “CMNET”,“”,“”
13:58:29.741 →
13:58:29.741 → OK
13:58:59.788 → AT+QIREGAPP=“airtelgprs.com

13:58:59.788 → OK
13:59:20.203 → AT+QIREGAPP?

13:59:20.203 → +QIREGAPP: “airtelgprs.com”,“”,“”
13:59:20.250 →
13:59:20.250 → OK
13:59:42.781 → AT+QIREGAPP

13:59:42.781 → ERROR
14:00:20.816 → AT+QIREGAPP?

14:00:20.816 → +QIREGAPP: “airtelgprs.com”,“”,“”
14:00:20.869 →
14:00:20.869 → OK
14:01:00.521 → AT+QIREGAPP

14:01:00.521 → ERROR
14:05:57.661 → AT+QIACT=?

14:05:57.661 → OK
14:06:02.519 → AT+QIACT

14:06:03.567 → OK
14:06:28.296 → AT+QILOCIP=?

14:06:28.296 → OK
14:06:42.463 → AT+QILOCIP

14:06:42.463 → 10.10.249.3
14:07:28.999 → AT+QMTCFG=“SSL”,0,1,2

14:07:28.999 → OK
14:08:36.274 → AT+QMTOPEN=0,“trackapi.thingsup.io”,“8883”

14:08:36.320 → OK
14:08:47.753 →
14:08:47.753 → +QMTOPEN: 0,0
14:09:19.600 →
14:09:19.600 → +QMTSTAT: 0,1
14:10:00.439 → AT+QMTCONN=0,“clientExample”

14:10:00.439 → +CME ERROR: invalid parameter
14:10:14.053 → AT+QMTCONN=?

14:10:14.053 → +QMTCONN: (0-5),“”[,“”[,“”]]
14:10:14.099 →
14:10:14.099 → OK
14:11:58.606 → AT+QMTCONN=0,“clientExample”

14:11:58.660 → +CME ERROR: invalid parameter
14:12:14.171 → AT+QMTCONN=?

14:12:14.171 → +QMTCONN: (0-5),“”[,“”[,“”]]
14:12:14.271 →
14:12:14.271 → OK
14:14:24.536 → AT+QMTCONN=0,“278hEG:862174063920698”,“EC200UTEST”,“EC200UTEST”

14:14:24.636 → +CME ERROR: invalid parameter

It indicates that the MQTT connection has been interrupted and you should execute QMTCONN immediately after +QMTOPEN:0,0

Thanks Sir I will check and after that I will update you.

Hello Sir/Ma’am,

I am facing some problem about AT Commands of Quectel EC200U-CN So, please guide me.

Unable to Get IP Address by Domain Name.

We are getting an error “+QIURC: “dnsgip”,565” for the AT command - AT+QIDNSGIP=1,“trackapi.thingsup.io

I attached AT Log.

12:55:48.629 → QUECTEL EC200U-CN module Serial AT COMMANDS TESTING VIA ESP32
12:55:48.629 → Start initilizing the Quectel Modem!
12:55:49.631 → countNewLine: 0
12:55:49.631 → Command: AT
12:55:49.631 →
12:55:49.631 → Response: ⸮
12:55:50.881 → countNewLine: 0
12:55:50.881 → Command: AT
12:55:50.881 →
12:55:50.881 → Response:
12:55:51.148 → QUECTEL EC200U-CN Module has not turned on.
12:55:51.148 → Quectel_PWR_ON!
12:55:58.616 → ⸮
12:55:58.616 → RDY
12:55:58.616 →
12:55:58.616 → +CFUN: 1
12:55:58.650 →
12:55:58.650 → +CPIN: READY
12:55:58.650 →
12:55:58.650 → +QUSIM: 1
12:55:58.916 →
12:55:58.916 → +QGPS: “firmware”,0,0
12:55:58.916 →
12:55:58.916 → +QIND: SMS DONE
12:55:59.467 →
12:55:59.467 → +QIND: PB DONE
12:56:00.784 →
12:56:00.784 → +CTZE: “+22”,0,“2024/04/01,12:56:00”
12:56:01.117 → waitForResponse timeout break
12:56:01.152 → countNewLine: 2
12:56:01.152 → Command: AT
12:56:01.152 →
12:56:01.152 → Response: AT

12:56:01.152 → OK
12:56:01.152 →
12:56:01.152 → QUECTEL EC200U-CN Module has turned on.
12:56:01.152 → --------------------------------------------------------------------------------
12:56:01.152 → waitForResponse timeout break
12:56:01.152 → countNewLine: 4
12:56:01.152 → Command: AT+GSN
12:56:01.152 →
12:56:01.152 → Response: AT+GSN

12:56:01.152 → 867192064647339
12:56:01.152 →
12:56:01.152 → OK
12:56:01.152 →
12:56:01.152 → moduleIMEINum: 867192064647339
12:56:01.152 → moduleIMEINum: 867192064647339
12:56:01.152 → --------------------------------------------------------------------------------
12:56:01.200 → 278hEG:867192064647339
12:56:01.200 → /track/867192064647339/telemetry
12:56:01.200 → /track/867192064647339/command
12:56:01.200 → --------------------------------------------------------------------------------
12:56:02.168 → NOW CHECK FOR SIM CARD STATUS
12:56:02.168 → waitForResponse timeout break
12:56:02.168 → countNewLine: 2
12:56:02.168 → Command: ATE0
12:56:02.201 →
12:56:02.201 → Response: ATE0

12:56:02.201 → OK
12:56:02.201 →
12:56:02.201 → waitForResponse timeout break
12:56:02.201 → countNewLine: 2
12:56:02.201 → Command: ATV1
12:56:02.201 →
12:56:02.201 → Response:
12:56:02.201 → OK
12:56:02.201 →
12:56:02.201 → waitForResponse timeout break
12:56:02.201 → countNewLine: 2
12:56:02.201 → Command: AT+CMEE=2
12:56:02.201 →
12:56:02.201 → Response:
12:56:02.201 → OK
12:56:02.201 →
12:56:02.201 → waitForResponse timeout break
12:56:02.201 → countNewLine: 6
12:56:02.201 → Command: ATI
12:56:02.201 →
12:56:02.201 → Response:
12:56:02.201 → Quectel
12:56:02.201 → EC200U
12:56:02.201 → Revision: EC200UCNAAR03A09M08
12:56:02.201 →
12:56:02.201 → OK
12:56:02.201 →
12:56:02.201 → waitForResponse timeout break
12:56:02.201 → countNewLine: 2
12:56:02.201 → Command: AT+QURCCFG=“URCPORT”,“UART1”
12:56:02.236 →
12:56:02.236 → Response:
12:56:02.236 → OK
12:56:02.236 →
12:56:02.236 → waitForResponse timeout break
12:56:02.236 → countNewLine: 4
12:56:02.236 → Command: AT+CPIN?
12:56:02.236 →
12:56:02.236 → Response:
12:56:02.236 → +CPIN: READY
12:56:02.236 →
12:56:02.236 → OK
12:56:02.236 →
12:56:02.236 → waitForResponse timeout break
12:56:02.236 → countNewLine: 4
12:56:02.236 → Command: AT+CIMI
12:56:02.236 →
12:56:02.236 → Response:
12:56:02.236 → 404909248077024
12:56:02.236 →
12:56:02.236 → OK
12:56:02.236 →
12:56:02.236 → waitForResponse timeout break
12:56:02.236 → countNewLine: 4
12:56:02.236 → Command: AT+QCCID
12:56:02.236 →
12:56:02.236 → Response:
12:56:02.284 → +QCCID: 8991900992480770248F
12:56:02.284 →
12:56:02.284 → OK
12:56:02.284 →
12:56:02.284 → SIM Detected!!
12:56:02.284 → waitForResponse timeout break
12:56:02.284 → countNewLine: 4
12:56:02.284 → Command: AT+IPR?
12:56:02.284 →
12:56:02.284 → Response:
12:56:02.284 → +IPR: 115200
12:56:02.284 →
12:56:02.284 → OK
12:56:02.284 →
12:56:02.284 → module BaudRate: 115200
12:56:02.284 → LTE MODULE BAUD RATE SET PROPERLY!
12:56:02.284 → module_baud_rate: 115200
12:56:02.284 → --------------------------------------------------------------------------------
12:56:02.785 → waitForResponse timeout break
12:56:02.785 → countNewLine: 4
12:56:02.785 → Command: AT+CSQ
12:56:02.785 →
12:56:02.785 → Response:
12:56:02.785 → +CSQ: 18,99
12:56:02.785 →
12:56:02.785 → OK
12:56:02.785 →
12:56:02.785 → RSSI: 18,99
12:56:02.785 → 18
12:56:02.785 → 99
12:56:02.785 → rssiVALUE: 18
12:56:02.785 → berVALUE: 99
12:56:02.785 → --------------------------------------------------------------------------------
12:56:02.785 → waitForResponse timeout break
12:56:02.785 → countNewLine: 4
12:56:02.785 → Command: AT+COPS?
12:56:02.785 →
12:56:02.785 → Response:
12:56:02.785 → +COPS: 0,0,“IND airtel”,7
12:56:02.820 →
12:56:02.820 → OK
12:56:02.820 →
12:56:02.820 → --------------------------------------------------------------------------------
12:56:02.820 → waitForResponse timeout break
12:56:02.820 → countNewLine: 4
12:56:02.820 → Command: AT+CREG?
12:56:02.820 →
12:56:02.820 → Response:
12:56:02.820 → +CREG: 0,1
12:56:02.820 →
12:56:02.820 → OK
12:56:02.820 →
12:56:02.820 → waitForResponse timeout break
12:56:02.820 → countNewLine: 4
12:56:02.820 → Command: AT+CGREG?
12:56:02.820 →
12:56:02.820 → Response:
12:56:02.820 → +CGREG: 0,1
12:56:02.820 →
12:56:02.820 → OK
12:56:02.820 →
12:56:02.820 → --------------------------------------------------------------------------------
12:56:02.820 → waitForResponse timeout break
12:56:02.868 → countNewLine: 4
12:56:02.868 → Command: AT+QICSGP=1
12:56:02.868 →
12:56:02.868 → Response:
12:56:02.868 → +QICSGP: 1,“airtelgprs.com”,“”,“”,1
12:56:02.868 →
12:56:02.868 → OK
12:56:02.868 →
12:56:02.868 → --------------------------------------------------------------------------------
12:56:03.851 → waitForResponse timeout break
12:56:03.851 → countNewLine: 4
12:56:03.851 → Command: AT+CSCA?
12:56:03.851 →
12:56:03.851 → Response:
12:56:03.851 → +CSCA: “+919890051914”,145
12:56:03.851 →
12:56:03.851 → OK
12:56:03.851 →
12:56:03.851 → waitForResponse timeout break
12:56:03.851 → countNewLine: 2
12:56:03.851 → Command: AT+CMGF=1
12:56:03.851 →
12:56:03.851 → Response:
12:56:03.851 → OK
12:56:03.851 →
12:56:03.851 → waitForResponse timeout break
12:56:03.885 → countNewLine: 2
12:56:03.885 → Command: AT+CSMP=17,167,0,0
12:56:03.885 →
12:56:03.885 → Response:
12:56:03.885 → OK
12:56:03.885 →
12:56:03.885 → waitForResponse timeout break
12:56:03.885 → countNewLine: 2
12:56:03.885 → Command: AT+CSCS=“GSM”
12:56:03.885 →
12:56:03.885 → Response:
12:56:03.885 → OK
12:56:03.885 →
12:56:03.885 → --------------------------------------------------------------------------------
12:56:03.885 → waitForResponse timeout break
12:56:03.885 → countNewLine: 4
12:56:03.885 → Command: AT+QGPS?
12:56:03.885 →
12:56:03.885 → Response:
12:56:03.885 → +QGPS: 1
12:56:03.885 →
12:56:03.885 → OK
12:56:03.885 →
12:56:03.885 → --------------------------------------------------------------------------------
12:56:03.933 → waitForResponse timeout break
12:56:03.933 → countNewLine: 4
12:56:03.933 → Command: AT+QGPS?
12:56:03.933 →
12:56:03.933 → Response:
12:56:03.933 → +QGPS: 1
12:56:03.933 →
12:56:03.933 → OK
12:56:03.933 →
12:56:03.933 → --------------------------------------------------------------------------------
12:56:03.933 → waitForResponse timeout break
12:56:03.933 → countNewLine: 4
12:56:03.933 → Command: AT+QLTS=2
12:56:03.933 →
12:56:03.933 → Response:
12:56:03.933 → +QLTS: “2024/04/01,12:56:03+22,0”
12:56:03.933 →
12:56:03.933 → OK
12:56:03.933 →
12:56:03.933 → moduleTime:
12:56:03.933 → +QLTS: “2024/04/01,12:56:03+22,0”
12:56:03.933 →
12:56:03.933 → OK
12:56:03.933 →
12:56:03.933 → --------------------------------------------------------------------------------
12:56:03.933 → AT_TimeOutput: 2024/04/01,12:56:03+22,0
12:56:03.933 → dateTemp: 2024/04/01
12:56:03.933 → timeTemp: 12:56:03+22
12:56:03.968 → Set RTC time if not set using cell tower time
12:56:03.968 → 12
12:56:03.968 → 56
12:56:03.968 → 3
12:56:03.968 → 1
12:56:03.968 → 4
12:56:03.968 → 2024
12:56:03.968 → 1711976163
12:56:04.051 → Monday, April 01 2024 12:56:04
12:56:04.051 → thingsupDeviceTime: 2024-04-01T12:56:03.000+0530
12:56:04.051 → 01042024
12:56:04.051 → 125603
12:56:04.051 → --------------------------------------------------------------------------------
12:56:05.069 → counterWhile: 1
12:56:10.053 → countNewLine: 2
12:56:10.053 → Command: AT+QIACT?
12:56:10.053 →
12:56:10.053 → Response:
12:56:10.053 → OK
12:56:10.053 →
12:56:11.070 → waitForResponse timeout break
12:56:11.070 → countNewLine: 2
12:56:11.070 → Command: AT+QIACT=1
12:56:11.070 →
12:56:11.070 → Response:
12:56:11.070 → OK
12:56:11.070 →
12:56:11.554 → waitForResponse timeout break
12:56:11.587 → countNewLine: 4
12:56:11.587 → Command: AT+QIACT?
12:56:11.587 →
12:56:11.587 → Response:
12:56:11.587 → +QIACT: 1,1,1,“172.17.233.14”
12:56:11.587 →
12:56:11.587 → OK
12:56:11.587 →
12:56:11.587 → IP ADDRESS: 172.17.233.14
12:56:11.587 → IP ADDRESS: 172.17.233.14
12:56:11.587 → --------------------------------------------------------------------------------
12:56:12.087 → waitForResponse timeout break
12:56:12.087 → countNewLine: 4
12:56:12.087 → Command: AT+QIDNSCFG=1
12:56:12.087 →
12:56:12.087 → Response:
12:56:12.087 → +QIDNSCFG: 1,“117.96.122.42”,“59.144.144.99”
12:56:12.087 →
12:56:12.087 → OK
12:56:12.087 →
12:56:12.087 → waitForResponse timeout break
12:56:12.087 → countNewLine: 2
12:56:12.121 → Command: AT+QIDNSCFG=1,“8.8.8.8”,“8.8.4.4”
12:56:12.121 →
12:56:12.121 → Response:
12:56:12.121 → OK
12:56:12.121 →
12:56:12.604 → waitForResponse timeout break
12:56:12.604 → countNewLine: 4
12:56:12.604 → Command: AT+QIDNSCFG=1
12:56:12.604 →
12:56:12.604 → Response:
12:56:12.604 → +QIDNSCFG: 1,“8.8.8.8”,“8.8.4.4”
12:56:12.604 →
12:56:12.604 → OK
12:56:12.604 →
12:56:15.121 → countNewLine: 2
12:56:15.121 → Command: AT+QIDNSGIP=1,“trackapi.thingsup.io
12:56:15.121 →
12:56:15.121 → Response:
12:56:15.121 → OK
12:56:15.121 →
12:56:17.606 → countNewLine: 2
12:56:17.606 → Command: AT+QIDNSGIP=1,“trackapi.thingsup.io
12:56:17.606 →
12:56:17.606 → Response:
12:56:17.606 → OK
12:56:17.606 →
12:56:17.606 → counterWhile: 2
12:56:17.606 → waitForResponse timeout break
12:56:17.606 → countNewLine: 4
12:56:17.606 → Command: AT+QIACT?
12:56:17.606 →
12:56:17.606 → Response:
12:56:17.606 → +QIACT: 1,1,1,“172.17.233.14”
12:56:17.639 →
12:56:17.639 → OK
12:56:17.639 →
12:56:17.639 → IP ADDRESS: 172.17.233.14
12:56:18.122 → waitForResponse timeout break
12:56:18.122 → countNewLine: 4
12:56:18.122 → Command: AT+QIACT?
12:56:18.122 →
12:56:18.122 → Response:
12:56:18.122 → +QIACT: 1,1,1,“172.17.233.14”
12:56:18.122 →
12:56:18.122 → OK
12:56:18.122 →
12:56:18.122 → IP ADDRESS: 172.17.233.14
12:56:18.122 → IP ADDRESS: 172.17.233.14
12:56:18.122 → --------------------------------------------------------------------------------
12:56:18.622 → waitForResponse timeout break
12:56:18.655 → countNewLine: 4
12:56:18.655 → Command: AT+QIDNSCFG=1
12:56:18.655 →
12:56:18.655 → Response:
12:56:18.655 → +QIDNSCFG: 1,“8.8.8.8”,“8.8.4.4”
12:56:18.655 →
12:56:18.655 → OK
12:56:18.655 →
12:56:19.156 → waitForResponse timeout break
12:56:19.156 → countNewLine: 4
12:56:19.156 → Command: AT+QIDNSCFG=1
12:56:19.156 →
12:56:19.156 → Response:
12:56:19.156 → +QIDNSCFG: 1,“8.8.8.8”,“8.8.4.4”
12:56:19.156 →
12:56:19.156 → OK
12:56:19.156 →
12:56:21.640 → countNewLine: 2
12:56:21.640 → Command: AT+QIDNSGIP=1,“trackapi.thingsup.io
12:56:21.640 →
12:56:21.640 → Response:
12:56:21.640 → OK
12:56:21.640 →
12:56:24.124 → countNewLine: 2
12:56:24.174 → Command: AT+QIDNSGIP=1,“trackapi.thingsup.io
12:56:24.174 →
12:56:24.174 → Response:
12:56:24.174 → OK
12:56:24.174 →
12:56:24.174 → counterWhile: 3
12:56:24.174 → waitForResponse timeout break
12:56:24.174 → countNewLine: 4
12:56:24.174 → Command: AT+QIACT?
12:56:24.174 →
12:56:24.174 → Response:
12:56:24.174 → +QIACT: 1,1,1,“172.17.233.14”
12:56:24.174 →
12:56:24.174 → OK
12:56:24.174 →
12:56:24.174 → IP ADDRESS: 172.17.233.14
12:56:24.641 → waitForResponse timeout break
12:56:24.675 → countNewLine: 4
12:56:24.675 → Command: AT+QIACT?
12:56:24.675 →
12:56:24.675 → Response:
12:56:24.675 → +QIACT: 1,1,1,“172.17.233.14”
12:56:24.675 →
12:56:24.675 → OK
12:56:24.675 →
12:56:24.675 → IP ADDRESS: 172.17.233.14
12:56:24.675 → IP ADDRESS: 172.17.233.14
12:56:24.675 → --------------------------------------------------------------------------------
12:56:25.191 → waitForResponse timeout break
12:56:25.191 → countNewLine: 4
12:56:25.191 → Command: AT+QIDNSCFG=1
12:56:25.191 →
12:56:25.191 → Response:
12:56:25.191 → +QIDNSCFG: 1,“8.8.8.8”,“8.8.4.4”
12:56:25.191 →
12:56:25.191 → OK
12:56:25.191 →
12:56:25.691 → waitForResponse timeout break
12:56:25.691 → countNewLine: 4
12:56:25.691 → Command: AT+QIDNSCFG=1
12:56:25.691 →
12:56:25.691 → Response:
12:56:25.691 → +QIDNSCFG: 1,“8.8.8.8”,“8.8.4.4”
12:56:25.691 →
12:56:25.691 → OK
12:56:25.691 →
12:56:27.258 → waitForResponse timeout break
12:56:27.258 → countNewLine: 8
12:56:27.258 → Command: AT+QIDNSGIP=1,“trackapi.thingsup.io
12:56:27.258 →
12:56:27.258 → Response:
12:56:27.258 → OK
12:56:27.258 →
12:56:27.258 → +QIURC: “dnsgip”,565
12:56:27.258 →
12:56:27.258 → +QIURC: “dnsgip”,565
12:56:27.258 →
12:56:27.258 → +QIURC: “dnsgip”,565
12:56:27.258 →
12:56:29.759 → countNewLine: 6
12:56:29.759 → Command: AT+QIDNSGIP=1,“trackapi.thingsup.io
12:56:29.759 →
12:56:29.759 → Response:
12:56:29.759 → +QIURC: “dnsgip”,565
12:56:29.759 →
12:56:29.759 → +QIURC: “dnsgip”,565
12:56:29.759 →
12:56:29.759 → OK
12:56:29.759 →
12:56:29.759 → time taken for setup: 42742
12:56:29.759 → --------------------------------------------------------------------------------
12:56:29.759 → 0.00
12:56:29.759 → 0.00
12:56:29.759 → Monday, April 01 2024 12:56:29
12:56:29.793 → Time: 125629
12:56:29.793 → Date: 01042024
12:56:29.793 → waitForResponse timeout break
12:56:29.793 → countNewLine: 4
12:56:29.793 → Command: AT+CSQ
12:56:29.793 →
12:56:29.793 → Response:
12:56:29.793 → +CSQ: 17,99
12:56:29.793 →
12:56:29.793 → OK
12:56:29.793 →
12:56:29.793 → RSSI: 17,99
12:56:29.793 → 17
12:56:29.793 → 99
12:56:29.793 → rssiVALUE: 17
12:56:29.793 → berVALUE: 99
12:56:29.793 → --------------------------------------------------------------------------------
12:56:29.793 → waitForResponse timeout break
12:56:29.793 → countNewLine: 4
12:56:29.793 → Command: AT+CPIN?
12:56:29.793 →
12:56:29.793 → Response:
12:56:29.793 → +CPIN: READY
12:56:29.793 →
12:56:29.793 → OK
12:56:29.793 →
12:56:30.793 → countNewLine: 2
12:56:30.793 → Command: AT+QMTCONN?
12:56:30.793 →
12:56:30.793 → Response:
12:56:30.793 → OK
12:56:30.793 →
12:56:32.811 → countNewLine: 2
12:56:32.811 → Command: AT+QMTDISC=0
12:56:32.811 →
12:56:32.811 → Response:
12:56:32.811 → ERROR
12:56:32.811 →
12:56:32.811 → MQTT DISCONNECTED: 1
12:56:32.811 → waitForResponse timeout break
12:56:32.811 → countNewLine: 2
12:56:32.811 → Command: AT+QMTCFG=“recv/mode”,0,0,1
12:56:32.811 →
12:56:32.811 → Response:
12:56:32.811 → OK
12:56:32.811 →
12:56:32.811 → waitForResponse timeout break
12:56:32.811 → countNewLine: 2
12:56:32.811 → Command: AT+QMTCFG=“SSL”,0,1,2
12:56:32.811 →
12:56:32.811 → Response:
12:56:32.811 → OK
12:56:32.811 →
12:56:32.811 → waitForResponse timeout break
12:56:32.811 → countNewLine: 2
12:56:32.811 → Command: AT+QMTCFG=“keepalive”,0,30
12:56:32.843 →
12:56:32.843 → Response:
12:56:32.843 → OK
12:56:32.843 →
12:56:32.843 → waitForResponse timeout break
12:56:32.843 → countNewLine: 2
12:56:32.843 → Command: AT+QMTCFG=“session”,0,1
12:56:32.843 →
12:56:32.843 → Response:
12:56:32.843 → OK
12:56:32.843 →
12:56:41.896 → waitForResponse timeout break
12:56:41.896 → countNewLine: 4
12:56:41.896 → Command: AT+QMTOPEN=0,“trackapi.thingsup.io”,8883
12:56:41.896 →
12:56:41.896 → Response:
12:56:41.896 → OK
12:56:41.896 →
12:56:41.896 → +QIURC: “dnsgip”,565
12:56:41.896 →
12:56:42.396 → MQTT NOT CONNECTED!!
12:56:42.396 → MQTT connection AT Commands time taken: 12624
12:56:42.396 → ----------------------------------------------------------------------

Error :-> +QIURC: “dnsgip”,565

in which 565 means DNS parse failed.

We Want this.
13:00:14.342 → Command: AT+QIDNSGIP=1,“trackapi.thingsup.io
13:00:14.342 →
13:00:14.342 → Response:
13:00:14.342 → OK
13:00:14.342 →
13:00:14.342 → +QIURC: “dnsgip”,0,2,60
13:00:14.342 →
13:00:14.342 → +QIURC: “dnsgip”,“3.108.164.58”
13:00:14.342 →
13:00:14.342 → +QIURC: “dnsgip”,“35.154.158.156”

We are also getting +QMTOPEN: 0,4 error which means Failed to parse domain name.

Why does the module GET the private IP address delivered by the network, and do you use a specific APN?

Yeah we are using specific APN based on sim card used of that particular telecommunications company.
While using AT+QMTOPEN AT commands to Open a Network for MQTT Client sometimes we are getting +QMTOPEN: 0,4
which means “Failed to parse domain name”.

This coincides with the private IP address we are trying to get via AT+QIDNSGIP AT commands to Get IP Address by Domain Name.
So we found whenever this AT commands is checked and we get +QIURC: “dnsgip”,565 in which 565 means DNS parse failed.

At that time we also get +QMTOPEN: 0,4 error for AT+QMTOPEN AT command.

And whenever this [ AT+QIDNSGIP=1,“trackapi.thingsup.io” ] AT commands gives the below response:
OK
+QIURC: “dnsgip”,0,2,60
+QIURC: “dnsgip”,“3.108.164.58”
+QIURC: “dnsgip”,“35.154.158.156”

We get +QMTOPEN: 0,0 for the AT+QMTOPEN AT command and MQTT Connection is successful!!

you try to run

AT+QMTCFG=“version”,0,4
AT+QMTOPEN=0,“iot-06z00hxss3rggno.mqtt.iothub.aliyuncs.com”,1883