After AT+QMTCONN succeeds, the following error occurs when executing AT+QMTSUB.
Please tell me what caused it.
[2020-07-09 14:02:25:406_S:] AT+QMTCONN=0,“MyIotThing”
[2020-07-09 14:02:25:458_R:] AT+QMTCONN=0,“MyIotThing”
[2020-07-09 14:02:25:458_R:] OK
[2020-07-09 14:02:25:805_R:] DSR:0 CTS:0 (RI:1) DCD:0
[2020-07-09 14:02:25:854_R:] +QMTCONN: 0,0,0
[2020-07-09 14:02:25:923_R:] DSR:0 CTS:0 (RI:0) DCD:0
[2020-07-09 14:02:29:294_S:] AT+QMTSUB=0,1,"$aws/things/MyIotThing/shadow/update/accepted",1
[2020-07-09 14:02:29:346_R:] AT+QMTSUB=0,1,"$aws/things/MyIotThing/shadow/update/accepted",1
[2020-07-09 14:02:29:346_R:] OK
[2020-07-09 14:02:29:829_R:] +QMTSTAT: 0,1 <==== error
err 1 means Connection is closed or reset by
peer.
pls open and connect server again , thanks
1 Like
Hi @Stephen.Li-Q ,
Could you please elaborate what do you mean by “open and connect server again” ?
Is that mean to only trigger only the AT+QMTCONN or AT+QMTOPEN and AT+QMTCONN ?
@losteaka have yoy got solution for this ? if yes then please explain the fix
Thanks
Hi gaurav,
“AT+QMTOPEN ” is used for setup onde socket for the module
AT+QMTCONN is used for Launch one mqtt session。
My experience suggests that the peer (server) didn’t like your topic and closed the connection.
You should verify that the MQTT server is properly configured.
One good way to test is by using a standalone client (eg: MQTTX) to connect/open the server and issue the QMTSUB command. That’s a MUCH easier way to debug the connection than by doing it thru the Quectel modem.