<?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>NRF DFU HARDWARE VERSION reply not working as expected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62525/nrf-dfu-hardware-version-reply-not-working-as-expected</link><description>Hello, 
 
 I am using SDK 15.3 for the development. During the upgrade process I wanted to send the hardware version when requested by the host. 
 
 
 I have made the changes as seen in the code snippet. But I receive just the 32 bytes before modification</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Jun 2020 08:15:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62525/nrf-dfu-hardware-version-reply-not-working-as-expected" /><item><title>RE: NRF DFU HARDWARE VERSION reply not working as expected</title><link>https://devzone.nordicsemi.com/thread/255169?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 08:15:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36d14387-971c-4ed3-9d76-0ff5aa641297</guid><dc:creator>Navin</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;I found the problem.&lt;/p&gt;
&lt;p&gt;Although the hardware structure was modified to accommodate HW Version, it was not serialized.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;case NRF_DFU_OP_HARDWARE_VERSION:
            {
                index += uint32_encode(p_response-&amp;gt;hardware.part,                 &amp;amp;p_serialized_rsp[index]);
                index += uint32_encode(p_response-&amp;gt;hardware.variant,              &amp;amp;p_serialized_rsp[index]);
                index += uint32_encode(p_response-&amp;gt;hardware.memory.rom_size,      &amp;amp;p_serialized_rsp[index]);
                index += uint32_encode(p_response-&amp;gt;hardware.memory.ram_size,      &amp;amp;p_serialized_rsp[index]);
                index += uint32_encode(p_response-&amp;gt;hardware.memory.rom_page_size, &amp;amp;p_serialized_rsp[index]);
                index += uint32_encode(p_response-&amp;gt;hardware.hw_version, 		  &amp;amp;p_serialized_rsp[index]);
            } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is the reason it was missing on the response from the slave.&lt;/p&gt;
&lt;p&gt;Thank you for your response!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Navin&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF DFU HARDWARE VERSION reply not working as expected</title><link>https://devzone.nordicsemi.com/thread/255057?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 14:02:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:145580c5-45fc-48c8-afe7-db58cca1fe9e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Navin,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I am not sure I fully understand what you wrote here:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I have made the changes as seen in the code snippet. But I receive just the 32 bytes before modification. Any changes to these variables is reflected in the output that is read.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The problem is when I add an extra uint32_t variable, it doesn&amp;#39;t reply!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So what exactly happened after you add the uint32_t variable in ? it didn&amp;#39;t reply or you still receive the 32bytes before modification ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try putting a log or debug the bootloader to see what is used in&amp;nbsp;&amp;nbsp; p_req-&amp;gt;callback.response(&amp;amp;response, p_req-&amp;gt;p_context); call ? To check if the hardware version is included ?&amp;nbsp;&lt;br /&gt;If you capture an UART trace, what would you see in the trace ? Is there any chance that the hardware version is replied but the DFU master didn&amp;#39;t parse it ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>