<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126692/lwm2m-fota-download-stalls-at-1-2-on-nrf9160-over-nb-iot-lte-m</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Mar 2026 09:59:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126692/lwm2m-fota-download-stalls-at-1-2-on-nrf9160-over-nb-iot-lte-m" /><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563751?ContentTypeID=1</link><pubDate>Fri, 20 Mar 2026 09:59:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0af46a2b-0bd9-4805-9013-49a21df82dc1</guid><dc:creator>yess bz</dc:creator><description>&lt;p&gt;it works the solution of tls connexion By provisioning the entire chain&lt;span dir="auto"&gt;(&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong data-start="434" data-end="455"&gt;&lt;span dir="auto"&gt;E8 + ISRG Root X1&lt;/span&gt;&lt;/strong&gt;&lt;span dir="auto"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;) but now i have another problem :&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p data-start="66" data-end="239"&gt;&lt;strong data-start="66" data-end="105"&gt;The TLS connection works perfectly.&lt;/strong&gt;&lt;br data-start="105" data-end="108" /&gt; &lt;strong data-start="108" data-end="137"&gt;The certificate is valid.&lt;/strong&gt;&lt;br data-start="137" data-end="140" /&gt; &lt;strong data-start="140" data-end="237"&gt;The server refuses access to the file &lt;code data-start="180" data-end="199"&gt;zephyr.signed.bin&lt;/code&gt; because authentication is required.&lt;/strong&gt;&lt;/p&gt;
&lt;p data-start="241" data-end="357"&gt;The server &lt;strong data-start="252" data-end="278"&gt;leshan.egconnect.cloud&lt;/strong&gt; requires authentication to download the firmware file. the server has an authentification to access on&amp;nbsp;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563674?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2026 12:41:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:436c5e2c-85fe-4229-92ca-da10ff81de93</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great to hear that, and thanks for sharing so provisioning the full certificate chain in a single modem_key_mgmt_write() call with MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN&amp;nbsp;was the correct fix for&amp;nbsp;your&amp;nbsp;certificate issue.&lt;/p&gt;
&lt;p&gt;Can you confirm whether the FOTA download is now working end to end on the device? If yes, we can close this out.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563643?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2026 09:39:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7392f26b-dc56-4e33-90a7-b4b109df97f2</guid><dc:creator>yess bz</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I wasn&amp;rsquo;t sure how to configure it, so I got stuck&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;curl -v https://leshan.egconnect.cloud/zephyr.signed.bin
COMMENTAIRES : GET with 0-byte payload
curl : 401 Authorization Required
nginx
Au caract&amp;#232;re Ligne:1 : 1
+ curl -v https://leshan.egconnect.cloud/zephyr.signed.bin
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and i think i have a problem with the&amp;nbsp;certificate&amp;nbsp;&lt;/p&gt;
&lt;p data-start="55" data-end="400"&gt;the error &lt;strong data-start="104" data-end="127"&gt;-111 (ECONNREFUSED)&lt;/strong&gt; you were seeing was caused by a certificate validation failure during the TLS handshake. The nRF9160 modem had the &lt;strong data-start="243" data-end="259"&gt;ISRG Root X1&lt;/strong&gt; root certificate, but it couldn&amp;rsquo;t validate your server&amp;rsquo;s certificate because the &lt;strong data-start="341" data-end="372" data-is-only-node=""&gt;E8 intermediate certificate&lt;/strong&gt; was missing from the chain.&lt;/p&gt;
&lt;p data-start="402" data-end="618"&gt;By provisioning the full chain (&lt;strong data-start="434" data-end="455"&gt;E8 + ISRG Root X1&lt;/strong&gt;) in a single call to &lt;code data-start="477" data-end="501"&gt;modem_key_mgmt_write()&lt;/code&gt; using the type &lt;code data-start="517" data-end="552"&gt;MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN&lt;/code&gt;, the modem can now properly validate your server&amp;rsquo;s certificate.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ben zeineb yassmine&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563640?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2026 09:07:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99a676b1-0716-4bb6-8a65-ab04c9bcc454</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You are right that the local IP issue is what caused the HTTP failure, the device on LTE cannot reach 192.168.x.x at all, so that makes sense.&lt;/p&gt;
&lt;p&gt;However, before moving forward,&amp;nbsp;we want to make sure the HTTPS failure is not a separate issue. Even after you provisioned the certificate, the HTTPS download still failed with the same -111 error. This suggests the problem may not just be network accessibility, it is possible that &lt;a href="https://leshan.egconnect.cloud/zephyr.signed.bin"&gt;leshan.egconnect.cloud/zephyr.signed.bin&lt;/a&gt; is not actually serving the firmware file at all, since Leshan is&amp;nbsp;primarily an LwM2M management server and&amp;nbsp;unless specifically configured to also serve static files, &lt;a href="https://leshan.egconnect.cloud/zephyr.signed.bin"&gt;leshan.egconnect.cloud/zephyr.signed.bin&lt;/a&gt; may not be returning the file.&lt;/p&gt;
&lt;p&gt;Can you quickly verify this by running:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;curl -v https://leshan.egconnect.cloud/zephyr.signed.bin&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Or simply try opening that URL in a browser. If it returns a 404 or connection error, the file is not being served there and that&amp;nbsp;could be&amp;nbsp;the actual blocker so moving to a public server IP alone will not fix it. Then the firmware binary needs to be hosted on a separate publicly accessible file server such as AWS S3. Let us know what the curl output shows. Thanks.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563605?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2026 15:54:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ac200c2-eda5-4925-8df1-dd25ef6dfd7b</guid><dc:creator>yess bz</dc:creator><description>&lt;ol start="1" data-spread="false"&gt;
&lt;li&gt;
&lt;p class="isSelectedEnd"&gt;&lt;strong&gt;&lt;span&gt;HTTP configuration (local server)&lt;pre class="ui-code" data-mode="text"&gt;,519] &amp;lt;inf&amp;gt; app_lwm2m_client: FOTA download started for instance 0
[00:36:05.209,411] &amp;lt;inf&amp;gt; fota_download_util: Download url http://192.168.1.46:8000/zephyr.signed.bin
[00:36:05.209,503] &amp;lt;inf&amp;gt; fota_download_util: Download Path zephyr.signed.bin host http://192.168.1.46:8000
[00:36:05.213,226] &amp;lt;inf&amp;gt; downloader: Host lookup failed for hostname 192.168.1.46 on IPv6 (err -22), attempting IPv4
[00:36:05.216,705] &amp;lt;inf&amp;gt; downloader: Connecting to 192.168.1.46
[00:36:29.223,419] &amp;lt;err&amp;gt; downloader: Failed to connect, err -116
[00:36:29.223,449] &amp;lt;err&amp;gt; fota_download: Downloader error event -116
[00:36:29.223,480] &amp;lt;err&amp;gt; lwm2m_firmware: FOTA_DOWNLOAD_EVT_ERROR
[00:36:29.223,480] &amp;lt;inf&amp;gt; lwm2m_firmware: FOTA download failed, target 0
[00:36:29.231,842] &amp;lt;inf&amp;gt; app_lwm2m_client: FOTA failure 0 by status 4&lt;/pre&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span&gt;I hosted the firmware using a local Python server:&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;python -m http.server 8000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;The firmware URL used was:&lt;/span&gt;&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;192.168.1.46:8000/zephyr.signed.bin&lt;br /&gt;&lt;br /&gt;but doesn&amp;#39;t work &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start="2" data-spread="false"&gt;
&lt;li&gt;
&lt;p class="isSelectedEnd"&gt;&lt;strong&gt;&lt;span&gt;HTTPS configuration (with CA certificate)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span&gt;I extracted the CA certificate from the server and integrated it into the modem using:&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;modem_key_mgmt_write()&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;I also configured:&lt;/span&gt;&lt;/p&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;CONFIG_LWM2M_CLIENT_UTILS_DOWNLOADER_SEC_TAG=1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;Despite this, the HTTPS download still fails.&lt;/span&gt;&lt;/p&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;:03.343,597] &amp;lt;inf&amp;gt; app_lwm2m_client: FOTA download started for instance 0
[00:04:03.344,299] &amp;lt;inf&amp;gt; fota_download_util: Download url https://leshan.egconnect.cloud/zephyr.signed.bin
[00:04:03.344,360] &amp;lt;inf&amp;gt; fota_download_util: Download Path zephyr.signed.bin host https://leshan.egconnect.cloud
[00:04:03.348,815] &amp;lt;inf&amp;gt; downloader: Host lookup failed for hostname leshan.egconnect.cloud on IPv6 (err -22), attempting IPv4
[00:04:03.433,502] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update callback (code:2.4)
[00:04:03.433,563] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update complete
[00:04:03.433,593] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update Done
[00:04:03.532,379] &amp;lt;inf&amp;gt; net_lwm2m_message_handling: Send done!
[00:04:03.533,386] &amp;lt;inf&amp;gt; net_lwm2m_message_handling: Send done!
[00:04:03.542,877] &amp;lt;inf&amp;gt; lwm2m_rai: Ongoing traffic, RAI disabled
[00:04:04.537,719] &amp;lt;inf&amp;gt; downloader: Setting up TLS credentials, sec tag count 1
[00:04:04.537,841] &amp;lt;inf&amp;gt; downloader: Connecting to 91.134.59.209
[00:04:05.689,239] &amp;lt;err&amp;gt; downloader: Failed to connect, err -111
[00:04:05.689,270] &amp;lt;err&amp;gt; fota_download: Downloader error event -111
[00:04:05.689,300] &amp;lt;err&amp;gt; lwm2m_firmware: FOTA_DOWNLOAD_EVT_ERROR
[00:04:05.689,300] &amp;lt;inf&amp;gt; lwm2m_firmware: FOTA download failed, target 0
[00:04:05.691,406] &amp;lt;inf&amp;gt; app_lwm2m_client: FOTA failure 0 by status 4&lt;/pre&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563604?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2026 15:39:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6800cbb-3d02-4f33-88ea-a8a00a0ea91a</guid><dc:creator>yess bz</dc:creator><description>&lt;p class="isSelectedEnd"&gt;&lt;span&gt;Here is a summary of what i did :&lt;/span&gt;&lt;/p&gt;
&lt;ol start="1" data-spread="false"&gt;
&lt;li&gt;
&lt;p class="isSelectedEnd"&gt;&lt;strong&gt;&lt;span&gt;HTTP configuration (local server)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span&gt;I hosted the firmware using a local Python server:&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;python -m http.server 8000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;The firmware URL used was:&lt;/span&gt;&lt;/p&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;192.168.1.46:8000/zephyr.signed.bin&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;However, the download fails with a connection error. After investigation, I believe this is because the device is connected over LTE, and therefore cannot access my local IP address (192.168.1.46).&lt;/span&gt;&lt;/p&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;,519] &amp;lt;inf&amp;gt; app_lwm2m_client: FOTA download started for instance 0
[00:36:05.209,411] &amp;lt;inf&amp;gt; fota_download_util: Download url http://192.168.1.46:8000/zephyr.signed.bin
[00:36:05.209,503] &amp;lt;inf&amp;gt; fota_download_util: Download Path zephyr.signed.bin host http://192.168.1.46:8000
[00:36:05.213,226] &amp;lt;inf&amp;gt; downloader: Host lookup failed for hostname 192.168.1.46 on IPv6 (err -22), attempting IPv4
[00:36:05.216,705] &amp;lt;inf&amp;gt; downloader: Connecting to 192.168.1.46
[00:36:29.223,419] &amp;lt;err&amp;gt; downloader: Failed to connect, err -116
[00:36:29.223,449] &amp;lt;err&amp;gt; fota_download: Downloader error event -116
[00:36:29.223,480] &amp;lt;err&amp;gt; lwm2m_firmware: FOTA_DOWNLOAD_EVT_ERROR
[00:36:29.223,480] &amp;lt;inf&amp;gt; lwm2m_firmware: FOTA download failed, target 0
[00:36:29.231,842] &amp;lt;inf&amp;gt; app_lwm2m_client: FOTA failure 0 by status 4
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ol start="2" data-spread="false"&gt;
&lt;li&gt;
&lt;p class="isSelectedEnd"&gt;&lt;strong&gt;&lt;span&gt;HTTPS configuration (with CA certificate)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span&gt;I extracted the CA certificate from the server and integrated it into the modem using:&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;modem_key_mgmt_write()&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;I also configured:&lt;/span&gt;&lt;/p&gt;
&lt;pre dir="ltr"&gt;&lt;code dir="ltr"&gt;&lt;span&gt;CONFIG_LWM2M_CLIENT_UTILS_DOWNLOADER_SEC_TAG=1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;Despite this, the HTTPS download still fails.&lt;/span&gt;&lt;/p&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;:03.343,597] &amp;lt;inf&amp;gt; app_lwm2m_client: FOTA download started for instance 0
[00:04:03.344,299] &amp;lt;inf&amp;gt; fota_download_util: Download url https://leshan.egconnect.cloud/zephyr.signed.bin
[00:04:03.344,360] &amp;lt;inf&amp;gt; fota_download_util: Download Path zephyr.signed.bin host https://leshan.egconnect.cloud
[00:04:03.348,815] &amp;lt;inf&amp;gt; downloader: Host lookup failed for hostname leshan.egconnect.cloud on IPv6 (err -22), attempting IPv4
[00:04:03.433,502] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update callback (code:2.4)
[00:04:03.433,563] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update complete
[00:04:03.433,593] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update Done
[00:04:03.532,379] &amp;lt;inf&amp;gt; net_lwm2m_message_handling: Send done!
[00:04:03.533,386] &amp;lt;inf&amp;gt; net_lwm2m_message_handling: Send done!
[00:04:03.542,877] &amp;lt;inf&amp;gt; lwm2m_rai: Ongoing traffic, RAI disabled
[00:04:04.537,719] &amp;lt;inf&amp;gt; downloader: Setting up TLS credentials, sec tag count 1
[00:04:04.537,841] &amp;lt;inf&amp;gt; downloader: Connecting to 91.134.59.209
[00:04:05.689,239] &amp;lt;err&amp;gt; downloader: Failed to connect, err -111
[00:04:05.689,270] &amp;lt;err&amp;gt; fota_download: Downloader error event -111
[00:04:05.689,300] &amp;lt;err&amp;gt; lwm2m_firmware: FOTA_DOWNLOAD_EVT_ERROR
[00:04:05.689,300] &amp;lt;inf&amp;gt; lwm2m_firmware: FOTA download failed, target 0
[00:04:05.691,406] &amp;lt;inf&amp;gt; app_lwm2m_client: FOTA failure 0 by status 4&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ol start="3" data-spread="false"&gt;
&lt;li&gt;
&lt;p class="isSelectedEnd"&gt;&lt;strong&gt;&lt;span&gt;Root cause (suspected)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span&gt;It seems that the main issue is network accessibility:&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ul data-spread="false"&gt;
&lt;li&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;The firmware is hosted on my local machine (192.168.x.x)&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p class="isSelectedEnd"&gt;&lt;span&gt;The device is connected via LTE&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span&gt;Therefore, it cannot reach the firmware server&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563560?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2026 12:32:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02314f23-4b86-4e74-8eb1-f13c202cfd6c</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Just to clarify, app_update.bin is not missing. In newer NCS versions with sysbuild, it has been renamed to zephyr.signed.bin, found at build/&amp;lt;your_app_name&amp;gt;/zephyr/zephyr.signed.bin. That&amp;#39;s the correct file to use in your firmware URL.&lt;/p&gt;
&lt;p&gt;However, the file name is not what&amp;#39;s blocking the update. As mentioned in my previous reply, the download is failing due to the TLS certificate error (-111). The device can&amp;#39;t connect to your HTTPS server because the server&amp;#39;s CA certificate isn&amp;#39;t provisioned in the modem.&lt;/p&gt;
&lt;p&gt;Could you try the steps I shared earlier, extracting the server certificate and provisioning it with CONFIG_LWM2M_CLIENT_UTILS_DOWNLOADER_SEC_TAG? or alternatively if you want a quicker way to test first then try switching to plain HTTP and host the firmware on server.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563507?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2026 21:08:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cc972d2-f8c6-48a4-9501-97aa32b5143d</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Looking at your logs, the issue is clear:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;downloader: Setting up TLS credentials, sec tag count 1
downloader: Failed to connect, err -111&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#39;re using https:// in your firmware URI, but the modem can&amp;#39;t establish TLS because no valid CA certificate is provisioned for that Leshan server. That&amp;#39;s why it connects on TCP level (you can see it resolves the IP fine) but fails at the TLS handshake.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You have two options:&lt;/p&gt;
&lt;p&gt;Option A (recommended, easiest, and most reliable over cellular)&lt;/p&gt;
&lt;p&gt;Switch to plain HTTP. Host the firmware on your server:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;bash
cd ~/ota
python3 -m http.server 8000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then in Leshan UI write to /5/0/1 (Package URI):&lt;/p&gt;
&lt;p&gt;http://&amp;lt;your-server-ip&amp;gt;:8000/zephyr.signed.bin&lt;/p&gt;
&lt;p&gt;Make sure port 8000 is open in your firewall/security group inbound rules.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Option B &amp;mdash; Keep HTTPS, provision the CA certificate&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;bash
openssl s_client -connect leshan.yourserver.com:443 &amp;lt;/dev/null 2&amp;gt;/dev/null | openssl x509 -outform PEM &amp;gt; leshan_ca.pem&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Provision it into the modem at a security tag:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;modem_key_mgmt_write(1, MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN, cert, cert_len);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And add to prj.conf:&lt;/p&gt;
&lt;p&gt;CONFIG_FOTA_DOWNLOAD_SEC_TAG=1&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also regarding app_update.bin, atleast for me in newer NCS with sysbuild it&amp;#39;s no longer generated. The equivalent file is build/app/zephyr/zephyr.signed.bin. It&amp;#39;s the same MCUboot-signed OTA image, just renamed. Use it directly in your firmware URL.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;hope that ressolve your issue&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563484?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2026 15:51:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dca524e9-ea37-4538-91db-2c678606bc54</guid><dc:creator>yess bz</dc:creator><description>&lt;p&gt;&lt;span&gt;The problem is that my device cannot find the &lt;/span&gt;&lt;strong&gt;&lt;span&gt;app_update.bin&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; file, and I don&amp;rsquo;t know how to properly configure the connection to access it&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563483?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2026 15:39:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9f088ba-92af-4e85-8ce3-d5115c2ba299</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your error indicates the downloader is attempting a TLS connection but failing. As the&amp;nbsp;error -111 is&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/nrf/libraries/networking/aws_fota.html"&gt;ECONNREFUSED&lt;/a&gt;&amp;nbsp;which means&amp;nbsp;Connection refused that it indicates an error with the configured certificates.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So either no valid certificate is&amp;nbsp;provisioned for the Leshan HTTPS server on the security tag or the certificate stored in the modem does not match the one the server presents&lt;/p&gt;
&lt;p&gt;So can you try this out:&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Get the CA certificate (or self signed cert) that the Leshan server uses for HTTPS. If Leshan is using a self signed certificate, you can extract it with:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;openssl s_client -showcerts -connect leshan.example.com:443&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;Provision that CA certificate into a security tag in the modem. You can do this with the Cellular Monitor app or using modem_key_mgmt_write() with credential type MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN as shown &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/modem/modem_key_mgmt.html#usage"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;3. Then&amp;nbsp;add the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/networking/lwm2m_client_utils.html#configuration"&gt;Kconfig&lt;/a&gt;&amp;nbsp;option that points the FOTA downloader to that security tag:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LWM2M_CLIENT_UTILS_DOWNLOADER_SEC_TAG=&amp;lt;your_chosen_sec_tag&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/563451?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2026 13:38:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67c0be22-f771-4f40-8c14-251124d24a56</guid><dc:creator>yess bz</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;i&amp;#39;am currently working on a FOTA implementation&amp;nbsp;I am using&amp;nbsp;&lt;strong&gt;nRF9160 DK&lt;/strong&gt;&amp;nbsp;with&amp;nbsp;&lt;strong&gt;nRF Connect SDK&amp;nbsp;&lt;/strong&gt;&amp;nbsp;v3.1.1&amp;nbsp;and the LwM2M client sample (/samples/cellular/lwm2m_client/). I am using LwM2M with the Leshan server over the CoAP protocol.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am facing an issue: the&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;app_update.bin&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;file is no longer generated. I replaced it with&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;zephyr.signed.bin&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;in the update URL, but no FOTA update is triggered.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;this is my configuration&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;#MCUboot
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_BUILD_OUTPUT_BIN=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUBOOT_IMG_MANAGER=y

