<?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>Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116354/mcumgr-to-transfer-file-from-host-to-nrf52840-device-over-uart</link><description>&amp;quot;I&amp;#39;m working with nRF Connect SDK v2.2.0 for nrf52840 and I&amp;#39;m trying to implement file transfer functionality using mcumgr over UART in Application. I&amp;#39;ve successfully configured and verified firmware upgrade using mcumgr in mcuboot , but now I need to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Nov 2024 16:37:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116354/mcumgr-to-transfer-file-from-host-to-nrf52840-device-over-uart" /><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/511726?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2024 16:37:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0368324d-589b-408c-a330-3966f0e32c71</guid><dc:creator>MK_V</dc:creator><description>&lt;p&gt;Sure, Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/511568?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2024 19:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13819e4b-5118-4b5d-91b5-8ab023a2fd03</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;As &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/101419/mcumgr-uart-smp-speed-is-slow/434193"&gt;this post&lt;/a&gt; indicated&amp;nbsp;mcumgr is known to be quite slow.&lt;/p&gt;
&lt;p&gt;For now, see &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/86191/mcuboot-slow-with-nrf52840-zephyr-usb-cdc_acm-protocol"&gt;MCUBOOT slow with nRF52840 / Zephyr / USB CDC_ACM protocol&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;for how to speed up mcumgr or use&amp;nbsp;&lt;span&gt;other alternatives than mcumgr-native-cli.&amp;nbsp;&lt;/span&gt;&lt;span&gt;See&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.zephyrproject.org/latest/services/device_mgmt/mcumgr.html"&gt;https://docs.zephyrproject.org/latest/services/device_mgmt/mcumgr.html&lt;/a&gt;&lt;span&gt;&amp;nbsp;for a list. Most of these will be faster than the old tool.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/511549?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2024 16:28:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2549354a-e4cf-4f5a-a7c5-353d24aaca90</guid><dc:creator>MK_V</dc:creator><description>[quote userid="77782" url="~/f/nordic-q-a/116354/mcumgr-to-transfer-file-from-host-to-nrf52840-device-over-uart/511536"]I can increase&amp;nbsp;&lt;span&gt;CONFIG_MCUMGR_BUF_SIZE and&amp;nbsp;CONFIG_MCUMGR_SMP_UART_MTU to 2475 without issue by using the following command with my test project.&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;After this change, could you able to observe improvement in file transfer speed and overall upload time?&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/116354/mcumgr-to-transfer-file-from-host-to-nrf52840-device-over-uart/511536"]Check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/105501/using-smp-to-download-upload-files-from-fs-is-extremely-slow-in-compare-to-custom-service/457484"&gt;this post&lt;/a&gt;. Maybe you can try the latest version of NCS v2.8.0.[/quote]
&lt;p&gt;Thanks! I will check it out!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/511536?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2024 15:45:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31250ec9-763b-4a71-9614-305d627cfcb0</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="MK_V"]Is there any potential to reduce this transfer time?[/quote]
&lt;p&gt;Check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/105501/using-smp-to-download-upload-files-from-fs-is-extremely-slow-in-compare-to-custom-service/457484"&gt;this post&lt;/a&gt;. Maybe you can try the latest version of NCS v2.8.0.&lt;/p&gt;
[quote user="MK_V"]I have attempted to increase &lt;code&gt;CONFIG_MCUMGR_BUF_SIZE&lt;/code&gt; and utilize MTU values of 512 and 1024 as arguments for mcumgr, but these adjustments have not yielded any improvement.[/quote]
&lt;p&gt;I can increase&amp;nbsp;&lt;span&gt;CONFIG_MCUMGR_BUF_SIZE and&amp;nbsp;CONFIG_MCUMGR_SMP_UART_MTU to 2475 without issue by using the following command with my test project.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -p -b nrf52840dk_nrf52840 zephyr/samples/subsys/mgmt/mcumgr/smp_svr -- -DOVERLAY_CONFIG=&amp;#39;overlay-fs.conf;overlay-serial.conf&amp;#39; -DCONFIG_MCUMGR_BUF_SIZE=2475 -DCONFIG_MCUMGR_SMP_UART_MTU=2475 &amp;amp;&amp;amp; west flash --recover&lt;/pre&gt;&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/4530.pastedimage1732203916146v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/511509?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2024 14:18:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85a119f2-0f1c-4252-9b9d-e366028eaeb0</guid><dc:creator>MK_V</dc:creator><description>&lt;p&gt;Hi Amanda,&amp;nbsp;&lt;/p&gt;
&lt;p data-sourcepos="5:1-5:42"&gt;Thank you for providing the test project.&lt;/p&gt;
&lt;p data-sourcepos="7:1-7:105"&gt;I have incorporated some of the configuration settings from your code into my custom board&amp;#39;s source code.&amp;nbsp;Setting &lt;code&gt;CONFIG_MCUMGR_BUF_SIZE=2475&lt;/code&gt; resolved the UART issue for mcumgr in the application.&lt;/p&gt;
&lt;p data-sourcepos="11:1-11:79"&gt;Now I could be able to successfully transfer my complete file to the External Flash.&lt;/p&gt;
&lt;p data-sourcepos="13:1-13:151"&gt;However, I have noticed that transferring a 137 KB file takes approximately 1 minute and 10 seconds. Is there any potential to reduce this transfer time?&lt;/p&gt;
&lt;p data-sourcepos="15:1-15:174"&gt;I have attempted to increase &lt;code&gt;CONFIG_MCUMGR_BUF_SIZE&lt;/code&gt; and utilize MTU values of 512 and 1024 as arguments for mcumgr, but these adjustments have not yielded any improvement.&lt;br /&gt;&lt;br /&gt;I would appreciate any insights or suggestions on how to optimize this transfer process.&lt;/p&gt;
&lt;p data-sourcepos="15:1-15:174"&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;MK V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/511183?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2024 20:46:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b60c579d-2994-48d8-acdf-450e5d029f45</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;500KiB uploads work fine, but you need to have a flash device that you can store it on. For our DKs, that would mean having to move the fatfs/lfs partition to QSPI/SPI flash with CONFIG_PM_PARTITION_REGION_LITTLEFS_EXTERNAL. You can execute &amp;quot;ninja partition_manager_report&amp;quot; command under the build folder to check the memory layout and size large enough for the upload file:&lt;br /&gt;&lt;br /&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/pastedimage1732049112425v1.png" alt=" " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My test project for nRF52840DK with spi external flash:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/smp_5F00_svr.7z"&gt;devzone.nordicsemi.com/.../smp_5F00_svr.7z&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/510934?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2024 15:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52f01eec-1f70-435d-8a24-047c3ad0e651</guid><dc:creator>MK_V</dc:creator><description>&lt;p&gt;Hi Amanda,&amp;nbsp;&lt;br /&gt;Any config changes help to break this limitation? &lt;br /&gt;Could you able to&amp;nbsp;upload 500kb of file using mcumgr over UART?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks,&lt;/p&gt;
&lt;p&gt;MK V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/510784?ContentTypeID=1</link><pubDate>Sat, 16 Nov 2024 05:27:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ee92321-c625-4e79-ba70-d96bd68c1a75</guid><dc:creator>MK_V</dc:creator><description>&lt;p&gt;++++&lt;br /&gt;In this exercise, i tried to&lt;span&gt;&amp;nbsp;determine the least&amp;nbsp;number of characters in the file that I can transfer. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here the number of characters included in the file is 35, also same it showed it written 35 bytes in the console.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;C:\Users\MK\Downloads\serial_upgrade&amp;gt;mcumgr --conntype serial --connstring &amp;quot;COM10,baud=115200&amp;quot; fs upload mu108_kb.txt /lfs1/mu108_kb.txt&lt;br /&gt;35&lt;br /&gt;Done&lt;/p&gt;
&lt;p&gt;Here after added extra one character to the mu108_kb.txt for successive cases.&lt;/p&gt;
&lt;p&gt;C:\Users\MK\Downloads\serial_upgrade&amp;gt;mcumgr --conntype serial --connstring &amp;quot;COM10,baud=115200&amp;quot; fs upload mu108_kb.txt /lfs1/mu108_kb.txt&lt;br /&gt;36&lt;br /&gt;Done&lt;/p&gt;
&lt;p&gt;C:\Users\MK\Downloads\serial_upgrade&amp;gt;mcumgr --conntype serial --connstring &amp;quot;COM10,baud=115200&amp;quot; fs upload mu108_kb.txt /lfs1/mu108_kb.txt&lt;br /&gt;37&lt;br /&gt;Done&lt;/p&gt;
&lt;p&gt;C:\Users\MK\Downloads\serial_upgrade&amp;gt;mcumgr --conntype serial --connstring &amp;quot;COM10,baud=115200&amp;quot; fs upload mu108_kb.txt /lfs1/mu108_kb.txt&lt;br /&gt;38&lt;br /&gt;Done&lt;/p&gt;
&lt;p&gt;C:\Users\MK\Downloads\serial_upgrade&amp;gt;mcumgr --conntype serial --connstring &amp;quot;COM10,baud=115200&amp;quot; fs upload mu108_kb.txt /lfs1/mu108_kb.txt&lt;br /&gt;Error: NMP timeout&lt;br /&gt;&lt;br /&gt;Maximum character I could transfer&amp;nbsp;using&amp;nbsp;mcumgr over UART is 38 bytes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you elaborate me on this transfer limitation and What is the possibilities to transfers 500kB of file over uart using mcumgr on application?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;/p&gt;
&lt;p&gt;MK V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/510782?ContentTypeID=1</link><pubDate>Sat, 16 Nov 2024 04:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:daa2382f-6982-4a66-b350-ecfc72c58e48</guid><dc:creator>MK_V</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Thank you for your reply!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I could be able to run the smp server, that you cited&amp;nbsp;and&amp;nbsp;able to transfer small files.&lt;br /&gt;My use case is to transfer 300kB of file to Filesystem, but It did not succeed. Even I tried low sized file, 108kB of file size, but it also failed with timeout. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Here&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;mu.txt file size is 1kB&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;mu108_kb.txt file size is108kB&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;C:\Users\MK\Downloads\serial_upgrade&amp;gt;mcumgr --conntype serial --connstring &amp;quot;COM10,baud=115200&amp;quot; fs upload mu.txt /lfs1/mu.txt&lt;br /&gt;12&lt;br /&gt;Done&lt;/p&gt;
&lt;p&gt;C:\Users\MK\Downloads\serial_upgrade&amp;gt;mcumgr --conntype serial --connstring &amp;quot;COM10,baud=115200&amp;quot; fs upload mu108_kb.txt /lfs1/mu108_kb.txt&lt;br /&gt;Error: NMP timeout&lt;/p&gt;
&lt;p&gt;Any suggestion?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;/p&gt;
&lt;p&gt;MK V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcumgr to transfer file from host to nrf52840 device over uart</title><link>https://devzone.nordicsemi.com/thread/510563?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 19:17:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:984764ab-2f82-4e62-b7f1-388017f73b5c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can refer to&amp;nbsp;&lt;span&gt;the&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;SMP server&lt;/a&gt;&amp;nbsp;sample.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I use this command&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -p -b nrf52840dk_nrf52840 zephyr/samples/subsys/mgmt/mcumgr/smp_svr -- -DOVERLAY_CONFIG=&amp;#39;overlay-fs.conf;overlay-serial.conf&amp;#39; &amp;amp;&amp;amp; west flash --recover&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;and get&amp;nbsp;&lt;br /&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/pastedimage1731611800625v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>