<?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>How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107764/how-to-know-when-fota-download-is-interrupted</link><description>I have been testing with the following setup: Bundle: Full modem install. Modem version: 1.3.4 SDK: 2.4.0 My application is based on the SLM sample. Problem Part 1) When I purposely disrupt my internet connection during a FOTA download (by removing my</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Feb 2024 14:10:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107764/how-to-know-when-fota-download-is-interrupted" /><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/469047?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2024 14:10:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:566172d2-5ac0-4758-8c89-aa718fcc57c6</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/benna"&gt;benna&lt;/a&gt; , please also &lt;span class="ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;provide any relevant information on how the failures are triggered so that we could potentially reproduce the same behavior. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/469039?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2024 13:59:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44f7b698-f12d-42b7-b1c2-7f0db37cf83f</guid><dc:creator>helsing</dc:creator><description>[quote user="benna"]If I should open a separate issue for this, please let me know.[/quote]
&lt;p&gt;Thank you for your inputs. However, if you would like us to dig further into this it would be great if you could create a new ticket. Please refer to the relevant parts on this one, and I will be happy to continue to support you. &lt;/p&gt;
&lt;p&gt;Please mention which nRF Connect SDK version you are using.&lt;/p&gt;
[quote user="benna"]Not sure about this, but it seems that the &lt;strong&gt;download_client_callback&amp;nbsp;&lt;/strong&gt;in &lt;strong&gt;fota_download.c&amp;nbsp;&lt;/strong&gt;is missing a call to &lt;strong&gt;stopped()&amp;nbsp;&lt;/strong&gt;in the &lt;strong&gt;error_and_close&amp;nbsp;&lt;/strong&gt;section:[/quote]
&lt;p&gt;Our developers had a brief look at the current source file and found that &lt;code&gt;error_and_close&lt;/code&gt; does not have any call to &lt;code&gt;stopped().&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/468892?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2024 16:19:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ea9d76c-97cf-4b29-b9db-8093624d5ea2</guid><dc:creator>benna</dc:creator><description>&lt;p&gt;Hi Helsing,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for following this up !&amp;nbsp;&lt;/p&gt;
&lt;div id="gtx-trans" style="left:-4px;position:absolute;top:22.6px;"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/468867?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2024 14:46:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fb7645c-c143-4795-8048-b0bbd600af58</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Ben, thank you for the suggestion. I have asked our developers to take a look at this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/468861?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2024 14:38:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:997d0402-a0c7-4d10-a827-fb75c22fb8a7</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Stephen, sorry for the long delay.&lt;/p&gt;
&lt;p&gt;Here is the feedback from our developers:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Regarding part 1):&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;There is an automatic retry mechanism as can be seen from the screenshot of the logs (&lt;code&gt;2 retries left...&lt;/code&gt;). However if retrying doesn&amp;#39;t help SLM should report an error. Here is the result from a test I just performed where I put the modem to flight mode in the middle of the download:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1707911940357v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#XFOTA: 1,0,0

 

#XFOTA: 1,0,1

 

#XFOTA: 1,0,2

 

#XFOTA: 1,0,2

 

#XFOTA: 1,0,3

 

#XFOTA: 1,0,4

 

#XFOTA: 1,0,5

 

#XFOTA: 1,0,5

 

#XFOTA: 1,0,6

 

#XFOTA: 1,0,7

 

#XFOTA: 1,1,2&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The error is reported correctly with the last line of output.&lt;/p&gt;
&lt;p&gt;This is with application FOTA, but I tested with the other types (delta modem, full modem) and just the same happens.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In your screenshot, is there no log after the last line, &lt;code&gt;Connecting to [...]&lt;/code&gt;? A timeout is expected.&lt;/p&gt;
&lt;p&gt;Would you be able to try the latest nRF Connect SDK release, v2.5.2, and at the same time could upgrade the MFW to v1.3.5? Our developers have recently made some small fixes that I think have been backported to the latest 2.5 release.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regarding part 2)&lt;/p&gt;
&lt;p&gt;There seems not to be any support for FOTA auto-restart after any kind of failure in the libraries used(and especially not after a restart). Starting over with a new FOTA operation is the way to go as of now. Also in the example case showed above. The one case where there is pause/resume functionality is when using &lt;code&gt;AT#FOTA=0&lt;/code&gt; during an ongoing download.&lt;/p&gt;
&lt;p&gt;We would have to look further into the cloud related part of this. Does the &amp;#39;downloading&amp;#39; status time out at some point?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/467637?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 17:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb20db0c-611e-4d4f-8936-0554b0a2606a</guid><dc:creator>benna</dc:creator><description>&lt;p&gt;Hi there,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m having a similar issue. I get the above failures, and eventually it will run out of retry counts.&lt;br /&gt;When this happens, no&amp;nbsp;&lt;strong&gt;&lt;span class="mtk17"&gt;fota_download_evt&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span class="mtk17"&gt;is emitted. Leaving my application to wait forever (until a watchdog finally times out).&lt;br /&gt;&lt;br /&gt;Not sure about this, but it seems that the &lt;strong&gt;download_client_callback&amp;nbsp;&lt;/strong&gt;in &lt;strong&gt;fota_download.c&amp;nbsp;&lt;/strong&gt;is missing a call to &lt;strong&gt;stopped()&amp;nbsp;&lt;/strong&gt;in the &lt;strong&gt;error_and_close&amp;nbsp;&lt;/strong&gt;section:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;error_and_close:
    atomic_clear_bit(&amp;amp;flags, FLAG_RESUME);
    (void)download_client_disconnect(&amp;amp;dlc);
    dfu_target_done(false);
    // Shouldn&amp;#39;t we call stopped() here to transmit the error?
    return -1;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="mtk1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="mtk17"&gt;If I should open a separate issue for this, please let me know.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/467623?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 15:45:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3854a06e-241a-4130-9ca7-7ec605971ee0</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Stephen, sorry for the delay. I hope to be able to get back to you soon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/466623?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 20:22:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cd004ba-09ac-40ae-b188-84e6b980c015</guid><dc:creator>SteveLaser</dc:creator><description>&lt;p&gt;Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know when FOTA Download is interrupted</title><link>https://devzone.nordicsemi.com/thread/466253?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 14:13:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b43cc6f9-7746-4197-a067-a09907dcb552</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Stephen,&lt;/p&gt;
&lt;p&gt;Thank you for the questions, we have started looking into this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>