AT+QMTDISC timeout

I have a question to AT+QMTDISC command. Is it known how long should I wait for commmand result? There is no such information in documantation. By “result” I mean a +QMTDISC: <client_idx>, message.

I have two situations:
When signal is strong and TLS is off response is comming almost immediately. On the other hand when signal is poor and TLS is turned on, waiting 2 minutes sometimes is not enough.

I would like to recognize what timeout to set in my application to service disconnection operation correctly or what to do if result is not coming.

My modem is BG77 with FW BG77LAR02A04_01.001.01.001.

Thanks in advance for help.

the max response time is 300ms

I understood that 300 ms is for “OK” message. I have a problem with +QMTDISC: 1,0 message.

I discovered that it depends on keepalive settings. Response time is always 2xkeepalive. As I understand connection is ended because of keepalive, not because of disconnect packet. There is a problem with confirmation of disconnection from server side. Should I contact server supplier to fix the issue?




[2021-01-29_08:42:15:093]+QMTOPEN: 1,0


[2021-01-29_08:42:16:638]+QMTCONN: 1,0,0


[2021-01-29_08:42:29:918]+QMTDISC: 1,0



[2021-01-29_08:42:48:535]+QMTOPEN: 1,0


[2021-01-29_08:42:49:773]+QMTCONN: 1,0,0


[2021-01-29_08:43:52:557]+QMTDISC: 1,0

Yes , I agree with you

I’ll post a flow chart for your reference.

  1. You have to wait the URC feedback , if the signal is not good enough , I think you can

set one timetout timer in your program .

So what timeout should I set for this URC? And what to do after it? Restart modem? Deactivate PDP? Retry disconnect?

I would like to open new connection but old is still open with +QMTCONN: 1, 4 and +QMTOPEN: 1, 2.

1 Like

Did you ever figure out how restart the MQTT connection when it is stuck in the “disconnecting” state?