<?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>nRF52832 Serial DFU - Transfer Init Packet - No Response after &amp;quot;Execute Command&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33852/nrf52832-serial-dfu---transfer-init-packet---no-response-after-execute-command</link><description>Hi, 
 I am currently implementing the protocol for a serial DFU, following the instructions given here: 
 https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Flib_dfu_transport_serial.html&amp;amp;cp=4_0_0_3_5_2_3 . 
 
 The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 May 2018 09:43:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33852/nrf52832-serial-dfu---transfer-init-packet---no-response-after-execute-command" /><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/132702?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 09:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d1d1405-cf58-489b-ae2e-3d5aecafeeb8</guid><dc:creator>c.arndt</dc:creator><description>&lt;p&gt;I figured out it was some watchdog issue, this is fixed now. So far there is no open point and everything seems fine now.&lt;/p&gt;
&lt;p&gt;Thank you for your support!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/132342?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 17:45:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d33538d-4d33-4164-883c-3b2fcf672cfb</guid><dc:creator>lesher</dc:creator><description>&lt;p&gt;I would look at the RTT log from the bootloader. If the flash queue is overflowing, you may need to increase NRF_DFU_&amp;lt;something&amp;gt;_BUFFERS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/132260?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 11:53:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:317cf663-1d91-4d1a-bef3-025ed1664049</guid><dc:creator>c.arndt</dc:creator><description>&lt;p&gt;After further research I noticed that the UART might be busy and not transmit all data so I added a delay. This showed some progress but after 20kB the transmission stops with a reset.&lt;/p&gt;
&lt;p&gt;Any idea why?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/132029?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 11:53:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1285dbb0-3084-497e-b560-45402d2c2903</guid><dc:creator>c.arndt</dc:creator><description>[quote userid="6410" url="~/f/nordic-q-a/33852/nrf52832-serial-dfu---transfer-init-packet---no-response-after-execute-command/130894"]or the init packet sent does not match the .dat file contents[/quote]
&lt;p&gt;That was exactly the issue.&amp;nbsp;The bytes which I transmitted were not 100% the same compared to what actually is inside the .dat file. This happened due to some ASCII-HEX conversion issue.&lt;/p&gt;
&lt;p&gt;Fixing this I could make some progress - the init packet can now be transmitted successfully.&lt;/p&gt;
&lt;p&gt;Now I actually run into some issues with the actual firmware .bin-file. The test FW I intend to transmit is some 71 kB in size. The maximum object size is 4 kB -&amp;gt; so I need to create 18 objects. After every object I want to calculcate the CRC, but when sending&amp;nbsp;CRC (0x03) after the first object was transmitted, I do not get any reply from nRF.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could that again be an indication, that the previous 4kB object was not transmitted properly (e.g. wrong content)? Or am I calling &amp;quot;CRC&amp;quot; at the wrong point of time? (i do not use PRN)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/131268?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 21:38:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f7086cc-0590-4124-aadc-3dade5befee4</guid><dc:creator>lesher</dc:creator><description>&lt;p&gt;That looks ok. I learned the most from the code Nordic publishes for a serial DFU controller:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/dfu_transport_serial.py"&gt;github.com/.../dfu_transport_serial.py&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/130982?ContentTypeID=1</link><pubDate>Fri, 04 May 2018 09:33:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a5738ec-4040-4ba7-961c-15036c567fdf</guid><dc:creator>c.arndt</dc:creator><description>&lt;p&gt;Okay with the keys everything should be fine for now. I will follow the lead of improper data from init packet.&lt;/p&gt;
&lt;p&gt;As far as I understood I need to transfer the data from init packet in the following format:&lt;br /&gt;0x08 0xXX 0xXX .... 0xXX (depending on MTU/2)&lt;br /&gt;&lt;br /&gt;Lets assume I have an init packet of 10 bytes and max transmission payload size is 4 bytes. Then this is how it is currently going:&lt;/p&gt;
&lt;p&gt;uint8_t Init_Packet [10] = {0x01, 0x02&lt;span&gt;, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;Transmitting first 4 Bytes of Init Packet (slip encoded not showed here):&lt;br /&gt;--&amp;gt; 0x08&amp;nbsp;&lt;span&gt;0x01 0x02&amp;nbsp;&lt;/span&gt;&lt;span&gt;0x03 0x04&lt;br /&gt;--&amp;gt; tx[0] = 0x08&lt;br /&gt;--&amp;gt; tx[1] = 0x01&lt;br /&gt;--&amp;gt; tx[2] = 0x02&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;br /&gt;--&amp;gt; tx[4] = 0x04&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Same way transmitting second 4 Bytes of Init Packet (slip encoded not showed here):&lt;br /&gt;--&amp;gt; 0x08 0x05, 0x06, 0x07, 0x08&lt;br /&gt;&lt;br /&gt;Same way transmitting last 2 Bytes of Init Packet (slip encoded not showed here):&lt;br /&gt;--&amp;gt; 0x08&amp;nbsp;0x09 0x10&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Could here be the mistake?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/130894?ContentTypeID=1</link><pubDate>Thu, 03 May 2018 21:44:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:889349b0-0144-4782-b13f-485cdf65f550</guid><dc:creator>lesher</dc:creator><description>&lt;p&gt;I only started using RTT once SES became available. Before that, I&amp;#39;d redirect bootloader logs to UART. RTT Viewer was just too tricky to use with multiple jlinks and multiple gcc debuggers happening.&lt;/p&gt;
&lt;p&gt;That log tells me that either the private key used during &amp;quot;nrfutil pkg generate&amp;quot; does not match the public key built in to the bootloader -&amp;nbsp;or the init packet sent does not match the .dat file contents.&lt;/p&gt;
&lt;p&gt;Search the SDK for &amp;quot;Invalid signature type&amp;quot;. (It&amp;#39;s in nrf_dfu_validation.c.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/130657?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 16:18:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c474588c-f502-4e5a-9c3c-0f4a0918f4f0</guid><dc:creator>c.arndt</dc:creator><description>&lt;p&gt;Okay I got some RTT logs:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; app: Received get serial mtu&lt;br /&gt;&amp;lt;debug&amp;gt; app: Sending Response: [0x7, 0x1]&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Received get serial mtu&lt;br /&gt;&amp;lt;debug&amp;gt; app: Sending Response: [0x7, 0x1]&lt;br /&gt;&amp;lt;debug&amp;gt; app: Waiting for events&lt;br /&gt;&amp;lt;debug&amp;gt; app: Received select object&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Valid Command: NRF_DFU_OBJECT_OP_SELECT&lt;br /&gt;&amp;lt;debug&amp;gt; app: Sending Response: [0x6, 0x1]&lt;br /&gt;&amp;lt;debug&amp;gt; app: Received create object&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Before OP create command&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Valid Command Create&lt;br /&gt;&amp;lt;debug&amp;gt; app: Sending Response: [0x1, 0x1]&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Before OP write command&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Before OP write command&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Before OP write command&lt;br /&gt;&amp;lt;debug&amp;gt; app: Received execute object&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Before OP execute command&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Valid command execute&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: PB: Init packet data len: 58&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Handling signed command&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Invalid signature type&lt;br /&gt;&amp;lt;error&amp;gt; dfu_req_handling: Prevalidate failed!&lt;br /&gt;&amp;lt;debug&amp;gt; app: Sending Response: [0x4, 0xB]&lt;br /&gt;&amp;lt;debug&amp;gt; app: Received execute object&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Before OP execute command&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Valid command execute&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: PB: Init packet data len: 58&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Handling signed command&lt;br /&gt;&amp;lt;info&amp;gt; dfu_req_handling: Invalid signature type&lt;br /&gt;&amp;lt;error&amp;gt; dfu_req_handling: Prevalidate failed!&lt;br /&gt;&amp;lt;debug&amp;gt; app: Sending Response: [0x4, 0xB] &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What do they tell you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/130650?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 15:58:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fee75cd-07db-46da-984d-def9f9862750</guid><dc:creator>c.arndt</dc:creator><description>&lt;p&gt;Actually I was trying some time to get RTT logs.. unfortunately after starting Segger RTT Logger I only get a screen saying &amp;quot;Searching for RTT Control Block&amp;quot;..&lt;/p&gt;
&lt;p&gt;Any idea how I can enable RTT logging?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/130146?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 14:38:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:693ebf10-f752-4bac-bcf6-e4e2febf019f</guid><dc:creator>lesher</dc:creator><description>&lt;p&gt;For Create Command Object, use the non-slip-encoded size.&lt;br /&gt;The best way to see what&amp;#39;s happening is to see the bootloader&amp;#39;s logs - RTT is built in to the examples.&lt;/p&gt;
&lt;p&gt;Also, refer to this file for the host-side details:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/dfu_transport_serial.py"&gt;github.com/.../dfu_transport_serial.py&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/130124?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 13:13:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca98be9e-ff2c-41d3-b1c2-c14a8b9d9689</guid><dc:creator>c.arndt</dc:creator><description>&lt;p&gt;Okay I got some new information:&lt;/p&gt;
&lt;p&gt;It was a good hint to ask whether really all bytes are transmitted via &amp;quot;Write&amp;quot; command.&lt;/p&gt;
&lt;p&gt;I changed the interpretation of &amp;quot;Get MTU&amp;quot; response into little endian --&amp;gt; 0x00 0x81 --&amp;gt; resulting in 129 Bytes (before I interpreted as 0x81 0x00 --&amp;gt; 32k).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With &amp;quot;Create Command Object&amp;quot; I actually reserve the space I need for the .dat file (which is 135 Bytes). Is that enough or do I need to reserve space for the whole slip encoded message (in this case 141 bytes)?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, I tried with creating 141 Bytes command object and now I do receive response for &amp;quot;Execute&amp;quot; command:&lt;/p&gt;
&lt;p&gt;DFU ERROR OPCODE &amp;lt;0x4 0x8&amp;gt; OPERATION_NOT_PERMITTED&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now the question is, why is this operation not permitted?&lt;/p&gt;
&lt;p&gt;(when I tried with creating 135 Bytes command object, again I do not receive any response after execute command)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/130060?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 07:08:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3ab1e03-03c1-4320-8738-b1e5ba48e406</guid><dc:creator>c.arndt</dc:creator><description>&lt;p&gt;Yes I do, I have a .dat file of size 135 Bytes. Wrapping it with &amp;quot;Write ID (0x08)&amp;quot; + Slip encoding I have a total size of 138 Bytes which I am transmitting via UART to nRF.&lt;/p&gt;
&lt;p&gt;As far as I could see I have max MTU size of 33024 Bytes (is it possible that I am exchanging big endian with little endian?). However, even half of the MTU size means I can transfer .dat file completely at once.&lt;/p&gt;
&lt;p&gt;Might here be some issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 Serial DFU - Transfer Init Packet - No Response after "Execute Command"</title><link>https://devzone.nordicsemi.com/thread/130042?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 21:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:458eab65-0e4f-470c-a7ae-4891b9cb49ab</guid><dc:creator>lesher</dc:creator><description>&lt;p&gt;Are you sending&amp;nbsp;ALL of the .dat file Bytes before calling Execute?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>