I'm testing my own firmware based on the current Asset tracker V2 code (AWS cloud).
The code generally runs well, but when reception drops (simulated by disconnecting the antenna), the firmware does not detect that a packet has not reached AWS. Which results in data loss.
The readme states:
The application has LTE and cloud connection awareness. Upon a disconnect from the cloud service, the application keeps the sensor data that has been buffered and empty the buffers in batch messages when the application reconnects to the cloud service.
Although I can't find anywhere where the firmware detects that the LTE link fails or drops.
After the antenna has been removed, RSRP drops to zero, ring buffers get filled with data, cloud_module sends data. And then data_module ACKs the pending data. The data never gets moved to the failed_data list.
I feel like I'm missing something, but I'm not sure what it is. All data seems to be acked, no matter the connection status.
- Is there a connection with the MQTT QOS config?
- After a while "aws_iot" sends "aws_iot.mqtt_evt_handler: MQTT_EVT_DISCONNECT: result = -116" which then triggers "modules_common: cloud: Message could not be enqueued, error code: -35" and a reboot. This also results in data loss of course. How come that the modem doesn't detect a packet didn't get acked? What are the timeouts, and where can I find them?
Thanks!
Jelmer