<?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>dfu via ota</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84115/dfu-via-ota</link><description>Hi all, 
 I&amp;#39;am doing DFU via OTA 
 The device will be in bootloader mode ? 
 my current application has a thread running when i&amp;#39;am initiating DFU via OTA in nrf_connect app, 
 the DFU process will start and complete but thread will be running simultaneously</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Feb 2022 07:13:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84115/dfu-via-ota" /><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/351229?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 07:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6726f2e-671d-4dad-9713-4e82ea65befb</guid><dc:creator>Tushar_V</dc:creator><description>&lt;p&gt;Hi Einar Thorsrud,&lt;/p&gt;
&lt;p&gt;Thank you for your assitance&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tushar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/351181?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 15:24:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0956b97-b1f0-421b-915f-1c9395758bd9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Tushar,&lt;/p&gt;
&lt;p&gt;Yes, I do not see any other callbacks that can be used from img_mgmnt. If you need more I suspect you need to modify it to call another callback in other situations or regularily whenever data is received or something else, depending on what fits your use case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350850?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 11:42:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef5a2ee9-0fc3-4568-979f-c6f0f3c1ce4b</guid><dc:creator>Tushar_V</dc:creator><description>&lt;p&gt;Hi Einar Thorsrud,&lt;/p&gt;
&lt;p&gt;We discussed previously about MCu Mgr Eroor:NO_MEMORY when i get this error ,dfu_stopped_cb() callback gets invoked.&lt;/p&gt;
&lt;p&gt;I solved the enabling of thread when ble disconnect by your above suggestion&lt;/p&gt;
&lt;p&gt;when i start dfu process it dfu_started_cb() gets invoked ,but when i cancel dfu process and start it again it resumes from the previous position and i dont get dfu_started_cb() callback.&lt;/p&gt;
&lt;p&gt;Does it mean that only once the callback will be given ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tushar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350823?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 10:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55c61142-1234-41a9-8fa9-2375ac3eabcb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Tushar,&lt;/p&gt;
&lt;p&gt;I see. I do not believe there are any events for that out of the box. Perhaps you could check for an event indicating BLE disconnected (by&amp;nbsp;specifying&amp;nbsp;a callback for that with the call to&amp;nbsp;bt_conn_cb_register()). If you first got an event from img_mgmt about DFU started, and then get a disconnect you will know that it has ended for some reason (at least provided you only have one BLE connection at a time).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350644?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 11:39:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d36631f-f1cf-4665-9532-375bddeadcb8</guid><dc:creator>Tushar_V</dc:creator><description>&lt;p&gt;Hi Einar Thorsrud,&lt;/p&gt;
&lt;p&gt;I&amp;#39;am actually running a thread so when i get callback dfu_started_cb() i suspend the thread, but when i disconnect the ble while dfu process is going on i want a callback saying dfu process is stopped, so that i can resume the thread,how can i get it&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tushar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350633?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 11:21:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c93209d-28d8-49f8-b1d5-04db327f649f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Tushar,&lt;/p&gt;
&lt;p&gt;In which situations is it you want an event? Any form of stopping the DFU process without success? Or something else?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350627?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 11:00:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a30da6b-4019-488c-8e09-cb6eb873893c</guid><dc:creator>Tushar_V</dc:creator><description>&lt;p&gt;Hi Einar Thorsrud,&lt;/p&gt;
&lt;p&gt;I looked into img_mgmt_dfu_stopped() function, but my doubt is how can i voluntarily get that dfu_stooped_cb() call back&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i tried disconnecting while dfu process is going on, but it did not execute dfu_stopped_cb()&lt;/p&gt;
&lt;p&gt;and even dfu_pending_cb () is&amp;nbsp; not called while dfu process is going on&lt;/p&gt;
&lt;p&gt;I&amp;#39;am using nrf_connect_app for OTA&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tushar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350573?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 08:37:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a498ea88-fa80-4ea3-ae8d-6267f4218157</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Tushar,&lt;/p&gt;
&lt;p&gt;Good to hear the issue was resolved.&amp;nbsp;The dfu_stopped_cb callback is called whenever&amp;nbsp;img_mgmt_dfu_stopped() is called in &lt;a href="https://github.com/zephyrproject-rtos/mcumgr/blob/a15a953e35b0d3100893fd86a127c3e8b7e3257c/cmd/img_mgmt/src/img_mgmt.c"&gt;img_mgmt.c&lt;/a&gt;, which is when something goes wrong during the transfer (see code for details).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350555?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 07:17:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b477b29-5c2b-4111-9107-bf457c589bff</guid><dc:creator>Tushar_V</dc:creator><description>&lt;p&gt;Hi Einar Thorsrud,&lt;/p&gt;
&lt;p&gt;I solved the issue as i was uploading different file and thank you&lt;/p&gt;
&lt;p&gt;I used this &lt;a href="https://github.com/zephyrproject-rtos/mcumgr/blob/a15a953e35b0d3100893fd86a127c3e8b7e3257c/cmd/img_mgmt/include/img_mgmt/img_mgmt.h#L252"&gt;img_mgmt_register_callbacks()&lt;/a&gt; function and when i upload bin file via OTA it indicates dfu started but when will i get dfu stopped, while dfu process is going on i disconnected ble,but it was not indicating dfu stopped, how can i get dfu stopped.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tushar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350511?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 17:34:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b7834c8-3313-4cf9-afed-e2c54c79ee26</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Tushar,&lt;/p&gt;
&lt;p&gt;Can you elaborate? Perhaps even share code and detailed steps needed to reproduce this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350384?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 10:26:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dbf088a-fe76-4e1d-acc7-f27b4d027ea4</guid><dc:creator>Tushar_V</dc:creator><description>&lt;p&gt;Hi Einar Thorsrud,&lt;/p&gt;
&lt;p&gt;The image is of size 303kb size&lt;/p&gt;
&lt;p&gt;board : nrf52840dk&lt;/p&gt;
&lt;p&gt;flash : 1mb&lt;/p&gt;
&lt;p&gt;By increasing the MTU packet will i get that error&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tushar&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350374?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 09:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b25d63d-0519-40b8-9f32-fde6a62bf79d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Tushar,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;NO_MEMORY error means &amp;quot;The device has encountered an error due to running out of memory&amp;quot;. Is the image you are trying to update to too large? How big is it, and what is the memory layout of your device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350343?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 06:51:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e90f04e1-5570-41a7-b3b6-f47a65e0ba65</guid><dc:creator>Tushar_V</dc:creator><description>&lt;p&gt;Hi Einar Thorsrud,&lt;/p&gt;
&lt;p&gt;any update ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tushar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/350142?ContentTypeID=1</link><pubDate>Fri, 28 Jan 2022 09:42:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7968f07f-02e7-4cff-99ea-39b4556edd49</guid><dc:creator>Tushar_V</dc:creator><description>&lt;p&gt;Hi Einar Thorsrud,&lt;/p&gt;
&lt;p&gt;i have one more issue&lt;/p&gt;
&lt;p&gt;while doing dfu via ota with device manager app it gives me Mcu Mgr Error:NO_MEMORY(2)&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tushar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu via ota</title><link>https://devzone.nordicsemi.com/thread/349981?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 12:58:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d725653-dd7d-4462-a50c-b551acf7b107</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;HI&amp;nbsp;Tushar,&lt;/p&gt;
&lt;p&gt;Which SDK are you using? After looking at some of your former threads, I will assume you use the nRF Connect SDK for now.&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt;the DFU process will start and complete but thread will be running simultaneously how can i stop my current application&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;This is normal. MCUboot, which is the bootloader used in the nRF Connect SDK, does not have BLE transport, so the transport happens in the application, which then&amp;nbsp;includes the management subsystem. So your application will run during the DFU process, up to the point of activation, where a reset happens.&lt;/p&gt;
&lt;p&gt;If you want to do&amp;nbsp;something in your application (like stop doing what it does, cleanup or something else), you can register relevant callbacks with &lt;a href="https://github.com/zephyrproject-rtos/mcumgr/blob/a15a953e35b0d3100893fd86a127c3e8b7e3257c/cmd/img_mgmt/include/img_mgmt/img_mgmt.h#L252"&gt;img_mgmt_register_callbacks()&lt;/a&gt;&amp;nbsp;or img_mgmt_set_upload_cb().&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>