<?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>Upgrade firmware from gateway to node over using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70419/upgrade-firmware-from-gateway-to-node-over-using-nrf-connect-sdk</link><description>Base Samples used - 
 1. Central DFU SMP Client - &amp;lt;ncs&amp;gt;/nrf/samples/bluetooth/central_dfu_smp 
 2. SMP Server sample - &amp;lt;ncs&amp;gt;/zephyr/samples/subsys/mgmt/mcumgr/smp_svr 
 
 Procedure followed - 
 1. In the SMP Server sample, commented out &amp;quot;CONFIG_MCUMGR_CMD_FS_MGMT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Jan 2021 16:02:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70419/upgrade-firmware-from-gateway-to-node-over-using-nrf-connect-sdk" /><item><title>RE: Upgrade firmware from gateway to node over using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/289496?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 16:02:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e30e910c-5a42-46fc-a736-c8a3001053ff</guid><dc:creator>Anirudh Agarkhed</dc:creator><description>&lt;p&gt;Fixed the issue. In that snippet, used CBOR Byte String encode instead of text string encode, and converted the firmware_hash_sha to upper case hex representation (i.e. 0xae to 0xAE). TEST and Confirm swap types are working now. Thank you for spending time on the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrade firmware from gateway to node over using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/289430?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 13:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88bc4cf9-636d-4dc2-93a0-2e55a348ec83</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;ll look into this the upcoming Monday/Tuesday.&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: Upgrade firmware from gateway to node over using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/289080?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 08:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7125bf33-03b4-471a-91d6-7976532f36ea</guid><dc:creator>Anirudh Agarkhed</dc:creator><description>&lt;p&gt;I understood the steps to complete the DFU. As of now, I could do the steps &amp;quot;image upload&amp;quot;, &amp;quot;image list&amp;quot;, &amp;quot;reset&amp;quot; successfully. Now facing this issue - Image uploads successfully, and on &amp;quot;image list&amp;quot; command, I get both the slots listed. However when I send &amp;quot;image confirm&amp;quot; using following header and payload, state does not change to &amp;quot;pending&amp;quot;:true, which would be required for the slot 1 image to boot up.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;cbor_buf_writer_init(&amp;amp;writer, smp_cmd.payload, sizeof(smp_cmd.payload));
cbor_encoder_init(&amp;amp;cbor, &amp;amp;writer.enc, 0);
cbor_encoder_create_map(&amp;amp;cbor, &amp;amp;cbor_map, 2);

	
cbor_encode_text_stringz(&amp;amp;cbor_map, &amp;quot;confirm&amp;quot;);
cbor_encode_boolean(&amp;amp;cbor_map, true);

cbor_encode_text_stringz(&amp;amp;cbor_map, &amp;quot;hash&amp;quot;);
cbor_encode_text_string(&amp;amp;cbor_map, firmware_hash_sha, strlen(firmware_hash_sha));
	
cbor_encoder_close_container(&amp;amp;cbor, &amp;amp;cbor_map);

payload_len = (size_t)(writer.ptr - smp_cmd.payload);

smp_cmd.header.op = 2;
smp_cmd.header.flags = 0;
smp_cmd.header.len_h8 = (uint8_t)((payload_len &amp;gt;&amp;gt; 8) &amp;amp; 0xFF);
smp_cmd.header.len_l8 = (uint8_t)((payload_len &amp;gt;&amp;gt; 0) &amp;amp; 0xFF);
smp_cmd.header.group_h8 = 0;
smp_cmd.header.group_l8 = 1;
smp_cmd.header.seq = 0;
smp_cmd.header.id = 0;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;What should be the header and payload for &amp;quot;image test&amp;quot; and &amp;quot;image confirm&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrade firmware from gateway to node over using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/289071?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 07:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a53c1da1-4770-4f1b-8e81-cc63d318cb23</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I tried to follow your points, but I did not understand what you&amp;#39;re were trying to do. If you could add some explanations&amp;nbsp;to each step, that would be nice.&lt;/p&gt;
&lt;p&gt;I do not have too much in-depth knowldege about CBOR, but I think I know what needs to be done in order to achieve your goal: &lt;em&gt;&amp;quot;uploading a firmware image and boot it, from Zephyr (NCS) to Zephyr (NCS) running nodes&amp;quot;.&amp;nbsp;&lt;/em&gt;I think you have to copy the function&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/fae9b2c7ac66bb7ce985edab4ee6a8032106458f/samples/bluetooth/central_dfu_smp/src/main.c#L317-L346"&gt;send_smp_echo()&lt;/a&gt;&amp;nbsp;into several function,&amp;nbsp;to make it possible to issue the commands&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.1/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html#upload-the-signed-image"&gt;image upload&lt;/a&gt;,&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html#list-the-images"&gt;image list&lt;/a&gt;, &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.1/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html#test-the-image"&gt;image test&lt;/a&gt;,&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.1/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html#reset-remotely"&gt;reset&lt;/a&gt;&amp;nbsp;and &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.1/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html#confirm-new-image"&gt;image confirm&lt;/a&gt;. In addition to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.1/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html#sample-image-hello-world"&gt;echo command&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then&amp;nbsp;you can store a .bin file with the image to be upload on the device (or external flash) with the&amp;nbsp;&lt;span&gt;central_dfu_smp sample and transfer it over BLE to another device with the smp_svr sample.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re unsure how to go about this, please ask, and I will do some more investigation and try to assist you.&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></channel></rss>