<?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 DFU with both BLE + USB transport</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101622/secure-dfu-with-both-ble-usb-transport</link><description>I am working with SDK 17.1.0 and SES 5.70a and I am having extreme difficulty merging a Secure DFU for BLE and USB together. This is for an nRF52840 project. 
 I have been through just about EVERY document I could find on the DevZone about the process</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Aug 2023 13:43:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101622/secure-dfu-with-both-ble-usb-transport" /><item><title>RE: Secure DFU with both BLE + USB transport</title><link>https://devzone.nordicsemi.com/thread/440771?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2023 13:43:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ae8af79-ad68-47e4-bc07-fd335479ebbd</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi D,&lt;/p&gt;
&lt;p&gt;It is great to know that things are working for you now. Thanks a lot for letting us know.&lt;/p&gt;
&lt;p&gt;It really is quite mysterious why editing the file with&amp;nbsp;CMSIS could cause an issue. I think an extensive file compare might point out some mismatches. Please let us know if you eventually figure it out someday.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU with both BLE + USB transport</title><link>https://devzone.nordicsemi.com/thread/440620?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2023 06:16:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4be8969-638e-478e-aa8e-b2e303a213c2</guid><dc:creator>Dano</dc:creator><description>&lt;p&gt;Hi Hieu&lt;/p&gt;
&lt;p&gt;Well I tried another fresh SDK and SES 5.42a and got the same result 4X8X. I decided to start&amp;nbsp;again from the supplied example which I knew worked (in place in the SDK examples/dfu folder). I changed the BLE and USB bootloader names and the same thing happened - however, when I &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;directly&lt;/strong&gt;&lt;/span&gt; altered the sdk.config,h manually, not via CMSIS, it worked!&lt;/p&gt;
&lt;p&gt;Interestingly in the sdk_config.h file, just before the define of &amp;quot;APP_USBD_STRINGS_PRODUCT&amp;quot; it says the following:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#339966;"&gt;// &amp;lt;s&amp;gt; APP_USBD_STRINGS_PRODUCT - String descriptor for the product name.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#339966;"&gt;// &amp;lt;i&amp;gt; Note: This value is not editable in Configuration Wizard.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Lets just say it&amp;#39;s all working now!&amp;nbsp; I looked at my previous sdk_config.h and they &lt;strong&gt;looked the same&lt;/strong&gt;, but the direct editing approach worked. I will try some other combinations when&amp;nbsp;I have a chance to see what specific combination created the 4X8X error. If I identify a pattern I will add to this post.&lt;/p&gt;
&lt;p&gt;I very much appreciate the help.&lt;/p&gt;
&lt;p&gt;D&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#008000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU with both BLE + USB transport</title><link>https://devzone.nordicsemi.com/thread/439794?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2023 22:24:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5891e863-4e43-44ac-8a82-64cbb4e9a698</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi D,&lt;/p&gt;
&lt;p&gt;I too apologize for delay on my end, I have been out of office and there seem to be some accidents in reassigning your question; but that is resolved now.&lt;/p&gt;
&lt;p&gt;Also, thank you very much for the kind words. I will make sure to relay it to my colleague. But that would have to be in a few weeks, because he&amp;nbsp;is unfortunately out of office.&lt;/p&gt;
&lt;p&gt;In his absence, I tried to look into it and just like you don&amp;#39;t see any difference in sdk_config.h or the project setup.&lt;/p&gt;
&lt;p&gt;However, when I proceed to test the bootloader, I see that the serial number appears just fine for me:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0363.pastedimage1691100825970v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;This is quite odd.&amp;nbsp;Especially when you don&amp;#39;t see the same problem with the USB-only projects.&lt;/p&gt;
&lt;p&gt;How are you building this project? If you are using SEGGER Embedded Studio (SES), what version are you using? I recommend using the&amp;nbsp;v5.42a while working with the nRF5 SDK v17.1.0, because that SDK version was tested with that SES version.&lt;/p&gt;
&lt;p&gt;Since it is so strange, it might be worth it to try again with a fresh copy of the SDK. Please remember to keep the old copy around&amp;nbsp;in case that&amp;nbsp;it is the problem.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU with both BLE + USB transport</title><link>https://devzone.nordicsemi.com/thread/438841?ContentTypeID=1</link><pubDate>Sat, 29 Jul 2023 05:22:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:233a45a6-1d8f-4056-9895-6760bedd80a1</guid><dc:creator>Dano</dc:creator><description>&lt;p&gt;Hi Hieu&lt;/p&gt;
&lt;p&gt;Sorry for the delay in my reply, but many thanks to you and your colleague (please pass on my thanks) -&amp;nbsp;in one&amp;nbsp;word - EXCELLENT!!.&lt;/p&gt;
&lt;p&gt;The bootloader&amp;nbsp;compiled easily and I have since added DFU support to my applications. I found writing to the gpregret register to be the simplest. I only had to add&amp;nbsp;&lt;strong&gt;#include &amp;quot;nrf_bootloader_info.h&amp;quot;&amp;nbsp;&lt;/strong&gt;to the applications.&amp;nbsp;The APP command that activated the DFU only required the two lines below and that was it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;sd_power_gpregret_set(0, BOOTLOADER_DFU_START);&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; NVIC_SystemReset(); &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Since then I have&amp;nbsp;been creating private keys and batch files to build the final hex and zip files and its all&amp;nbsp;working well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I do have one query. The usb serial number is not displaying correctly on the combined transport DFU. I assume the &lt;strong&gt;usb_dfu_transport_init&lt;/strong&gt; function is called that includes the function&amp;nbsp;&lt;strong&gt;app_usbd_serial_num_generate()&lt;/strong&gt;, but I am getting 4X8X as the serial number. I have tried several nRF52840 dongles and the DK and all report the same 4X8X.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="57" src="https://devzone.nordicsemi.com/resized-image/__size/416x114/__key/communityserver-discussions-components-files/4/4X8X.PNG" width="208" /&gt;&lt;/p&gt;
&lt;p&gt;If I use the usb&amp;nbsp;only DFU it shows correctly on all devices. I have been through the sdk_config.h on both DFU versions and I cannot identify any&amp;nbsp;usb config variations that would cause this. Perhaps this is a consequence of using both usb and ble transports? This&amp;nbsp;leads me to think it is&amp;nbsp;deeper in the SDK and&amp;nbsp;there is something else I need to configure. Could you reach out to your colleague to see if he can resolve this please.&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;
&lt;p&gt;D&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU with both BLE + USB transport</title><link>https://devzone.nordicsemi.com/thread/435299?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 14:52:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c788fd6-c382-47ef-978b-984848190859</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Dano,&lt;/p&gt;
[quote user=""]Surely someone at Nordic has&amp;nbsp;created a DFU with multiple transports&amp;nbsp;- can that code be shared please?&amp;nbsp;[/quote]
&lt;p&gt;Actually yes. A colleague shared this with me when they see your question:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/secure_5F00_bootloader_5F00_usb_5F00_and_5F00_ble.zip"&gt;devzone.nordicsemi.com/.../secure_5F00_bootloader_5F00_usb_5F00_and_5F00_ble.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please note that the code is provided as is and without warranty; and we have not performed all the strict test that a normal SDK example went through.&lt;/p&gt;
&lt;p&gt;On other note, I think&amp;nbsp;a common&amp;nbsp;challenge is something that &lt;a href="https://devzone.nordicsemi.com/members/mrono"&gt;mrono&lt;/a&gt;&amp;nbsp;brought up. NVIC and SOC APIs are different between when a SoftDevice is used, versus when it is not.&amp;nbsp;This is likely what causes conflict when you are trying to merge the&amp;nbsp;BLE Secure Bootloader with the SoftDevice, and the USB Secure Bootloader that is using NVIC API for no SoftDevice case.&lt;/p&gt;
&lt;p&gt;Such APIs for when the SoftDevice is presented are defined in SDK\components\softdevice\s***\headers, where the one for when the SoftDevice is not presented are defined in SDK\components\drivers_nrf\nrf_soc_nosd&lt;/p&gt;
&lt;p&gt;In your attempts, please remain aware of those files, and make sure only the correct files are included in your project.&lt;/p&gt;
&lt;p&gt;Beyond this tip, if you have any specific error that you would like to resolve, please give me the details and I will try to support you.&lt;/p&gt;
&lt;p&gt;By the way, please be informed that it is the summer vacation period here, and we are understaffed. Please excuse delays in responses in the upcoming week. My apology for the inconvenience.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU with both BLE + USB transport</title><link>https://devzone.nordicsemi.com/thread/435227?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 12:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa458805-093d-4ae7-b45b-00ee4d85f4ad</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry that I can&amp;#39;t really help, but something fundamental is wrong with your project. Take the first error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;7&amp;gt; E:\OneDrive\Code\nRF\_DDO\SDK\components\libraries\util\app_util_platform.c:44:1: error: unknown type name &amp;#39;nrf_nvic_state_t&amp;#39;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;app_util_platform.c includes app_util_platform.h which in turn includes nrf_nvic.h, which defines nrf_nvic_state_t. The only macro involved here is SOFTDEVICE_PRESENT. Yet there are no errors about missing include files. I don&amp;#39;t understand how that type is not found.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>