Unless we get a log that points to an issue on the device, it is hard to answer. I would try though.
As you know the response to a command is sent asynchronously from the app. From the logs it is clear that the device received 2 commands and responded to both of them.
Jun 3 06:01:15 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon/avcDaemon T=main | osDebug.c lwm2m_printf() 84 | [prv_async_response:832] total payload length = 0
Jun 3 06:01:16 swi-mdm9x15 user.debug Legato: DBUG | avcDaemon/avcDaemon T=main | osDebug.c lwm2m_printf() 84 | [prv_async_response:832] total payload length = 0
But I don’t know the response code sent from the app. You indicated that one operation failed and the other was successful. This could be due to the error code sent from the app using le_avdata_ReplyExecResult(). Also, it is important to note that if the app fails to respond, the next job on the server could be stuck waiting for the current operation to complete. Can you please track the response codes and timeline of app’s responses?
The original issue you reported is centered around performance and commands taking a long time to arrive. I don’t see a bottleneck in your use case. However, CoAP retransmission is slow. If you have a lossy network, it is possible that the NAT is released before all retransmission attempt is complete. At this point, the device can receive command only at next successful connection. How frequently do you initiate a connection to the server?
Time series or data push will work even when NAT is released as the device performs DTLS resume to refresh the connection.
Can you clarify on the following items to verify if the issue is related to poor network connection?
- What is the signal strength when you see this issue?
- The network operator and NAT_TIMEOUT (depends on operator)?
- What is the ping time (to get a sense of latency of the network). On my device, I have the following compared to 15 ms on my Desktop.
root@swi-mdm9x28:~# ping bs.airvantage.net
PING bs.airvantage.net (220.127.116.11): 56 data bytes
64 bytes from 18.104.22.168: seq=0 ttl=233 time=49.216 ms
64 bytes from 22.214.171.124: seq=1 ttl=233 time=48.255 ms