<?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>Secure Serial DFU not working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35262/secure-serial-dfu-not-working</link><description>I am using the bootloader_secure_serial example from the SDK 14.0.0 on a 523832 DK. I have erased the device and flashed the softdevice and bootlader on it. The LED1 is turned on after restart, so the bootloader is in DFU mode. 
 I am having trouble testing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Jun 2018 08:43:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35262/secure-serial-dfu-not-working" /><item><title>RE: Secure Serial DFU not working</title><link>https://devzone.nordicsemi.com/thread/138033?ContentTypeID=1</link><pubDate>Thu, 28 Jun 2018 08:43:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:906d452e-f2e1-4e60-9a73-b1306c88c7a6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Did it work for lower baudrates? I am assuming that you are using hardware flow control in UART. If not, then there is a high possibility of buffer overflows at this high data rate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU not working</title><link>https://devzone.nordicsemi.com/thread/137757?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 18:10:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8c17495-8f35-4919-9fb4-a75ee017f27f</guid><dc:creator>Anantha Keshava</dc:creator><description>&lt;p&gt;I&amp;#39;m facing a similar issue. Here are the steps followed by me:&lt;/p&gt;
&lt;p&gt;Environment:&lt;/p&gt;
&lt;p&gt;Dev OS: Linux 18.04 LTS&lt;/p&gt;
&lt;p&gt;SDK version 15.0.0&lt;/p&gt;
&lt;p&gt;Target: nRF52840-Preview DK&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I erased the flash: $&amp;nbsp;nrfjprog -f NRF52 --recover&lt;/li&gt;
&lt;li&gt;I flashed the softdevice: $&amp;nbsp;nrfjprog --program ~/workspace/src/SDK/components/softdevice/s140/hex/s140_nrf52_6.0.0_softdevice.hex --sectorerase --log&lt;/li&gt;
&lt;li&gt;I flashed the bootloader settings:&amp;nbsp;$ nrfjprog -f nrf52 --program bl_settings.hex --sectorerase --log --reset&lt;/li&gt;
&lt;li&gt;I flashed the secure bootloader uart example: $ nrfjprog -f nrf52 --program _build/nrf52840_xxaa_mbr.hex --sectoranduicrerase --log --reset&lt;br /&gt;Please note that in this step, only changes made by me are:
&lt;ol&gt;
&lt;li&gt;Changed the dfu keys&lt;/li&gt;
&lt;li&gt;increased the serial baud rate to 1M in ~/workspace/src/SDK/examples/dfu/secure_bootloader/pca10056_uart/config/sdk_config.h&lt;/li&gt;
&lt;li&gt;This should technically work as the uart example worked with flow control kept ON&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;I create a sample package based on ble_app_hrs_freertos with nrfutil and try to update this with the DFU serial using the command: $ sudo nrfutil dfu serial -pkg build/ble_app_freertos_gcc_nrf52.zip -p /dev/ttyACM0 -b 1000000
&lt;p&gt;[------------------------------------] 0%&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;Hang here&amp;gt;^C&lt;/p&gt;
&lt;p&gt;Aborted!&lt;br /&gt;$ sudo nrfutil dfu serial -pkg build/ble_app_freertos_gcc_nrf52.zip -p /dev/ttyACM0 -b 1000000 -fc 1&lt;br /&gt; [------------------------------------] 0%&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt; File &amp;quot;/usr/local/bin/nrfutil&amp;quot;, line 11, in &amp;lt;module&amp;gt;&lt;br /&gt; load_entry_point(&amp;#39;nrfutil==3.5.1&amp;#39;, &amp;#39;console_scripts&amp;#39;, &amp;#39;nrfutil&amp;#39;)()&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/click/core.py&amp;quot;, line 722, in __call__&lt;br /&gt; return self.main(*args, **kwargs)&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/click/core.py&amp;quot;, line 697, in main&lt;br /&gt; rv = self.invoke(ctx)&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/click/core.py&amp;quot;, line 1066, in invoke&lt;br /&gt; return _process_result(sub_ctx.command.invoke(sub_ctx))&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/click/core.py&amp;quot;, line 1066, in invoke&lt;br /&gt; return _process_result(sub_ctx.command.invoke(sub_ctx))&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/click/core.py&amp;quot;, line 895, in invoke&lt;br /&gt; return ctx.invoke(self.callback, **ctx.params)&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/click/core.py&amp;quot;, line 535, in invoke&lt;br /&gt; return callback(*args, **kwargs)&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/nordicsemi/__main__.py&amp;quot;, line 745, in serial&lt;br /&gt; do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, True)&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/nordicsemi/__main__.py&amp;quot;, line 680, in do_serial&lt;br /&gt; dfu.dfu_send_images()&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py&amp;quot;, line 129, in dfu_send_images&lt;br /&gt; self._dfu_send_image(self.manifest.application)&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py&amp;quot;, line 90, in _dfu_send_image&lt;br /&gt; self.dfu_transport.open()&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_serial.py&amp;quot;, line 206, in open&lt;br /&gt; if self.__ping() == True:&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_serial.py&amp;quot;, line 321, in __ping&lt;br /&gt; resp = self.dfu_adapter.get_message() # Receive raw reponse to check return code&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_serial.py&amp;quot;, line 133, in get_message&lt;br /&gt; byte = self.serial_port.read(1)&lt;br /&gt; File &amp;quot;/home/akeshava/.local/lib/python2.7/site-packages/serial/serialposix.py&amp;quot;, line 501, in read&lt;br /&gt; &amp;#39;device reports readiness to read but returned no data &amp;#39;&lt;br /&gt;serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)&lt;/p&gt;
Does this mean that we can&amp;#39;t use DFU over serial at 1M baud rate?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU not working</title><link>https://devzone.nordicsemi.com/thread/135693?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 08:44:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a24380b-fbe7-4d6e-a9aa-6556f9ccb445</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which exact OS do you use? Do you also have a&amp;nbsp;/dev/ttyACM&lt;strong&gt;x&lt;/strong&gt; device that represent the serial port?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU not working</title><link>https://devzone.nordicsemi.com/thread/135600?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 13:24:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b63d7fbb-fecc-4b72-a73a-f370a62a001d</guid><dc:creator>Rok Cesnovar</dc:creator><description>&lt;p&gt;I have disabled the HW flow control and I am now getting this error:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NordicSemiException: Unexpected Executed OP_CODE.
Expected: 0x03 Received: 0x60
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Can you guys give me any pointers as to what is wrong here. I am using the _debug project and the ble_app_buttonless_duf_without_bonds zip file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU not working</title><link>https://devzone.nordicsemi.com/thread/135534?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 10:44:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f0c1e32-745c-42d0-86f5-fd5c73d15979</guid><dc:creator>Rok Cesnovar</dc:creator><description>&lt;p&gt;Thanks Einar! This got me a bit further now. LED1 and 4 are lit, but I am now gettint the following error:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;raise NordicSemiException(&amp;#39;Did not receive checksum response from DFU target. &amp;#39;
pc_ble_driver_py.exceptions.NordicSemiException: Did not receive checksum response from DFU target. If MSD is enabled on the target device, try to disable it ref. wiki.segger.com/index.php&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU not working</title><link>https://devzone.nordicsemi.com/thread/135518?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 09:09:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78060766-f067-4aec-bc87-6d8101209fe4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are LED 1 and LED 4 on the DK lit to indicate that the bootloader is in DFU mode? If not, have you remembered to flash the SoftDevice? It is needed by the bootloader in SDK 14 even if it is not using BLE. The following set of commands&amp;nbsp;should work out of the box with the serial DFU example images from SDK 14.0.0 (&lt;code&gt;&amp;lt;SDK 14.0.0&amp;gt;\examples\dfu\secure_dfu_test_images\serial\nrf52832&lt;/code&gt;):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="batchfile"&gt;λ nrfjprog.exe -e
Erasing user available code and UICR flash areas.
Applying system reset.

λ nrfjprog.exe --program softdevice_s132.hex
Parsing hex file.
Reading flash area to program to guarantee it is erased.
Checking that the area to write is not protected.
Programming device.

λ nrfjprog.exe --program bootloader_secure_serial_debug_without_bonds_s132.hex --reset
Parsing hex file.
Reading flash area to program to guarantee it is erased.
Checking that the area to write is not protected.
Programming device.
Applying system reset.
Run.

λ nrfutil dfu serial -pkg ble_app_buttonless_dfu_without_bonds_s132.zip -p COM25 -b 115200 -fc 1
  [####################################]  100%
Device programmed.&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>