<?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>Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90110/send-dfu-image-between-two-nrf5340</link><description>Hi, 
 What is the best way to send image from one nrf5340 that is central to other nrf5340 that is peripheral in order to update him via 
 
 MCUMGR 
 
 thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Oct 2022 08:10:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90110/send-dfu-image-between-two-nrf5340" /><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/389541?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 08:10:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af131c50-2403-47f8-8fb3-7622696377d4</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Sounds good.&lt;/p&gt;
&lt;p&gt;Let me know if you encounter any issues.&lt;/p&gt;
&lt;p&gt;Make sure to test the solution thoroughly before using it in the product, as this is not an official solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/389515?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 06:28:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:210349cc-5d14-425e-91e9-d6914d9dba9a</guid><dc:creator>MaximSh</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;Thanks you it is amazing full solution.&lt;br /&gt;From first review it looks like my partition implementation so i think it should work.&lt;br /&gt;I will test it after our Holidays.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/389410?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 12:28:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55ac2786-e1e5-4db8-b0ef-05690926433d</guid><dc:creator>Simon</dc:creator><description>[quote user="Hash5422"]Could you assign the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;other&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;thread to yourself so we can continue the discussion there?&amp;nbsp;[/quote]
&lt;p&gt;I have assigned&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;Perform NRF52840 OTA over the NRF9160 and UART&lt;/a&gt;&amp;nbsp;to myself, so let us continue the discussion there.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/389408?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 12:21:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0408911b-7f39-4748-8e98-896111174d3f</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/enpre"&gt;enpre&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Again, if you&amp;#39;re not running NCS/Zephyr on the&amp;nbsp;ESP32&amp;nbsp;I don&amp;#39;t think using my solution will be the best option. Please see my earlier answer &lt;span style="text-decoration:line-through;"&gt;continue the discussion in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;Perform NRF52840 OTA over the NRF9160 and UART&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Actually in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;this ticket&lt;/a&gt;&amp;nbsp;the thread starter is using NCS on both ends of the transfer, and if you don&amp;#39;t do it, I think the solution will be a little different. Please create a new case, and inform what SDK you&amp;#39;re using on both the&amp;nbsp;&lt;span&gt;ESP32&amp;nbsp;and the nRF52840,&lt;/span&gt; and link to it here, and I will assign it to myself and continue to help you out there.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/389293?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 01:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69446778-a09b-4949-b3c0-ba2d22c94345</guid><dc:creator>Hash5422</dc:creator><description>&lt;p&gt;Hey Simon! Thanks for all your help. I was taking time to do some reading since I am not super familiar with smp and mcuboot as well. I am moving my 52840 code to NCS so both nrf9160 and nrf52840 are running NCS based code now.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So for the two solutions you proposed, I have follow up questions for you -&amp;nbsp;&lt;br /&gt;1.&amp;nbsp;&lt;strong&gt;Using the ncs2.0.0 version of the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/8839"&gt;solution&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;I was trying:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;-&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;I can copy the changes to the 14 files that this solution&amp;nbsp;touches in ncs2.0.0. But from what I understand, this is a library implementation of DFU over UART. Seems like it is doing exactly what I am trying to achieve, but I am not sure how to effectively use it in an example or my own code. Is there an example that can help me test these changes or understand how I can use them in my project once I download the image from the server over LTE.&amp;nbsp;&lt;br /&gt;- NCS2.0.0 only supports VSCODE and I use SES as my compiler, can I use the same changes on ncs1.9.1 which continues to support ses ide.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Using the solution you&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu"&gt;provided&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;in this thread:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;- You mentioned that I could use this as well, if I manage to receive binary chunks from the cloud instead of reading it from the flash. However, your solution does the image transfer over BLE if I understand correctly. So I would have to find a way to send it over UART as well, correct?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;- Could you provide a changelist of changed files so I can make sense of what you&amp;#39;re doing in your implementation.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I apologize if I&amp;#39;m missing something obvious here, I am fairly new to this.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve broken down my&amp;nbsp;task into&amp;nbsp;these steps:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. Generating the nrf52840 image with the right OTA header&lt;br /&gt;2. Uploading the image to our servers&amp;nbsp;&lt;br /&gt;3. Downloading the image over LTE on the nrf9160&lt;br /&gt;4. Dividing the image into header + fixed size chunks&amp;nbsp;&lt;br /&gt;5. Sending the data over UART&lt;br /&gt;6. Storing the image into FLASH Secondary storage&amp;nbsp;&lt;br /&gt;7. Copying the data over to the Primary Storage&amp;nbsp;&lt;br /&gt;8. Reboot and take new image&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Correct me if I am wrong, my understanding is step 5 is implemented&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/8839/files"&gt;here&lt;/a&gt;&amp;nbsp;and I could use&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu"&gt;your code&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;for steps 6,7, 8.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Could you assign the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;other&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;thread to yourself so we can continue the discussion there?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/389030?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 14:45:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d8183c5-311a-4633-9ac5-799924cda694</guid><dc:creator>enpre</dc:creator><description>&lt;p&gt;Hi Simon, I&amp;#39;m in trouble with a new task this week so I&amp;#39;ll try it maybe next week.&lt;br /&gt;Meantime very big thanks about it, I think it&amp;#39;ll be a great start point to implement an OTA update as meand &lt;a href="https://devzone.nordicsemi.com/members/hash5422"&gt;Hash5422&lt;/a&gt;&amp;nbsp;needs to do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/389028?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 14:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e5198f7-858a-4c90-b30c-7932cc1364f5</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The solution is complete now&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/simon-iversen/ncs_samples/blob/master/central_smp_client_dfu/README.md"&gt;https://github.com/simon-iversen/ncs_samples/blob/master/central_smp_client_dfu/README.md&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you follow the instructions in the README, you will be able to perform a DFU from one nRF52840DK to another nRF52840DK over Bluetooth using NCS v2.0.0.&lt;/p&gt;
&lt;p&gt;Let me know if you&amp;#39;re not able to get it to work with nRF5340DK&amp;#39;s&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/388568?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 12:39:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b6bc597-fb8d-4067-9a41-64a170492f38</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I tested it on NCS v2.0.0.&lt;/p&gt;
&lt;p&gt;Yesterday I was able to receive and parse the image list response, which is required to run in order to get the image hash. I have not implemented it yet, but now it should be straigth forward to test/confirm the image from the app.&amp;nbsp;What is needed to do next is to run the image list command after doing the update, then store the hash of the newly updated image, confirm/test the new update using the stored hash and eventually reset it using the reset command.&lt;/p&gt;
&lt;p&gt;After doing this + cleaning up the sample, the solution is complete&lt;/p&gt;
&lt;p&gt;Feel free to create a pull request on&amp;nbsp;&lt;a id="" href="https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu"&gt;https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/388562?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 11:59:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3df0bb39-ce3a-437b-8fa5-cbd872a4ceb2</guid><dc:creator>MaximSh</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;Thanks.&amp;nbsp;&lt;br /&gt;Did you test it on sdk 1.9.1?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/388536?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 10:52:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3326fea1-de68-4ec7-9784-1730d9ed1703</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Okay, so let me try to clarify:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/hash5422"&gt;Hash5422&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If I understand it correctly, you want to perform a DFU update in the following manner: Cloud/server--&amp;gt;LTE--&amp;gt;9160 (NCS)--&amp;gt;UART--&amp;gt;52840 (nRF5 SDK).&lt;/p&gt;
&lt;p&gt;It may be a good idea to port the 52840 to NCS, especially if it&amp;#39;s a &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement#:~:text=for%20all%20new%20designs."&gt;new design&lt;/a&gt;. If you do port to NCS, then you could look at this pull request&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/8839"&gt;https://github.com/nrfconnect/sdk-nrf/pull/8839&lt;/a&gt;&amp;nbsp;(a customer updated &lt;a href="https://github.com/nrfconnect/sdk-nrf/compare/v1.4.0...plskeggs:sdk-nrf:feature-uart-dfu-v1.4.0#diff-e3504134c0f8086b20a677520fb7d0a172c33a57c880eccc6083a959871b6b0d"&gt;the solution you&amp;#39;ve been looking&lt;/a&gt;&amp;nbsp;to NCS v2.0.0). I think my (almost complete) solution should work fine as well (if 52840 runs NCS), you just need to modify it to get the binary chunks from the library that receives the binary from the cloud, instead of&amp;nbsp;&lt;a href="https://github.com/simon-iversen/ncs_samples/blob/2265ee111f0fbbf49a8f1331ba3759d37c57a8f1/central_smp_client_dfu/src/main.c#L792"&gt;reading it from flash&lt;/a&gt;. If you&amp;#39;re not planning to go for my solution, please continue the discussion in this thread:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;Perform NRF52840 OTA over the NRF9160 and UART&lt;/a&gt;, since it&amp;#39;s nice to keep the thread clean and on-topic.&amp;nbsp;I have worked some with this, so I could probably re-assign the ticket to me and give more inputs&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/enpre"&gt;enpre&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is this what you&amp;#39;re trying to achieve? Cloud/server--&amp;gt;WiFi--&amp;gt;ESP32 (SDK?)--&amp;gt;UART--&amp;gt;52840 (SDK?)&lt;/p&gt;
&lt;p&gt;What SDK are you using on the ESP32? What SDK are you running on the 52840?&lt;strong&gt; If&amp;nbsp;both are running NCS/Zephyr&lt;/strong&gt; you could use my solution,&amp;nbsp;and continue the discussion in this thread.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If the esp32 is running some other SDK and the 52840 is running NCS&lt;/strong&gt;, I think it is easier to just skip the SMP protocol (which the solution in this thread uses) and send the binary image as raw bytes. Check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/77869/update-code-via-uart-instead-of-fota-nrf9160"&gt;this ticket&lt;/a&gt;&amp;nbsp;for more information, it is the opposite of your solution but should still be relevant since it explains how to send the image as raw bytes and what to do on the 9160 once the update is received (the same should be done on the 52840 if NCS is used). However, if you have more questions regarding this, please continue the discussion in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;Perform NRF52840 OTA over the NRF9160 and UART&lt;/a&gt;. I have worked some with this, so I could probably re-assign the ticket to me and give more inputs&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If the esp32 is running some other SDK and the 52840 is running nRF5SDK&lt;/strong&gt;,&amp;nbsp;I will not be of much help, since I have not touched the nRF5 SDK in many years. Then you should probably continue the discussion&lt;span&gt;&amp;nbsp;in&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;Perform NRF52840 OTA over the NRF9160 and UART&lt;/a&gt;, or if Håkon is not familiar with the nRF5 SDK either just create a new ticket. Remember to specify in the title that the 52840 is running the nRF5 SDK and the ticket will be assigned to an engineer with knowledge about this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/388463?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 06:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adfcbdd3-5541-43d9-9f28-7fcba8a8973d</guid><dc:creator>enpre</dc:creator><description>&lt;p&gt;Exactly, I have the same task to do as &lt;a href="https://devzone.nordicsemi.com/members/hash5422"&gt;Hash5422&lt;/a&gt;&amp;nbsp;&lt;br /&gt;To be honest &lt;a href="https://devzone.nordicsemi.com/members/simoniversen"&gt;Simon&lt;/a&gt;&amp;nbsp;&amp;nbsp;it&amp;#39;s the first time I approach OTA on zephyr ( or generally linux based devices) and so I have to go deep into some topics, as MCUBoot / Images I haven&amp;#39;t used before.&lt;/p&gt;
&lt;p&gt;When I asked support here I believed that OTA was a common task on a IoT device as Nordic&amp;#39;s MCU, but I imagined wrong&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, what I can do, is to go deep into the main concepts and support you if you are doing something on this, I think that help one to each other in this open source world is a great opportunity to make the world better than now.&lt;/p&gt;
&lt;div id="gtx-trans" style="left:98px;position:absolute;top:42.2358px;"&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: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/388422?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2022 17:35:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dc99eba-a9e4-48f0-a48b-f09f73eb1636</guid><dc:creator>Hash5422</dc:creator><description>&lt;p&gt;Hey Simon,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thank you for putting this together. Like @enpre, I was directed to this thread from &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91444/perform-nrf52840-ota-over-the-nrf9160-and-uart"&gt;another&lt;/a&gt; thread.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;What Enpre and I are trying to do is download an image for nrf52840 over an LTE/WIFI chip (nrf9160 in my case) and then send it to the BLE chip over UART. I&amp;#39;ve been trying to follow this &lt;a href="https://github.com/nrfconnect/sdk-nrf/compare/v1.4.0...plskeggs:sdk-nrf:feature-uart-dfu-v1.4.0#diff-e3504134c0f8086b20a677520fb7d0a172c33a57c880eccc6083a959871b6b0d"&gt;link&lt;/a&gt;&amp;nbsp;to formulate a solution that works, but there&amp;#39;s very little documentation that explains what&amp;#39;s going on there.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;So my question is - what modifications does your code need to be able to DFU over UART. I use a zephyr ncs code on my nrf9160 and an sdk17 based code on my NRF52840, but I am happy to port to ncs if it makes the OTA solution easier.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Also, thank you so much for helping out with this!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/388290?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2022 09:01:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66c04ab2-bcce-4678-ae2d-8ddc97967167</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The solution I&amp;#39;m working on is intended for two chips running Zephyr/NCS, is that the case for you&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/enpre"&gt;enpre&lt;/a&gt;?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/maximsh"&gt;MaximSh&lt;/a&gt;&amp;nbsp;I was just able to successfully perform a dfu update using this &lt;a href="https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu"&gt;central_smp_client_dfu&lt;/a&gt;&amp;nbsp;and the smp_svr sample. I have not been able to implement the image list command, which&amp;nbsp;is needed in order&amp;nbsp;to get the hash of the new image,&amp;nbsp;which is used to test and confirm the image.&lt;/p&gt;
&lt;p&gt;As a temporary workaround, I modifed the img_mgmt.c library in the following manner:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;diff --git a/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt.c b/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt.c
index 119906204c..e12bb3f0aa 100644
--- a/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt.c
+++ b/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt.c
@@ -448,6 +448,10 @@ img_mgmt_upload(struct mgmt_ctxt *ctxt)
 #endif
 		/* If this is the last chunk */
 		if (g_img_mgmt_state.off + req.img_data.len == g_img_mgmt_state.size) {
+			rc = boot_set_pending_multi(0, false);
+			if (rc != 0) {
+				return rc;
+			}
 			last = true;
 		}
 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So on the smp_svr side, it will set the image as pending right after the update is complete. After doing this, after resetting the chip running the smp_svr sample, MCUboot saw the new update in the secondary slot and swapped it into the primary slot.&lt;/p&gt;
