<?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>raspberrypi4 linux mcumgr to nrf5340pdk_smp_svr dfu ota ble image upload</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69920/raspberrypi4-linux-mcumgr-to-nrf5340pdk_smp_svr-dfu-ota-ble-image-upload</link><description>Hello Nordicsemi Community, 
 I am attempting to update the firmware of nrf5340pdk cpuapp from a mcumgr cli running on a raspberry pi 4 linux. From the logs, it seems the transfer never begins. I am able to echo a hello from the smp_svr via the mcumgr</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Dec 2020 10:14:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69920/raspberrypi4-linux-mcumgr-to-nrf5340pdk_smp_svr-dfu-ota-ble-image-upload" /><item><title>RE: raspberrypi4 linux mcumgr to nrf5340pdk_smp_svr dfu ota ble image upload</title><link>https://devzone.nordicsemi.com/thread/286976?ContentTypeID=1</link><pubDate>Wed, 30 Dec 2020 10:14:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c1c87b7-bca1-41d5-a762-a7511f0c2847</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;Good to hear that it starts at least. Does it stop at the same amount of KiB every time? If possible, could you enable debug level logging in the smp_svr sample, as well for BT? The latter can be enabled with &amp;quot;CONFIG_BT_DEBUG_LOG=y&amp;quot;?&amp;nbsp; A BLE Sniffer trace could be helpful aswell.&lt;br /&gt;&lt;br /&gt;Could you also share your prj.conf for both the app and hci_rpmsg, as well as the &amp;quot;overlay-bt.conf&amp;quot;?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberrypi4 linux mcumgr to nrf5340pdk_smp_svr dfu ota ble image upload</title><link>https://devzone.nordicsemi.com/thread/286862?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2020 14:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f2f1c2b-dd28-43d8-a189-56dd10e0b18d</guid><dc:creator>ho-gyun choi</dc:creator><description>&lt;p&gt;Thank you for the suggestion, uploading app_update.bin instead of merged.hex indeed does progress the image upload beyond 0%.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_update.bin 
 4.39 KiB / 134.03 KiB [===&amp;gt;-----------------------------------------------------------------------------------------------------------------]   3.27% 165 B/s 04m14sError: ImageUpload unexpected error after 0/137248 bytes
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Connection timeout on upload reattempt:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The issue that I am facing now regarding smp_svr mcumgr dfu ota is that if the image update via the cli fails before fully uploading the image, any reattempts fails with connection timeout. The workaround is to reboot the board running smp_svr.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_update.bin 
 4.39 KiB / 134.03 KiB [===&amp;gt;-----------------------------------------------------------------------------------------------------------------]   3.27% 165 B/s 04m14sError: ImageUpload unexpected error after 0/137248 bytes
pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_update.bin 
Error: Failed to connect to peer after 10s
pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_update.bin 
Error: Failed to connect to peer after 10s
pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_update.bin 
Error: ATT request failed: input channel closed: io: read/write on closed pipe
pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_update.bin 
 28.01 KiB / 134.03 KiB [========================&amp;gt;-------------------------------------------------------------------------------------------]  20.90% 218 B/s 06m45sError: ImageUpload unexpected error after 0/137248 bytes
pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_update.bin 
Error: Failed to connect to peer after 10s
pi@raspberrypi:~ $ 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;output from smp_svr:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Welcome to minicom 2.7.1

OPTIONS: I18n 
Compiled on May  6 2018, 08:02:47.
Port /dev/ttyACM2

Press CTRL-A Z for help on special keys

m_rpmsg: data_sem given off!
[00:00:31.650,543] &amp;lt;inf&amp;gt; main_thread_task: sent a message!
[00:00:31.650,543] &amp;lt;i*** Booting Zephyr OS build v2.4.0-ncs1  ***
[00:00:00.257,446] &amp;lt;inf&amp;gt; mcuboot: Starting bootloader
[00:00:00.263,671] &amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
[00:00:00.273,773] &amp;lt;inf&amp;gt; mcuboot: Boot source: none
[00:00:00.279,266] &amp;lt;inf&amp;gt; mcuboot: Swap type: none
[00:00:00.491,210] &amp;lt;inf&amp;gt; mcuboot: Bootloader chainload address offset: 0x10000
[00:00:00.499,023] &amp;lt;inf&amp;gt; mcuboot: Jumping to the first image slot
*** Booting Zephyr OS build v2.4.0-ncs1  ***


