<?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 over UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106137/dfu-over-uart</link><description>Hi, 
 I&amp;#39;m using nrf connect SDK 2.3.0 with custom board, Now, I would like to be able to upgrade the firmware of the board in future, The DFU procedure should be performed over UART. 
 Hardware setup :- UART pins(rx) of a board (with nrf52833 soc) is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Nov 2023 11:37:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106137/dfu-over-uart" /><item><title>RE: DFU over UART</title><link>https://devzone.nordicsemi.com/thread/458061?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2023 11:37:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4214dd20-d2d9-450b-9c11-33a5805d166a</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Theja"]I also wanted to send a hex file rather than a bin file, but I tried using &amp;quot;zephyr.hex&amp;quot; and it didn&amp;#39;t work. Could you please advise me?[/quote]
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/mcumgr.html:"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/mcumgr.html:&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;&amp;quot;mcumgr&lt;/span&gt;&lt;/code&gt; does not understand .hex files, when uploading a new image always use the .bin file.&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU over UART</title><link>https://devzone.nordicsemi.com/thread/458044?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2023 10:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43f18550-3e32-4c99-bce1-d3acd9f3c068</guid><dc:creator>Theja</dc:creator><description>&lt;p&gt;Thank you for your support, it&amp;#39;s working after adding&lt;br /&gt;&amp;quot;&lt;span&gt;CONFIG_MCUMGR_CMD_IMG_MGMT&lt;/span&gt;&lt;span&gt;=y and&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_MCUMGR_CMD_OS_MGMT&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;I also wanted to send a hex file rather than a bin file, but I tried using &amp;quot;zephyr.hex&amp;quot; and it didn&amp;#39;t work. Could you please advise me?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU over UART</title><link>https://devzone.nordicsemi.com/thread/458003?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2023 08:24:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f47c58e0-848a-451a-bc6e-52077f62e674</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Theja"]I tried the your sample with &amp;quot;Hello world&amp;quot; application, I&amp;#39;m not able add&amp;nbsp;&amp;quot;CONFIG_MCUMGR_TRANSPORT_UART=y and[/quote]
&lt;p&gt;Which sample? I sent 3 samples.&lt;/p&gt;
[quote user="Theja"]However, the command &amp;quot;mcumgr --conntype serial --connstring &amp;quot;COM7&amp;quot; echo hello&amp;quot;&amp;nbsp; &amp;nbsp;is&amp;nbsp;not retuning &amp;quot;hello&amp;quot; and not getting timeout as error aswell, it just gives empty line like this[/quote]
&lt;p&gt;Echo is part of the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/smp_groups/smp_group_0.html"&gt;OS Management group&lt;/a&gt;, so you must enable&amp;nbsp; &lt;span&gt;CONFIG_MCUMGR_GRP_OS.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU over UART</title><link>https://devzone.nordicsemi.com/thread/457996?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2023 07:29:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ea3303b-dc91-49a2-801d-db8f4a8abb49</guid><dc:creator>Theja</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried the your sample with &amp;quot;Hello world&amp;quot; application, I&amp;#39;m not able add&amp;nbsp;&amp;quot;CONFIG_MCUMGR_TRANSPORT_UART=y and&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;CONFIG_MCUMGR_GRP_IMG=y&amp;quot; in prj.config instead I added &amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;CONFIG_MCUMGR_SMP_UART&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&amp;quot; and build it.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;However, the command &amp;quot;mcumgr --conntype serial --connstring &amp;quot;COM7&amp;quot; echo hello&amp;quot;&amp;nbsp; &amp;nbsp;is&amp;nbsp;not retuning &amp;quot;hello&amp;quot; and not getting timeout as error aswell, it just gives empty line like this&lt;/div&gt;
&lt;div&gt;&amp;quot;PS C:\hello_world&amp;gt; mcumgr --conntype serial --connstring &amp;quot;COM7&amp;quot; echo hello &lt;br /&gt;&lt;br /&gt;PS C:\hello_world&amp;gt; mcumgr --conntype serial --connstring &amp;quot;COM7&amp;quot; echo hello&lt;br /&gt;&lt;br /&gt;PS C:\hello_world&amp;gt;&amp;quot;&lt;br /&gt;&lt;br /&gt;I read somewhere like mcumgr uses uart0 for the image transfer, if that the case also custom board pins are as per the device tree file.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;prj.config file for your ref&lt;pre class="ui-code" data-mode="text"&gt;# nothing here
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUMGR=y
# CONFIG_MCUMGR_TRANSPORT_UART=y
# CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_SMP_UART=y

# CONFIG_MCUMGR_TRANSPORT_UART dependencies
CONFIG_BASE64=y

# CONFIG_MCUMGR_GRP_IMG dependencies
CONFIG_FLASH=y
CONFIG_IMG_MANAGER=y

# CONFIG_IMG_MANAGER dependencies
CONFIG_STREAM_FLASH=y

# CONFIG_MCUMGR dependencies
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y

# Required for CONFIG_IMG_MANAGER
CONFIG_FLASH_MAP=y&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Where might it be going wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU over UART</title><link>https://devzone.nordicsemi.com/thread/457787?ContentTypeID=1</link><pubDate>Tue, 28 Nov 2023 10:05:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:effbc796-a389-4613-ba0a-beb0044c5eca</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Can I suggest that you do Serial recovery from the bootloader instead? &lt;br /&gt;See &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/serial_recovery"&gt;Serial Recovery&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to do it from the apllicaiton, you can have a look at the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;SMP Server sample&lt;/a&gt; or my unofficial &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp/mcuboot_smp_uart"&gt;MCUBoot SMP simple sample&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>