&lt;p&gt;In order for the update to not revert back, you should call boot_write_img_confirmed() from within the new updated image. Like it&amp;#39;s done in the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/307bbad9a3391ed31f27348ef251f1f63b25d5ef/samples/nrf9160/http_update/application_update/src/main.c#L60"&gt;http application update sample&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I will continue to work with implementing the image list command.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/388271?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2022 08:07:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09b48d14-f182-4e53-90f1-3ac76057a428</guid><dc:creator>enpre</dc:creator><description>&lt;p&gt;Hi Guys, I need to integrate into my project an OTA update.&lt;br /&gt;I have a gateway (nrf52840) connected using UART to an external microcontroller to the cloud, and IoT nodes connected using BLE.&lt;br /&gt;&lt;br /&gt;I begin following one thread on devzone, and then the guys talk to me about your dev thread.&lt;br /&gt;I purpose to join together to make a def. guide as in Nordic Doc I always can&amp;#39;t find the solutions to my problems &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My idea was to get data from UART (as I connect the nordic to an ESP32 with AT commands for Wifi Connection) and then store them into flash, and after getting the file .hex from uart, restart the micro.&lt;br /&gt;&lt;br /&gt;Into the bootloader, pick up data from flash and store to the program memory zone, and after that, restart the micro and that&amp;#39;s it.&lt;br /&gt;&lt;br /&gt;When the gateway is updated, the next step is to update also IoT node, but in this case, using the BLE and not the UART obviously.&lt;br /&gt;&lt;br /&gt;Using STM it&amp;#39;s a child&amp;#39;s play, using nordic everything seems to be impossible... is it the way you are proceding ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/386781?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 08:12:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92eb5a0a-661c-4d34-9bf6-6848a8794b9a</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Now I&amp;#39;m able to parse the incoming image upload CBOR response in the &lt;span&gt;central_smp_client sample&lt;/span&gt;. So&amp;nbsp;to complete the image upload command, I just need to repeat the process and send all of image chunks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/386026?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 14:37:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c27d0d2-d7b9-493d-8f26-e25c55ff2662</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Check it out here:&amp;nbsp;&lt;a href="https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu"&gt;https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The code is really messy and not cleaned up at all. Sorry about that. I&amp;#39;m using nRF52840 DK on both sides by the way, but I don&amp;#39;t think that should matter.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Program the central_smp_client_dfu to one nRF5340 DK and the smp_svr sample to another nRF55340 DK (I used 52840 DK)&lt;/li&gt;
&lt;li&gt;Put the app_update.bin file into flash address 0xf6000 using jlink commander and loadbin&lt;/li&gt;
&lt;li&gt;Then press button 2 on the device running central_smp_client_dfu sample, to send the image upload command.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then you should receive&amp;nbsp;0x300c0101bf6272630636f66661820ff in response.&lt;/p&gt;
&lt;p&gt;You can see these bytes by adding the following piece of code to&amp;nbsp;C:\v2.0.0\nrf\subsys\bluetooth\services\dfu_smp.c--notify_process()&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;printk(&amp;quot;Received %d amount of bytes\n&amp;quot;, length);
printk(&amp;quot;Bytes: 0x&amp;quot;);
for(int x = 0;x &amp;lt; length; x++){
	printk(&amp;quot;%x&amp;quot;, ((uint8_t *)data)[x]);
}
printk(&amp;quot;\n&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Currently I&amp;#39;m struggling to parse the response in the app itself (using &lt;a href="https://github.com/simon-iversen/ncs_samples/blob/e0db279b815bc7e3c500e702412e1d65e1300a15/central_smp_client_dfu/src/main.c#L282-L318"&gt;this method&lt;/a&gt;). But using &lt;a href="https://cbor.me/"&gt;cbor.me&lt;/a&gt; I&amp;#39;m able to see that the received data corresponds to this:&lt;/p&gt;
&lt;p&gt;300c0101bf&amp;nbsp; &amp;nbsp;→&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;???&lt;/p&gt;
&lt;p&gt;627263&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;→&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;quot;rc&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;→&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;636f6666&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;→&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;off&amp;quot;&lt;/p&gt;
&lt;p&gt;1820 &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;→&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;32 (unsigned(32))&lt;/p&gt;
&lt;p&gt;ff&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span&gt;→&amp;nbsp; &amp;nbsp; &amp;nbsp;end of packet I think&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So you can see that it contains rc=0 and off=32&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let me know if you achieve any progress.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/386013?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 14:05:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5db692d-45a6-4788-a0c1-3ce4530b7841</guid><dc:creator>MaximSh</dc:creator><description>&lt;p&gt;Amazing.&lt;br /&gt;if it is ok i can also test it on my side, i have an image stored at the external flash that i downloaded and i can read data and send it.&lt;br /&gt;You can attach a code for this.&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: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/386006?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 13:53:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d431257-e7c5-4556-9058-afcd62152490</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;ve now put the app_update.bin file into flash of the device running the central_smp_client sample, then I read out the first 32 bytes containing the image header and sends it to the device running the smp_svr sample. The smp_svr side sends an &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/zephyr/services/device_mgmt/smp_groups/smp_group_1.html#image-upload-response"&gt;image upload response&lt;/a&gt; in return, with &amp;quot;rc&amp;quot;=0 and &amp;quot;off&amp;quot;=32.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/385599?ContentTypeID=1</link><pubDate>Sun, 11 Sep 2022 06:07:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:896a20bc-a1b3-4577-89b4-f1cfb80bfaf6</guid><dc:creator>MaximSh</dc:creator><description>&lt;p&gt;Thanks for update&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/385494?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 11:09:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05c03bdb-6948-43d8-a3bb-ec26ce56be2c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Some progress. Now I was able to sucessfully send the first packet of an image upload command and correctly parse it on the smp_svr side.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/385230?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 10:49:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:821ee192-9103-427d-8b0c-b11d6edc47cb</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I would like to inform you that I&amp;#39;m still working on this. I encountered some issues with the parsing of the image upload command on the smp_svr side, but I talked to a developer internally and got some tips on how to debug it. Will keep you updated.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/384176?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 14:05:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8a8144c-b2a9-4f02-900d-463d852634ee</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I will be gone until Monday and won&amp;#39;t be able to continue with this until then. My apologies for that.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/383859?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 10:26:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0b09b0d-754c-490a-8321-84fa0473bb76</guid><dc:creator>MaximSh</dc:creator><description>&lt;p&gt;Thanks for update.&lt;br /&gt;I was also created a reset command.&lt;br /&gt;still stack at image upload command.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/383853?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 10:04:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9037e696-6938-4db6-b1b2-867cc030cfaa</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Some update: I did some investigation on Friday and was easily able to integrate the reset command. Next, I tried to implement the image list command and encountered some issues. I had to modify the SDK two places to get rid of some error messages, and then a new error popped up. Will talk to some developers internally, continue to investigate and keep you updated.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send dfu image between two nrf5340</title><link>https://devzone.nordicsemi.com/thread/382992?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 06:36:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78ecac29-f9cb-4083-9c8f-e25fa059c964</guid><dc:creator>MaximSh</dc:creator><description>&lt;p&gt;Thank, waiting for update&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>