<?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>Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92171/initializing-fota-from-app-general-fota-questions</link><description>Hi! 
 I&amp;#39;m trying to implement FOTA in our project. My application will sleep for days between each connection, so I&amp;#39;m turning off the modem and everything between. 
 I&amp;#39;m successfully connecting to nRF Cloud when I&amp;#39;m getting new A-GPS data or when doing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 03 Dec 2022 00:51:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92171/initializing-fota-from-app-general-fota-questions" /><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/398854?ContentTypeID=1</link><pubDate>Sat, 03 Dec 2022 00:51:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:548ada98-9610-486c-86bd-c5960b854ba8</guid><dc:creator>justin</dc:creator><description>&lt;p&gt;FYI:&lt;br /&gt;Here is the PR&amp;nbsp;to handle MQTT disconnect events during FOTA updates.&lt;br /&gt;&lt;a id="" href="https://github.com/nrfconnect/sdk-nrf/pull/9585"&gt;https://github.com/nrfconnect/sdk-nrf/pull/9585&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/388646?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 21:12:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f9a8b66-672d-4fdc-8e9d-ec9aa3ca0714</guid><dc:creator>justin</dc:creator><description>&lt;p&gt;yes please make this a new issue.&lt;br /&gt;it looks like nrf_cloud_fota does not handle the mqtt disconnect event, so that may need to be investigated.&lt;br /&gt;&lt;br /&gt;the disconnect shouldn&amp;#39;t happen here though.&amp;nbsp;&lt;br /&gt; so in the new&amp;nbsp;issue could you answer:&lt;br /&gt;what modem firmware version are you using?&lt;br /&gt;are you still connected to the other (non-nrf cloud) mqtt broker when this occurs?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/388586?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 13:25:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32f3ce9d-3f10-4a35-8a05-fb78cbf7e4c1</guid><dc:creator>Torje</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;I ended up doing a quite extensive makeover of my system. This seems to have solved my issue, I am now getting the FOTA updates. I do not know what caused the fault, but I suspect it was the very short connection time.&lt;br /&gt; However, the system now disconnected from the cloud immediately after commencing the FOTA download. This caused the FOTA_DONE event not to happen, which in turned caused my system not to reboot. Job update wasn&amp;#39;t sent to the cloud either, as shown in the log is pasted below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[01:24:27.830,841] [&amp;lt;dbg&amp;gt; voqdr: lte_event_handler: LTE_EVENT: RRC mode: Connected[
