I am using nRF9160 DK with nRF Connect SDK v2.9 and the LwM2M client sample (/samples/cellular/lwm2m_client/), converted from PSK to X.509 certificates.
The device connects successfully to my custom Leshan server on AWS, and works with Onomondo SIM cards. Security handshake with X.509 works fine after adjusting the server settings.
However, firmware update over-the-air (FOTA) fails:
-
The download starts and reports 1–2% progress.
-
After that, the download stalls and no more CoAP requests are observed on the server.
-
This happens even when testing with PSK against the demo LwM2M server.
-
Network connection seems stable, no obvious LTE disconnects, and device registration updates continue.
Also, on the server UI, I see it show me "Request Timeout."
[00:00:15.417,205] <inf> app_lwm2m_client: LwM2M is connected to server [00:00:15.417,266] <inf> app_lwm2m_client: Obtained date-time from modem [00:00:38.783,386] <inf> app_lwm2m_client: FOTA download started for instance 0 [00:00:38.784,667] <inf> lwm2m_firmware: Image type 1 [00:00:38.787,139] <inf> lwm2m_firmware: Application firmware download started. [00:00:57.482,666] <inf> lwm2m_firmware: Downloaded 1% [00:00:59.722,747] <inf> lwm2m_firmware: Downloaded 2% [00:01:15.415,527] <dbg> app_lwm2m_client: rd_client_event: Registration update started [00:01:15.810,852] <inf> net_lwm2m_rd_client: Update callback (code:2.4) [00:01:15.810,882] <dbg> app_lwm2m_client: rd_client_event: Registration update complete [00:01:15.810,974] <inf> net_lwm2m_rd_client: Update Done
CONFIG_LWM2M=y CONFIG_LWM2M_COAP_BLOCK_SIZE=1024 CONFIG_LWM2M_COAP_MAX_MSG_SIZE=2048 CONFIG_LWM2M_CLIENT_UTILS=y CONFIG_LWM2M_ENGINE_MAX_MESSAGES=15 CONFIG_LWM2M_ENGINE_MAX_PENDING=15 CONFIG_LWM2M_ENGINE_MAX_REPLIES=15
Questions:
-
Is there a recommended configuration for LwM2M FOTA over NB-IoT/LTE-M for large firmware images?
-
Should PSM/eDRX be disabled during FOTA, or is there a way to pause registration updates to avoid blocking the download?
-
What are the recommended CoAP block sizes and engine parameters to reliably transfer large images?
-
Are there known limitations when using Onomondo SIM + AWS Leshan for large firmware downloads?
Additional Info:
-
MCUboot v2.1.0
-
Zephyr OS v3.7.99
-
LTE-M/NB-IoT tested with Onomondo SIM