<?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>USB-Serial DFU to nRF52840 on nRF91 DK Board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44209/usb-serial-dfu-to-nrf52840-on-nrf91-dk-board</link><description>Hello, thank you for taking time to review this. I am trying to setup a serial DFU setup for the nRF52 on the nRF91 DK board. I am running into problems getting it to work and understanding it in general. I looked at several pages trying to help myself</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Mar 2019 13:12:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44209/usb-serial-dfu-to-nrf52840-on-nrf91-dk-board" /><item><title>RE: USB-Serial DFU to nRF52840 on nRF91 DK Board</title><link>https://devzone.nordicsemi.com/thread/175934?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 13:12:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8838058-b58b-4350-9b28-2ac9266658cc</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Could you try to enable logging, and see if you get any error codes somewhere?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-Serial DFU to nRF52840 on nRF91 DK Board</title><link>https://devzone.nordicsemi.com/thread/174393?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 23:22:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9bd75ce-41be-42fa-932d-2cf3ec81344d</guid><dc:creator>OryF</dc:creator><description>&lt;p&gt;Thank you for this, I appreciate it.&lt;br /&gt;&lt;br /&gt;I can get the image of whatever sample (currently hello world) to load into slot-1, but then it always stays in &amp;quot;pending&amp;quot; as a flag after a test is issued, even though I issue a reset afterwards. I loaded the signed image, issued a list, saw a flag of nothing, used the hash form the list with the test command, saw a flag of pending, then issued a reset command. The original program loaded and when I did a list again it stayed as status pending.&lt;br /&gt;&lt;br /&gt;Also it lists nothing at all for slot0 even though smp_svr is running on it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-Serial DFU to nRF52840 on nRF91 DK Board</title><link>https://devzone.nordicsemi.com/thread/174202?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 09:50:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e162133e-90d4-40c4-a030-ddb92700fd2e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you&amp;nbsp;build and flash the smp_svr, with pr.conf&amp;nbsp;&lt;span&gt;CONFIG_MCUMGR_SMP_UART=y ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="73248" url="~/f/nordic-q-a/44209/usb-serial-dfu-to-nrf52840-on-nrf91-dk-board/173344"]And when attempting to move a signed image via mcumgr I get:[/quote]
&lt;p&gt;What command did you use ? Something like this?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;sudo mcumgr -t 60 --conntype serial --connstring=&amp;#39;dev=/dev/ttyACM0,
baud=115200&amp;#39; image upload signed.bin&lt;/pre&gt;&lt;/p&gt;
[quote userid="73248" url="~/f/nordic-q-a/44209/usb-serial-dfu-to-nrf52840-on-nrf91-dk-board"]3) ~/&amp;lt;path/to/source&amp;gt;/ncs/mcuboot/scripts/imgtool.py sign \&lt;br /&gt;--key ~/&amp;lt;path/to/source&amp;gt;/ncs/mcuboot/root-rsa-2048.pem \&lt;br /&gt;--header-size 0x200 \&lt;br /&gt;--align 8 \&lt;br /&gt;--version 1.0 \&lt;br /&gt;--slot-size 0x69000 --pad-header \&lt;br /&gt;./zephyr/zephyr.hex b_signed.hex[/quote]
&lt;p&gt;The&amp;nbsp;mcumgr cli might only work with bin-files, so try zephyr/zephyr.bin signed.bin instead.&lt;/p&gt;
&lt;p&gt;Are you able to do a image list?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;sudo mcumgr -t 60 --conntype serial --connstring=&amp;#39;dev=/dev/ttyACM0,
baud=115200&amp;#39; image list&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It should give an output similar to this before the DFU is performed:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Images:
slot=0
version: 1.0.0
bootable: true
flags: active confirmed
hash:
b7c2f11913e061639f8c78e2b92de2867670841ed1b8386264cfb118dd5e611c
Split status: N/A (0)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And after the DFU, you should be able to see images in both slot 0 and slot 1.&lt;/p&gt;
&lt;p&gt;In order to instruct MCUboot to swap the images we need to test the image first, making sure it boots:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;sudo mcumgr -t 60 --conntype serial --connstring=&amp;#39;dev=/dev/ttyACM0,
baud=115200&amp;#39; image test
6869bd755d54c82c14bc1c2d19e566ceb227307c0703bc87e0a91ace87ec5e42&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Replace the hash at the end of the command with the correct one given in the output from the image list command. You can now run the newly uploaded image by performing a soft reset of the board:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;sudo mcumgr -t 60 --conntype serial --connstring=&amp;#39;dev=/dev/ttyACM0,
baud=115200&amp;#39; reset&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-Serial DFU to nRF52840 on nRF91 DK Board</title><link>https://devzone.nordicsemi.com/thread/174080?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 17:07:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4cd11da-025c-43c2-a83a-b4db83eac204</guid><dc:creator>OryF</dc:creator><description>&lt;p&gt;Sorry to bump, just need some guidance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-Serial DFU to nRF52840 on nRF91 DK Board</title><link>https://devzone.nordicsemi.com/thread/173789?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 22:25:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3b2d388-4e36-4a37-96bc-a62be33165f3</guid><dc:creator>OryF</dc:creator><description>&lt;p&gt;UPDATE&lt;br /&gt;&lt;br /&gt;So I moved to just using cmake and noticed in the Makefile a menuconfig option existed. So I explored that and saw I could specify the offset I wanted the image to be loaded at here. I could do the same for the bootloader. I set the bootloader to not verify the image on boot (just to simplify for now) and then flashed it, an of course it prints &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***** Booting Zephyr OS v1.13.99-ncs2 *****&lt;br /&gt;on boot. I then configured the offset on the hello_world image for slot0_partition. When I have &lt;code&gt;CONFIG_BOOTLOADER_MCUBOOT&lt;/code&gt; enabled it acts like only the bootloader image exists, and prints the same thing. If I disable &lt;code&gt;CONFIG_BOOTLOADER_MCUBOOT&lt;/code&gt; then it prints out my custom bootloader message and my example image. This makes me think that maybe I am uploading the image and the bootloader to the offset which would explain why it doesn&amp;#39;t change its boot behavior when &lt;code&gt;CONFIG_BOOTLOADER_MCUBOOT&lt;/code&gt; is enabled, because slot0 would have the new bootloader image and the application image in it. I could obviously be wrong. I also tried uploading signed both ways and got the same results as the unsigned method. I am still just trying to pass in an original image, have it execute that, then once that works pass in an image to slot1 and have it swap to that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB-Serial DFU to nRF52840 on nRF91 DK Board</title><link>https://devzone.nordicsemi.com/thread/173344?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 00:37:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55cab5b6-6d4d-46fd-8f98-2d47d3d2e8a9</guid><dc:creator>OryF</dc:creator><description>&lt;p&gt;Also tried downloading a signed at 0x69000 .bin of a file with dfu-util&lt;br /&gt;--from example &lt;span class="go"&gt;(dfu-util --alt 1 --download signed-hello.bin&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;dfu-util: Invalid DFU suffix signature&lt;br /&gt;dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!&lt;br /&gt;Deducing device DFU version from functional descriptor length&lt;br /&gt;Opening DFU capable USB device...&lt;br /&gt;ID 05ac:821d&lt;br /&gt;Run-time device DFU version 0100&lt;br /&gt;Claiming USB DFU Runtime Interface...&lt;br /&gt;Determining device status: state = appIDLE, status = 0&lt;br /&gt;Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;Resetting USB...&lt;br /&gt;Deducing device DFU version from functional descriptor length&lt;br /&gt;dfu-util: Lost device after RESET?&lt;br /&gt;&lt;br /&gt;And when attempting to move a signed image via mcumgr I get:&lt;/p&gt;
&lt;p&gt;Error: NMP timeout&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>