[00:00:00.005,950] &amp;lt;inf&amp;gt; littlefs: LittleFS version 2.2, disk version 2.0
[00:00:00.006,103] &amp;lt;inf&amp;gt; littlefs: FS at NRF_FLASH_DRV_NAME:0xfa000 is 6 0x1000-byte blocks with 512 cycle
[00:00:00.006,134] &amp;lt;inf&amp;gt; littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.006,347] &amp;lt;inf&amp;gt; littlefs: /lfs mounted
[00:00:00.013,824] &amp;lt;inf&amp;gt; smp_sample: build time: Dec 28 2020 14:44:46
[00:00:00.036,956] &amp;lt;inf&amp;gt; smp_bt_sample: Bluetooth initialized
[00:00:00.042,114] &amp;lt;inf&amp;gt; smp_bt_sample: Advertising successfully started
[00:00:09.722,656] &amp;lt;inf&amp;gt; smp_bt_sample: Connected
[00:00:13.041,625] &amp;lt;inf&amp;gt; mcumgr_flash_mgmt: Erased 0x22000 bytes of image slot
[00:00:13.129,394] &amp;lt;inf&amp;gt; mcumgr_flash_mgmt: Erased 0x1000 bytes of image slot trailer
[00:02:03.591,827] &amp;lt;wrn&amp;gt; bt_hci_core: Not reporting packet for non-connected conn
[00:02:03.591,918] &amp;lt;inf&amp;gt; smp_bt_sample: Disconnected (reason 0x08)
[00:02:03.597,076] &amp;lt;inf&amp;gt; smp_bt_sample: Advertising successfully started
[00:02:05.802,856] &amp;lt;inf&amp;gt; smp_bt_sample: Connected
uart:~$ 
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberrypi4 linux mcumgr to nrf5340pdk_smp_svr dfu ota ble image upload</title><link>https://devzone.nordicsemi.com/thread/286806?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2020 09:46:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4dc8b9f-6ae3-4516-ac75-2debb25b8410</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;Could you try to upload the binary image(app_update.bin) instead? It should be located in the same folder. The mcumgr does not support uploading .hex images as far as I know.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberrypi4 linux mcumgr to nrf5340pdk_smp_svr dfu ota ble image upload</title><link>https://devzone.nordicsemi.com/thread/286747?ContentTypeID=1</link><pubDate>Mon, 28 Dec 2020 14:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50391e33-c764-4c78-af97-8568cebed31f</guid><dc:creator>ho-gyun choi</dc:creator><description>&lt;p&gt;Attempting to upload the app_signed.hex from /smp_svr/build/zephyr yields the same result with the 0% upload progress.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image list
Images:
 image=0 slot=0
    version: 0.0.0
    bootable: true
    flags: active confirmed
    hash: 5c1c72030a7d0c3e5588b387d43a176a4947b25468283acf7b3dfbfaf9691865
Split status: N/A (0)
pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_signed.hex 
Error: ATT request failed: input channel closed: io: read/write on closed pipe
pi@raspberrypi:~ $ sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name=&amp;#39;Zephyr&amp;#39; image upload app_signed.hex 
 0 B / 368.64 KiB [-----------------------------------------------------------------------------------------------------------------------------------------]   0.00%Error: ImageUpload unexpected error after 0/377492 bytes
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;mcumgr is able to obtain the list of active images on the board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: raspberrypi4 linux mcumgr to nrf5340pdk_smp_svr dfu ota ble image upload</title><link>https://devzone.nordicsemi.com/thread/286696?ContentTypeID=1</link><pubDate>Mon, 28 Dec 2020 13:07:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02d044d0-f357-4c29-a6b9-888107828fd9</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi, On3!&lt;br /&gt;&lt;br /&gt;Could you try to upload the &amp;quot;&lt;span&gt;app_update.bin&amp;quot; image instead of &amp;quot;merged.hex&amp;quot; and see if that improves anything?&lt;br /&gt;&lt;br /&gt;PS: The Holiday season is upon us, which will leave the Nordic support team understaffed until January 4th, 2021. This means that delayed replies will occur during this time. Sorry about the inconvenience and happy Holidays!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>