Hi Herbert.pan,
Nice to see your response, I configure the MQTT “Keep alive time” as you said, but I still have the issue.
AT+QMTCFG=“keepalive”,0,3600
OK
AT+QMTCFG=“keepalive”,0
+QMTCFG: “keepalive”,3600
OK
The Connection between the MQTT broker and the BG95 is alive while I publish the message from the another client to the BG95 subscribed topic.
The logs of my work is listed below,
[2021-04-26 18:17:35:032_S:] ATI
[2021-04-26 18:17:35:086_R:] Quectel
[2021-04-26 18:17:35:086_R:] BG95-M3
[2021-04-26 18:17:35:086_R:] Revision: BG95M3LAR02A03
[2021-04-26 18:17:35:086_R:] OK
[2021-04-26 18:17:57:253_S:] at+cfun?
[2021-04-26 18:17:57:311_R:] +CFUN: 1
[2021-04-26 18:17:57:311_R:] OK
[2021-04-26 18:18:13:429_S:] at+qcfg=“nwscanmode”
[2021-04-26 18:18:13:486_R:] +QCFG: “nwscanmode”,1
[2021-04-26 18:18:13:486_R:] OK
[2021-04-26 18:18:25:290_S:] at+qcfg=“nwscanseq”
[2021-04-26 18:18:25:345_R:] +QCFG: “nwscanseq”,010203
[2021-04-26 18:18:25:345_R:] OK
[2021-04-26 18:18:34:741_S:] at+qcfg=“iotopmode”
[2021-04-26 18:18:34:795_R:] +QCFG: “iotopmode”,2
[2021-04-26 18:18:34:795_R:] OK
[2021-04-26 18:18:37:012_S:] AT+QCFG=“servicedomain”
[2021-04-26 18:18:37:067_R:] +QCFG: “servicedomain”,2
[2021-04-26 18:18:37:067_R:] OK
[2021-04-26 18:18:39:351_S:] AT+QURCCFG=“urcport”
[2021-04-26 18:18:39:405_R:] +QURCCFG: “urcport”,“usbmodem”
[2021-04-26 18:18:39:405_R:] OK
[2021-04-26 18:18:41:658_S:] at+creg?
[2021-04-26 18:18:41:715_R:] +CREG: 0,5
[2021-04-26 18:18:42:725_R:] OK
[2021-04-26 18:18:44:257_S:] at+cgreg?
[2021-04-26 18:18:44:312_R:] +CGREG: 0,5
[2021-04-26 18:18:44:312_R:] OK
[2021-04-26 18:18:46:669_S:] at+cops?
[2021-04-26 18:18:46:724_R:] +cops: 0,0,“Vi is here”,0
[2021-04-26 18:18:46:724_R:] OK
[2021-04-26 18:18:48:149_S:] AT+CSQ
[2021-04-26 18:18:48:206_R:] +CSQ: 13,99
[2021-04-26 18:18:48:206_R:] OK
[2021-04-26 18:18:49:390_S:] at+qcsq
[2021-04-26 18:18:49:448_R:] +QCSQ: “GSM”,-88
[2021-04-26 18:18:49:448_R:] OK
[2021-04-26 18:18:50:353_S:] AT+QNWINFO
[2021-04-26 18:18:50:408_R:] +QNWINFO: “GPRS”,“40484”,“GSM 1800”,743
[2021-04-26 18:18:50:408_R:] OK
[2021-04-26 18:18:53:169_S:] at+cgatt?
[2021-04-26 18:18:53:226_R:] +CGATT: 1
[2021-04-26 18:18:53:226_R:] OK
[2021-04-26 18:18:57:161_S:] at+cgact?
[2021-04-26 18:18:57:218_R:] +CGACT: 1,0
[2021-04-26 18:18:57:218_R:] +CGACT: 2,0
[2021-04-26 18:18:57:218_R:] OK
[2021-04-26 18:19:01:969_S:] AT+CGDCONT?
[2021-04-26 18:19:02:024_R:] +CGDCONT: 1,“IP”,“SUPER”,“0.0.0.0”,0,0,0
[2021-04-26 18:19:02:024_R:] +CGDCONT: 2,“IP”,“ota.super”,“0.0.0.0”,0,0,0
[2021-04-26 18:19:02:024_R:] OK
[2021-04-26 18:27:10:296_S:] AT+QMTCFG=“pdpcid”,0,1
[2021-04-26 18:27:10:351_R:] OK
[2021-04-26 18:27:12:725_S:] AT+QMTCFG=“keepalive”,0,3600
[2021-04-26 18:27:12:779_R:] OK
[2021-04-26 18:27:15:276_S:] AT+QMTOPEN=0,“broker.hivemq.com”,1883
[2021-04-26 18:27:15:330_R:] OK
[2021-04-26 18:27:19:242_R:] +QMTOPEN: 0,0
[2021-04-26 18:27:19:762_S:] AT+QMTCONN=0,“bg95”,“radinno”,""
[2021-04-26 18:27:19:817_R:] OK
[2021-04-26 18:27:20:345_R:] +QMTCONN: 0,0,0
[2021-04-26 18:27:21:962_S:] AT+QMTCONN?
[2021-04-26 18:27:22:016_R:] +QMTCONN: 0,3
[2021-04-26 18:27:22:016_R:] OK
[2021-04-26 18:27:22:416_S:] AT+CGACT?
[2021-04-26 18:27:22:471_R:] +CGACT: 1,1
[2021-04-26 18:27:22:471_R:] +CGACT: 2,0
[2021-04-26 18:27:22:471_R:] OK
[2021-04-26 18:27:22:917_S:] AT+QMTSUB=0,1,“bg95/mqtt/topic1”,0
[2021-04-26 18:27:22:971_R:] OK
[2021-04-26 18:27:23:843_R:] +QMTSUB: 0,1,0,0
[2021-04-26 18:27:25:126_S:] AT+QMTPUB=0,0,0,0,"bg95/mqtt/topic1"
[2021-04-26 18:27:25:182_R:] > test
[2021-04-26 18:27:28:864_R:] OK
[2021-04-26 18:27:28:864_R:] +QMTPUB: 0,0,0
[2021-04-26 18:27:29:744_R:] +QMTRECV: 0,0,“bg95/mqtt/topic1”,"test"
[2021-04-26 18:32:49:031_S:] AT+QMTPUB=0,0,0,0,"bg95/mqtt/topic1"
[2021-04-26 18:32:49:085_R:] > test1
[2021-04-26 18:32:55:114_R:] OK
[2021-04-26 18:32:55:114_R:] +QMTPUB: 0,0,0
[2021-04-26 18:32:55:683_R:] +QMTRECV: 0,0,“bg95/mqtt/topic1”,"rad1"
[2021-04-26 18:32:57:744_R:] +QMTRECV: 0,0,“bg95/mqtt/topic1”,"test1"
[2021-04-26 18:40:04:125_S:] AT+QMTPUB=0,0,0,0,"bg95/mqtt/topic1"
[2021-04-26 18:40:04:179_R:] > test2
[2021-04-26 18:40:09:543_R:] DSR:0 CTS:0 (RI:1) DCD:0
[2021-04-26 18:40:09:590_R:] OK
[2021-04-26 18:40:09:590_R:] +QMTPUB: 0,0,0
[2021-04-26 18:40:09:642_R:] DSR:0 CTS:0 (RI:0) DCD:0
[2021-04-26 18:40:13:330_R:] +QMTRECV: 0,0,“bg95/mqtt/topic1”,"rad2"
[2021-04-26 18:40:13:869_R:] +QMTRECV: 0,0,“bg95/mqtt/topic1”,"test2"
From the above log, the messages (rad1 & rad2) published from the another client to the BG95 subscribed topic is received only when I publish the message (test1 & test2 ) to the same topic from the BG95 itself, otherwise it took long time to receive the another clients message or not able to receive that message.
In some worst cases, the message published to the topic from the BG95 is also not received by the BG95, even the connection is good.