BG96: Close MQTT connection return ERROR

Hi everyone,

I work on an asset tracking device with an MQTT connection. I was able to open a network (AT+QMTOPEN), connect a client (AT+QMTCONN) and publish messages (AT+QMTPUB) into an MQTT server. As explained in the MQTT data integration figure (in Quectel BG86 MQTT Application note), after publishing messages, I have tried to close the connection without success. When I tried to close a network (AT+QMTDISC), the returned error is : ERROR. Just before closing the network, the disconnection of MQTT client (AT+QMTDISC) is OK.

Is there an explanation about this error? How can I fix it?

I have tested it on a private MQTT server (CloudMQTT) and a public MQTT server (

The request modem and application firmware versions are: BG96MAR02A07M1G_01.007.01.007. I have the feeling that the firmware is quite old, correct? Does it possible to upgrade to the latest version?

Best regards,

Jonathan Dreyer

Hi, jonathan.dreyer:
An “error” will appear if you do the following

[2021-06-08_15:20:34:312]+QMTOPEN: 1,0

But the following is correct:

[2021-06-08_15:23:03:805]+QMTOPEN: 1,0
[2021-06-08_15:23:05:680]+QMTCLOSE: 1,0

[2021-06-08_15:24:25:193]+QMTOPEN: 1,0
[2021-06-08_15:24:26:459]+QMTCONN: 1,0,0
[2021-06-08_15:24:27:972]+QMTDISC: 1,0

The following will also cause an error:

[2021-06-08_15:26:00:097]+QMTOPEN: 1,0
[2021-06-08_15:26:02:409]+QMTCONN: 1,0,0
[2021-06-08_15:26:04:253]+QMTCLOSE: 1,0

[2021-06-08_15:28:00:209]+QMTOPEN: 1,0
[2021-06-08_15:28:02:082]+QMTCONN: 1,0,0
[2021-06-08_15:28:04:722]+QMTDISC: 1,0

Note that only one operation can be performed to “shut down the network” and “disconnect the MQTT server” after the MQTT has connected to the server for publication or subscription!

Hi herbert.pan,

Thanks for your feedback. Ok, So the documentation does not reflect how the modem works, correct? I have attached the figure from the documentation which indicate the combination (AT+QMTDISC=1 flowed by AT+QMTCLOSE=1).

Maybe, it is related to the actual firmware or the hardware revision?

I need to understand the reason because, the idea is to deploy to multiple MCU. And as you can understand, I am a bit confused between your version and the one in the documentation.

Best regards,

Jonathan Dreyer