<?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>Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48750/hash-validation-failure-when-dfu-package-transferred-manually-nrf_dfu_validation-hash-verification-failed</link><description>When i use nrfutil to perform DFU it is passed, but when i send it through STM32 dev kit it Hash validation failed. but however i can see the CRC is correct.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Jun 2019 07:21:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48750/hash-validation-failure-when-dfu-package-transferred-manually-nrf_dfu_validation-hash-verification-failed" /><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/194512?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2019 07:21:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:298b80a8-0fc6-4f17-ac30-371c2328c23f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="MalikRehan"]I&amp;#39;m using SES, with SES it&amp;#39;s hard to get all the logs. I&amp;#39;ll try though.[/quote]
&lt;p&gt;You can use for instance J-Link RTT Logger&amp;nbsp;to generate a log.&lt;/p&gt;
[quote user="MalikRehan"]I have created one private ticket with case ID :&amp;nbsp;231391, i have uploaded source code there.[/quote]
&lt;p&gt;Perfect. Then I suggest we continue in that case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/194508?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2019 06:58:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fddc242-4fae-4279-a717-60a772452faa</guid><dc:creator>MahammadMalikRihan</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/48750/hash-validation-failure-when-dfu-package-transferred-manually-nrf_dfu_validation-hash-verification-failed/194460"]Can you upload logs from the bootloader (with RTT debug logging enabled)[/quote]
&lt;p&gt;I&amp;#39;m using SES, with SES it&amp;#39;s hard to get all the logs. I&amp;#39;ll try though.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/48750/hash-validation-failure-when-dfu-package-transferred-manually-nrf_dfu_validation-hash-verification-failed/194460"]Can you share your DFU master code?[/quote]
&lt;p&gt;I have created one private ticket with case ID :&amp;nbsp;231391, i have uploaded source code there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/194460?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2019 18:53:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7d48062-0350-4aaa-91e8-2903d4e779af</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The last part of the log is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2:NRF_DFU_OP_OBJECT_EXECUTE Complete 60 4 B&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;0xB is &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__sdk__nrf__dfu__req__handler.html?cp=5_1_6_11_7_0_5_20_9#gga654d8446f2996253016f7c7713124094aecaaa8d2fb5da91322326ff54041afad"&gt;NRF_DFU_RES_CODE_EXT_ERROR&lt;/a&gt;, so we need to look at the next byte, which we see from the log with UART traffic:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[STM] &amp;lt;-- [ 96, 4, 11, 12,  ]&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the same response (though it looks different since the numbers are decimal here), and we see that the fourth byte is 12 = 0xC = &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrf__dfu__rescodes.html?cp=5_1_6_11_7_0_7_0_0#ga50daf693717ee90d08614d2a337e2361"&gt;NRF_DFU_EXT_ERROR_VERIFICATION_FAILED&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I am not able to see exactly what happened though, but I will continue to look into it tomorrow.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;In the meantime,&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;Can you provide any more information about this issue?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;Do you always get this issue when using your DFU master implementation, or just some times?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;Can you share your DFU master code?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;Can you upload logs from the bootloader (with RTT debug logging enabled)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(Updated with more questions since initial posting)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/194284?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2019 10:04:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f981c53-a54f-4346-80aa-a5c32e3e5575</guid><dc:creator>MahammadMalikRihan</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have uploaded the UART dumps from STM32 and PC(nrfutil), Please find those below&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6763.stm32_5F00_uart.txt"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/6763.stm32_5F00_uart.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrfUtil_5F00_pcUart.txt"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/nrfUtil_5F00_pcUart.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/194174?ContentTypeID=1</link><pubDate>Sat, 22 Jun 2019 10:11:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45612abc-0c17-4b14-9820-6c0003c3f3b9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Excellent. But can you also upload dumps of the UART traffic using both tools (nrfutil and your implementation running on the other microcontroller)? Please capture the dumps in the exact same way, so that we can diff the two dumps to see the difference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/194106?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2019 12:22:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb728910-12f3-4a4a-803a-db237e2cfb37</guid><dc:creator>MahammadMalikRihan</dc:creator><description>&lt;p&gt;Hi, Please find the logs attached. i have uploaded logs from both nrfutil &amp;amp; Stm32&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Nrfutil_5F00_logs.txt"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/Nrfutil_5F00_logs.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/STM_5F00_logs.txt"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/STM_5F00_logs.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/194037?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2019 09:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d29b1db8-d340-45b8-abdb-f9e9cb306848</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see. Please upload the complete logs to this case, as it will be useful. However, what I was really interested in was a raw dump of the UART traffic (assuming you are using UART as DFU transport - please confirm). Comparing the dumps should hopefully show where there is a difference, and then we know where to look closer.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/193979?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2019 03:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f544bb5e-d0e4-4523-bb19-c70ce977ce8c</guid><dc:creator>MahammadMalikRihan</dc:creator><description>&lt;p&gt;I checked the debug logs from nRF while performing DFU from PC and from STM, I see similar logs.&lt;/p&gt;
&lt;p&gt;I enable verbose in nrfutil and checked and i found we&amp;#39;re also following similar process.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/193839?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2019 08:45:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80ed3f96-b9dc-4519-8b95-eedebd43a59d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. It looks correct to me, but obviously there is a problem somewhere. Can you dump the UART traffic when using both nrfutil and your implementation and diff it to see where it differs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/193780?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2019 05:19:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ea71aeb-c030-47f6-8d63-7da4a9f46bdc</guid><dc:creator>MahammadMalikRihan</dc:creator><description>&lt;p&gt;Hi Einar,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes we are trying to implement DFU from STM32 to nRF. When the same package is transferred through the PC using nrfutil, it is always successful. But when the same package is transferred from STM32 i see failure. but CRC is correct.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;strong&gt;Soft-device &lt;/strong&gt;: S140-V6.1.1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;strong&gt;SDK &lt;/strong&gt;: v15.3.0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;strong&gt;Bootloader&lt;/strong&gt; : &amp;quot;&lt;/span&gt;&lt;em&gt;&lt;span style="font-family:arial, sans-serif;"&gt;secure_bootloader_uart_mbr_pca10056_debug&amp;quot; example&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;span style="font-family:arial, sans-serif;"&gt;provided in SDK&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;/span&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;strong&gt;Generating the Application dfu package&lt;/strong&gt; :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&lt;span style="font-family:arial, sans-serif;"&gt;nrfutil pkg generate --hw-version 52 --sd-req 0xB6 --application-version 1 --application Application.hex --key-file priv.pem AppDfuPkg.zip&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&lt;span style="font-family:arial, sans-serif;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial, sans-serif;"&gt;Following is the procedure to send Application binary using DFU&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;1. Set PRN to 0,&amp;nbsp;NRF_DFU_OP_RECEIPT_NOTIF_SET&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;2.&amp;nbsp; GET MTU&amp;nbsp;NRF_DFU_OP_MTU_GET&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;3. Send init packet&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family:arial, sans-serif;"&gt;Send NRF_DFU_OP_OBJECT_SELECT&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, sans-serif;"&gt;Send&amp;nbsp;&lt;/span&gt;&amp;nbsp;NRF_DFU_OP_OBJECT_CREATE&lt;/li&gt;
&lt;li&gt;Send&amp;nbsp; NRF_DFU_OP_OBJECT_WRITE&amp;nbsp;(keep sending packets with MTU size with slip packet )&lt;/li&gt;
&lt;li&gt;Send&amp;nbsp; NRF_DFU_OP_OBJECT_EXECUTE&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, sans-serif;"&gt;4. Send application package&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family:arial, sans-serif;"&gt;Send NRF_DFU_OP_OBJECT_SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, sans-serif;"&gt;Send&amp;nbsp; NRF_DFU_OP_OBJECT_CREATE&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, sans-serif;"&gt;Send&amp;nbsp; NRF_DFU_OP_OBJECT_WRITE (keep sending packets with MTU size with slip packet )&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, sans-serif;"&gt;Send&amp;nbsp;&lt;/span&gt;&amp;nbsp;NRF_DFU_OP_OBJECT_EXECUTE&lt;/li&gt;
&lt;li&gt;Repeat step 2,3,4 till whole firmware is transferred&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;5. DFU fails with&amp;nbsp;&amp;lt;warning&amp;gt; nrf_dfu_serial: DFU request completed with result: 0xB&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hash validation failure when DFU package transferred manually.
  nrf_dfu_validation: Hash verification failed.</title><link>https://devzone.nordicsemi.com/thread/193649?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2019 11:55:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28710774-ce1f-4f96-b95d-f99959b3d96d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The question is a bit short on information, but I take it you have made your own serial DFU controller implementation running on the STM32, then? It is difficult to say what is the problem, but there must be a difference in the sequence when you use your implementation and when you use nrfutil. Have you compared them? What is the difference?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>