Keepalive timeout on BG96

Hi all,

We are using BG96 modem with FW version BG96MAR02A08M1G_01.015.01.015.
We would like to get error code 2 inside +QMTSTAT URC in case keepalive packet times out or cannot be sent.
If we set keepalive timeout to 30s and force a network breakdown:

  • as expected, the broker kicks out our client after 1 minute because of keepalive timeout,
  • the event +QMTSTAT: 0,2 happened only in trial #1 after 2 minutes since the broker kicked out our client,
  • in other trials, no +QMTSTAT: 0,2 event happened.

With an higher keepalive value (60s, 120s), no +QMTSTAT: 0,2 is received. Which is the modem strategy in notifying +QMTSTAT: 0,2? Without such a notification, we have an half connection (MQTT connection is still erroneously up on the client side) and we cannot trigger a reconnection procedure.

Please, any help about this topic is highly appreciated.
Thanks in advance,
Sabino