BG95-M3 repeated QAPI MQTT data

Our product uses QAPI to publish the sensor data using MQTT to AWS.

Modem details:
BG95-M3
Revision: BG95M3LAR02A03

What we observe is that some of the data being sent multiple times (2-3) withing the reasonable timeout (5 sec) without any problem with the connectivity.

All the data s being published to AWS with QOS=1 using the qapi_Net_MQTT_Publish_Get_Msg_Id call, where we wait for the PUBACK with the message ID returned from this call. Even though all data is published like this, only some messages gets resent to the broker. As a result, this retransmission causes higher battery consumption.

What we would like to understand is:

  1. How is this behavior configured/controlled? Where the timeout after which the message is resent is defined? There is no publish_timeout field in the qapi_Net_MQTT_Config_t structure, yet there is a connack_timed_out_sec. Are they related or identical?
  2. This behaviour is seen more often when the modem is completely powered off (cut from power) and brought back on before the transmissions. Is there perhaps a HW configuration bit that might affect the MQTT resend functionality somehow?

Thanks in advance for any ideas.

EDIT: this question is similar to the one in [BG95] Causes of retry for MQTT publish messages, but since the time to ACK by broker is definitiely too short, seems that the modem sends duplicate data unnecessarily.

Hi

you know mqtt is application layer protocol , the Infrastructure is TCP/IP protocol ,

you know, normallly TCP is a secure transmission mechanism, and if it is not successfully transmitted, it will be retransmitted
so the root cause is the weak signal, so there is two option for you

  1. select Qos=0
  2. change to the loaction with good network signal