#Flash support
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_STREAM_FLASH=y

#LwM2M firmware object
CONFIG_LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT=y

CONFIG_POSIX_API=y

# Allow FOTA downloads using download-client
CONFIG_DOWNLOADER=y
CONFIG_DOWNLOADER_STACK_SIZE=4096
CONFIG_FOTA_DOWNLOAD=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here are the logs I am getting&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;00:07:16.822,967] fota_download_util: Download url https://xxxxxx/zephyr.signed.bin
[00:07:16.823,028] fota_download_util: Download Path zephyr.signed.bin host https://leshan.xxxxxx
[00:07:16.826,782] downloader: Host lookup failed for hostname leshan.xxxxxx on IPv6 (err -22), attempting IPv4
[00:07:16.980,712] downloader: Setting up TLS credentials, sec tag count 1
[00:07:16.980,834] downloader: Connecting to 91.134.59.209
[00:07:18.089,569] downloader: Failed to connect, err -111
[00:07:18.089,599] fota_download: Downloader error event -111
[00:07:18.089,630] lwm2m_firmware: FOTA_DOWNLOAD_EVT_ERROR
[00:07:18.089,630] lwm2m_firmware: FOTA download failed, target 0
[00:07:18.092,742] app_lwm2m_client: FOTA failure 0 by status 4&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;you can send me your configuration you added to upload FOTA&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; because i try and so manyt times and nothing works&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/559705?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 15:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1bff3fd-3adf-43c6-843e-330fa1a263a3</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for testing and sharing the details.&lt;/p&gt;
&lt;p&gt;For FOTA testing with the lwm2m_client sample and the Leshan demo server, we recommend focusing on pull mode (writing the firmware URI to /5/0/1). Although /5/0/9 reports that both modes are supported, push mode (writing the firmware directly to /5/0/0) is more sensitive to network conditions when transferring large images over cellular/UDP. The Leshan project also notes this limitation for large payload transfers over CoAP block-wise, and therefore recommends using a URI-based download when possible:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/eclipse-leshan/leshan/wiki/Using-CoAP-Block-Wise-to-transfer-large-file-%3F"&gt;https://github.com/eclipse-leshan/leshan/wiki/Using-CoAP-Block-Wise-to-transfer-large-file-%3F&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And to get more insight into where the download may be stalling, you can also enable more verbose logging if not already enabled:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG=y
CONFIG_LWM2M_LOG_LEVEL_DBG=y
CONFIG_COAP_LOG_LEVEL_DBG=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/559608?ContentTypeID=1</link><pubDate>Mon, 26 Jan 2026 23:10:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:093d3f9a-995d-4fae-86d5-e592c72aad46</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;Hi Syed,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve applied all your recommended configurations to the &lt;code&gt;samples/cellular/lwm2m_client&lt;/code&gt; sample but FOTA still fails.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Applied configs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;&lt;code&gt;CONFIG_LWM2M_COAP_BLOCK_SIZE=512&lt;/code&gt;&lt;/li&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;&lt;code&gt;CONFIG_LWM2M_UPDATE_PERIOD=60&lt;/code&gt;&lt;/li&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;&lt;code&gt;CONFIG_LWM2M_QUEUE_MODE_UPTIME=600000&lt;/code&gt;&lt;/li&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;&lt;code&gt;CONFIG_LWM2M_RD_CLIENT_LISTEN_AT_IDLE=y&lt;/code&gt;&lt;/li&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;PSM/eDRX enabled (not using aggressive overlay)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Issues:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Push mode fails most of the time - Resource /5/0/9 shows &lt;code&gt;2&lt;/code&gt; (both modes supported) but writing firmware to /5/0/0 (Package resource) usually returns error 501 or times out.&lt;/li&gt;
&lt;li&gt;Some time&amp;nbsp;&lt;strong&gt;Downloads stall at 5-8%&lt;/strong&gt; - On rare occasions when FOTA starts, it downloads 5-8% then stops completely. Device remains connected and sends registration updates every 60 seconds. No error messages in logs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Setup:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;SDK v3.2.1, nRF9151DK&lt;/li&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;Onomondo SIM (blocks TCP/HTTPS, allows CoAP/UDP)&lt;/li&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;Public Leshan server (coaps://leshan.eclipseprojects.io:5684)&lt;/li&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;Firmware:&amp;nbsp;zephyr.signed.bin (841 Kb)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Questions:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;What&amp;#39;s the recommended way to test FOTA with the lwm2m_client sample and public Leshan demo server?&lt;/li&gt;
&lt;li class="whitespace-normal break-words pl-2"&gt;Any additional configs or logging to debug why downloads stall?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M FOTA Download Stalls at 1–2% on nRF9160 over NB-IoT/LTE-M</title><link>https://devzone.nordicsemi.com/thread/559585?ContentTypeID=1</link><pubDate>Mon, 26 Jan 2026 14:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:353f7cd4-11e5-4d1a-9b87-d15520e53ec1</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;From the config you shared, I would first of all recommend you to&amp;nbsp;try CONFIG_LWM2M_COAP_BLOCK_SIZE=512 and retest as there is a limitation mentioned&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/networking/downloader.html#limitations"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. It is&amp;nbsp;recommended to use&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/cellular/lwm2m_client/sample_description.html#firmware_over-the-air_fota"&gt;pull delivery mode&lt;/a&gt;&amp;nbsp;with CoAP or HTTP and starting from the lwm2m_client sample, enabling the overlay-fota_helper.conf overlay, which improves responsiveness in queue mode by using a 60-second update period.&lt;/p&gt;
&lt;p&gt;For large firmware downloads over LTE-M/NB-IoT, you may tune LwM2M queue-mode and timing parameters so the device stays online and listening long enough to complete the transfer. This includes increasing CONFIG_LWM2M_QUEUE_MODE_UPTIME, using a shorter CONFIG_LWM2M_UPDATE_PERIOD (similar to what overlay-fota_helper.conf does), and selecting an idle mode such as CONFIG_LWM2M_RD_CLIENT_LISTEN_AT_IDLE so the client keeps its socket open while the download is in progress.&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;You do not have to disable PSM/eDRX for FOTA, as Nordic’s own lwm2m_client FOTA setup runs with PSM and eDRX enabled.&amp;nbsp;However, aggressive PSM/eDRX or short queue-mode uptime can cause long block-wise transfers to stall. For large FOTA transfers, it is recommended to avoid very aggressive power-saving settings (like&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/cellular/lwm2m_client/sample_description.html#additional_configuration"&gt;overlay-aggressive-psm.conf&lt;/a&gt;&amp;nbsp;overlay file).&lt;/p&gt;
&lt;p&gt;And there are no&amp;nbsp;specific limitations to Onomondo SIMs or AWS-hosted Leshan servers for LwM2M FOTA.&amp;nbsp;You may try out the above mentioned configurations and check if it works.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>