[01:24:28.183,990] [&amp;lt;inf&amp;gt; download_client: Setting up TLS credentials, tag 16842753[
[01:24:28.192,718] [&amp;lt;inf&amp;gt; download_client: Connecting to firmware.nrfcloud.com[
[01:24:29.209,869] [&amp;lt;inf&amp;gt; download_client: Downloading: XXX-XXX-XXX/APP*XXX/app_update.bin [0][
[01:24:29.222,717] [&amp;lt;inf&amp;gt; nrf_cloud_fota: Downloading update[
[01:24:29.229,217] [&amp;lt;dbg&amp;gt; voqdr: cloud_event_handler: NRF_CLOUD_EVT_FOTA_START[
[01:24:29.239,135] [&amp;lt;dbg&amp;gt; voqdr: cloud_event_handler: NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED[
[01:24:29.248,443] [&amp;lt;err&amp;gt; nrf_cloud_fota: Publish failed: -104[
[01:24:29.255,523] [&amp;lt;err&amp;gt; nrf_cloud_transport: Error disconnecting from cloud: -128[
[01:24:29.264,465] [&amp;lt;dbg&amp;gt; voqdr: cloud_event_handler: NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED[
[01:24:29.844,024] [&amp;lt;inf&amp;gt; download_client: Downloaded 1700/243900 bytes (0%)[
[01:24:30.113,494] [&amp;lt;inf&amp;gt; download_client: Downloaded 3400/243900 bytes (1%)[
[01:24:30.275,024] [&amp;lt;inf&amp;gt; download_client: Downloaded 5100/243900 bytes (2%)[
[01:24:30.581,970] [&amp;lt;inf&amp;gt; download_client: Downloaded 6800/243900 bytes (2%)[
[01:24:30.769,683] [&amp;lt;inf&amp;gt; download_client: Downloaded 8500/243900 bytes (3%)[
[01:24:30.985,382] [&amp;lt;inf&amp;gt; download_client: Downloaded 10200/243900 bytes (4%)[
[01:24:31.238,067] [&amp;lt;inf&amp;gt; download_client: Downloaded 11900/243900 bytes (4%)[
[01:24:31.383,422] [&amp;lt;inf&amp;gt; download_client: Downloaded 13600/243900 bytes (5%)[
[01:24:31.625,579] [&amp;lt;inf&amp;gt; download_client: Downloaded 15300/243900 bytes (6%)[
[01:24:31.795,593] [&amp;lt;inf&amp;gt; download_client: Downloaded 17000/243900 bytes (6%)[
[01:24:32.133,605] [&amp;lt;inf&amp;gt; download_client: Downloaded 18700/243900 bytes (7%)[
[01:24:32.340,606] [&amp;lt;inf&amp;gt; download_client: Downloaded 20400/243900 bytes (8%)[
[01:24:32.606,781] [&amp;lt;inf&amp;gt; download_client: Downloaded 22100/243900 bytes (9%)[
[01:24:32.912,017] [&amp;lt;inf&amp;gt; download_client: Downloaded 23800/243900 bytes (9%)[
[01:24:33.077,453] [&amp;lt;inf&amp;gt; download_client: Downloaded 25500/243900 bytes (10%)[
[01:24:33.188,903] [&amp;lt;err&amp;gt; nrf_cloud_fota: Failed to send job update to cloud: -6[
[01:24:33.402,648] [&amp;lt;inf&amp;gt; download_client: Downloaded 27200/243900 bytes (11%)[&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This particular device was connected to the cloud and in PSM-mode. The FOTA started at a keepalive ping. My app did not do anything to disconnect from the cloud when it did.&lt;/p&gt;
&lt;p&gt;If you would prefer for me to make&amp;nbsp;a separate&amp;nbsp;post for this issue that&amp;#39;s fine, just let me know.&lt;/p&gt;
&lt;p&gt;Thank you again!&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Torje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/388426?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2022 18:50:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e437b39-f041-4c60-b609-beaf8a0a909f</guid><dc:creator>justin</dc:creator><description>&lt;p&gt;&lt;em&gt;My current routine disconnects from nRFCloud before connecting to the other broker, but I have not experienced any issues being connected to both. Could this be cause of any trouble?&lt;br /&gt;&lt;/em&gt;- No, that should be fine.&lt;br /&gt;&lt;br /&gt;You shouldn&amp;#39;t need to un-init and re-init&amp;nbsp; the nrf_cloud library each time, unless you&amp;nbsp;want to recover the memory.&amp;nbsp; Disconnecting and reconnecting should be sufficient.&lt;br /&gt;Also, you shouldn&amp;#39;t need to call&amp;nbsp;&lt;span&gt;nrf_cloud_fota_update_check(), as the nrf_cloud library calls it automatically upon connection.&lt;br /&gt;&lt;br /&gt;For testing purposes, I would allow up to 30s after connection to the cloud&amp;nbsp;to see if a scheduled FOTA job arrives.&amp;nbsp; Also for testing, try disabling power saving modes in the modem (PSM and eDRX).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/388161?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2022 13:39:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a52bdacd-6ddd-4bd1-8b94-d92dd9194de7</guid><dc:creator>Torje</dc:creator><description>&lt;p&gt;Hello Justin,&lt;/p&gt;
&lt;p&gt;And thank you as well for replying. Today, I sat up two Thingys with the same code and issued separate FOTA jobs to them. One happened, the other one did not.&lt;br /&gt;I have enabled both the mentioned libraries. I also send my data to a third party broker, thus having connection both with nRFCloud, and with a third party. These connections seem to not interfere with each other. My current routine disconnects from nRFCloud before connecting to the other broker, but I have not experienced any issues being connected to both. Could this be cause of any trouble?&lt;/p&gt;
&lt;p&gt;My cloud connect routine is&amp;nbsp;nrf_cloud_init() (with handler param) and&amp;nbsp;nrf_cloud_connect(). My disconnect routine is&amp;nbsp;&lt;span&gt;&lt;span&gt;nrf_cloud_disconnect() and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;nrf_cloud_uninit() (all from nrf_cloud.c). I am now also calling&amp;nbsp;nrf_cloud_fota_update_check() in between.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am trying to make my system work with both short- and long intervals. Disconnecting in longer intervals, staying connected for shorter. The interval may be changed during runtime. It gets GPS positioning at this interval, with aGPS-support and fallback to cell location if needed. It always gets aGPS or cell data when requested, establishing cloud connection if needed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the REST suggestion, I might consider this in a future version.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/387988?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 17:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97b77da3-e410-483d-9572-20e626b7ea38</guid><dc:creator>justin</dc:creator><description>&lt;p&gt;As H&amp;aring;kon noted,&amp;nbsp;&lt;span&gt;nrf_cloud_fota_update_check() makes the request to&amp;nbsp;nRF Cloud&amp;nbsp;for pending FOTA jobs.&amp;nbsp; It publishes to the&amp;nbsp;/jobs/req topic and if there is a pending job, the cloud will respond on the the&amp;nbsp;jobs/rcv topic.&amp;nbsp;&amp;nbsp;nrf_cloud_fota_is_active() checks to see if the device is actively working on a FOTA job.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;You could try waiting up to 30s after calling&amp;nbsp;nrf_cloud_fota_update_check() to see if the cloud responds with the pending FOTA job.&amp;nbsp; Also, check to make sure the modem has not&amp;nbsp;entered into any power saving mode.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;quot;When restarting the device I can get the FOTA, but not under normal operations. I believe I am connected to the cloud for a too short interval so it &amp;quot;doesn&amp;#39;t have the time&amp;quot;. First connection is somewhat longer.&amp;quot;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;If you are using the nrf_cloud MQTT library, the check for FOTA jobs is performed automatically during the connection process.&amp;nbsp; If your device is disconnecting from MQTT and the carrier and then reconnecting each time, there should not be any difference in operation in&amp;nbsp;the nrf_cloud library compared to a device restart.&amp;nbsp; Could you provide more details on your application&amp;#39;s behavior?&lt;br /&gt;Are you using the full nrf_cloud MQTT library (CONFIG_NRF_CLOUD_MQTT=y) or only FOTA (CONFIG_NRF_CLOUD_FOTA)?&lt;br /&gt;&lt;br /&gt;Also, since it sounds like your device is rarely connected to the network, you could consider using &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/nrf_cloud_rest.html"&gt;REST &lt;/a&gt;instead of MQTT.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/387797?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 06:45:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:273db344-9c98-407f-a141-8abe3b6f4bd3</guid><dc:creator>Torje</dc:creator><description>&lt;p&gt;Thanks again, H&amp;aring;kon.&lt;/p&gt;
&lt;p&gt;I am now calling the function several seconds before disconnecting. I doesn&amp;#39;t seem to do anything though. I feel like I&amp;#39;m missing something to actually commence the FOTA, but this is all &amp;quot;black box&amp;quot; handled by modem and libraries.&amp;nbsp;&lt;span&gt;nrf_cloud_fota_is_active&lt;/span&gt;&lt;span&gt;() still returns false, seven seconds after calling the function you suggested. Do I need to update the shadow every time I connect to the cloud? Not I&amp;#39;m only doing it once, upon the first connection. Other cloud communications works fine, I get both cell and agps-data immediately&amp;nbsp;after requesting it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you again for all and any help!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/387527?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 13:49:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0d4bde6-dc4b-450b-88ae-ecc72ef22ffe</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for clarifying the behavior!&lt;/p&gt;
&lt;p&gt;Given that the process works upon reset, ie. a full re-connect, it indicates that this function is not called/checked on normal operation:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.1.0/subsys/net/lib/nrf_cloud/include/nrf_cloud_fota.h#L161"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.1.0/subsys/net/lib/nrf_cloud/include/nrf_cloud_fota.h#L161&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(this function again interacts with these topics:&amp;nbsp;&lt;a href="https://docs.nrfcloud.com/Reference/Interacting/MQTT/#fota-topics"&gt;https://docs.nrfcloud.com/Reference/Interacting/MQTT/#fota-topics&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to call this function to see if the FOTA is picked up during normal operation?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/387387?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 06:10:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:565b3ec3-8d55-44ec-a37c-98f90c34fce6</guid><dc:creator>Torje</dc:creator><description>&lt;p&gt;Hello H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;And thank you for responding. I can confirm these properties under &amp;quot;device information&amp;quot;. I am doing it as it says in the linked guide.&lt;/p&gt;
&lt;p&gt;When restarting the device I can get the FOTA, but not under normal operations. I believe I am connected to the cloud for a too short interval so it &amp;quot;doesn&amp;#39;t have the time&amp;quot;. First connection is somewhat longer. I don&amp;#39;t want to extend my duration of connection due to power saving, as there won&amp;#39;t be a FOTA 99/100 times.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have any suggestions to how I can solve or work around this? Would you agree that a too short cloud connected period could be the reason the FOTA isn&amp;#39;t executing?&lt;/p&gt;
&lt;p&gt;Thank you again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Initializing FOTA from app/general FOTA questions</title><link>https://devzone.nordicsemi.com/thread/387325?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 13:59:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76186094-ede3-445d-90b6-d90ab6f805f3</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you log on to nrfcloud.com, go into devices and click on your specific device, does it have these properties under &amp;quot;device information&amp;quot;?&lt;/p&gt;
&lt;p&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/1134.pastedimage1663768733352v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, could you try adding the device specifically to a group and executing the FOTA operation, as described here?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nrfcloud.com/Guides/GettingStarted/FOTA/#performing-a-fota-update-in-the-nrf-cloud-portal"&gt;https://docs.nrfcloud.com/Guides/GettingStarted/FOTA/#performing-a-fota-update-in-the-nrf-cloud-portal&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>