<?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>Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72135/adding-dfu-to-ncs-example-on-nrf52832</link><description>I want to add DFU to the peripheral_hids_keyboard example from the nRF Connect SDK. I added CONFIG_BOOTLOADER_MCUBOOT=y to the prj.conf and specified a key file. 
 When building in SES, the build fails: 
 
 When building with cmake directly it builds</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Mar 2021 08:07:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72135/adding-dfu-to-ncs-example-on-nrf52832" /><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/300829?ContentTypeID=1</link><pubDate>Fri, 19 Mar 2021 08:07:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eca48edf-81b4-4097-906b-3ad6025adb85</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I actually had no idea that this app existed. The more you know... &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Ok, I see. Without having tested this one, I am not sure it will replace my goto: nRF Connect for iOS, but I will give it a try. I guess this is targeting only DFU, while the nRF Connect for iOS is a more all in one app.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try to look into the last questions later today.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/300676?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 13:07:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88f2ea06-ecb6-490d-81f7-4a62dc413bc7</guid><dc:creator>nrbrook</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/72135/adding-dfu-to-ncs-example-on-nrf52832/300674#300674"]What app are you using that applies this filter?[/quote]
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-Device-Manager"&gt;www.nordicsemi.com/.../nRF-Connect-Device-Manager&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/300674?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 13:04:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c2e0183-985f-4ec6-8f0e-8eadcbab1a3f</guid><dc:creator>Edvin</dc:creator><description>[quote user="nrbrook"]5. No I don&amp;#39;t, but I&amp;#39;m just pointing it out as the App clearly expects SMP UUID to be advertised by default as the switch is hidden, and it doesn&amp;#39;t seem to be advertised by default, so there may be a bug there[/quote]
&lt;p&gt;&amp;nbsp;What app are you using that applies this filter? I am using nRF Connect for iOS. If you are using nRF Connect for Android, then it must be different. Or are you using nRF Toolbox -&amp;gt; DFU? In that case, I can recommend nRF Connect for Android/iOS, as you can connect to all devices, interact with all of it&amp;#39;s characteristics, and perform DFU.&lt;/p&gt;
&lt;p&gt;Let me get back to question 6. This is about the same that I struggled with when I tested this in the peripheral_uart example, and I don&amp;#39;t know how to work around it yet. I just wanted to answer this before I get the time to look into this again. I will leave this ticket open until I have had the chance to look into it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/300606?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 09:04:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63117b44-1b6d-4344-8ad4-ce7a31b6fe44</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;1. No I haven&amp;#39;t, but I&amp;#39;m sure that would work &amp;ndash; although as you recognize, isn&amp;#39;t a proper solution that can easily be shared with other developers etc.&lt;/p&gt;
&lt;p&gt;2,3,4 ok thanks&lt;/p&gt;
&lt;p&gt;5. No I don&amp;#39;t, but I&amp;#39;m just pointing it out as the App clearly expects SMP UUID to be advertised by default as the switch is hidden, and it doesn&amp;#39;t seem to be advertised by default, so there may be a bug there&lt;/p&gt;
&lt;p&gt;6. Yes this is without changing the private key. I can&amp;#39;t build without using the default key. I tried creating an app_update.bin with a later CONFIG_FW_INFO_FIRMWARE_VERSION but the results are the same (I think).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First attempt on the &amp;quot;Image&amp;quot; tab on nRF Connect Device Manager using &amp;quot;test and confirm&amp;quot; seems successful (it says &amp;quot;Upload complete&amp;quot;) however this happens almost instantly which seems too fast to transfer 200+kb, and all I get from the firmware is &amp;quot;I: Swap type: none&amp;quot;, it doesn&amp;#39;t appear to restart.&lt;/li&gt;
&lt;li&gt;The &amp;quot;start&amp;quot; button is then disabled so I can&amp;#39;t try again&lt;/li&gt;
&lt;li&gt;On the &amp;quot;Files&amp;quot; tab I can try to upload the firmware image (not sure if this is the same thing) but then it says &amp;quot;Remote error: Unrecognized (7)&amp;quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;7. Thanks&lt;/p&gt;
&lt;p&gt;8. Already in touch, thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/300594?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 08:35:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa9ae8c7-e717-4a32-9de8-e1d95b60adec</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;1. Have you tried just replacing the actual priv.pem file in the SDK? I know it isn&amp;#39;t ideal, but for now it may be easier just to get things up and running. I don&amp;#39;t have anything to point to, but I remember a colleague saying it was quite the hazzle to make it point to another key. Sorry. I don&amp;#39;t have the details.&lt;/p&gt;
&lt;p&gt;2. I agree. Unfortunately, NCS is still quite new, so we have not gotten all the nice to have guides up and running at this point in time. Zephyr is a 3rd party product, so we need to get familiar ourselves as well.&lt;/p&gt;
&lt;p&gt;3. Thanks for the input. If you find other things that are missing, feel free to say it here, and I can take it onward to the person who will eventually write the guide.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4. (same as 3.).&lt;/p&gt;
&lt;p&gt;5. Do you strictly need it to advertise the SMP UUID? Typically, you would choose a more prominent UUID, that is more descriptive of your device so that the central knows what to connect to.&lt;/p&gt;
&lt;p&gt;6. Did you get this before you started changing the private key as well?&lt;/p&gt;
&lt;p&gt;7. I think this config can be used the firmware version that you are looking for:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_FW_INFO_FIRMWARE_VERSION.html?highlight=firmware%20version#cmdoption-arg-CONFIG_FW_INFO_FIRMWARE_VERSION"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_FW_INFO_FIRMWARE_VERSION.html?highlight=firmware%20version#cmdoption-arg-CONFIG_FW_INFO_FIRMWARE_VERSION&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;8. That would be my guess, but for roadmap questions like this, you need to check with our RSM (Regional Sales Manager) for your area. Since this is a public ticket, please send me a PM with the link to this ticket if you want the contact information for our RSM for your area.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/300219?ContentTypeID=1</link><pubDate>Tue, 16 Mar 2021 16:57:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2659dde0-15fd-488c-833d-875d1ad41591</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thanks I&amp;#39;ve got a bit further.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Using the built in key works. I don&amp;#39;t know why specifying my own key is failing. As per my linked solution, I&amp;#39;m doing this in CMakeLists.txt:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;set(mcuboot_key_file ${CMAKE_CURRENT_LIST_DIR}/priv.pem)
set(mcuboot_CONFIG_BOOT_SIGNATURE_KEY_FILE &amp;quot;\&amp;quot;${mcuboot_key_file}\&amp;quot;&amp;quot;)&lt;/pre&gt;&lt;br /&gt;Any idea?&lt;/li&gt;
&lt;li&gt;That guide helped, but it would be great to have a more visible and generic (for all boards) guide covering the whole process like the &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader"&gt;Getting started with Nordic&amp;#39;s Secure Bootloader&lt;/a&gt; guide&lt;/li&gt;
&lt;li&gt;The guide is missing &amp;quot;CONFIG_MCUMGR=y&amp;quot; from the project config&lt;/li&gt;
&lt;li&gt;The guide is missing what files need to be included:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#ifdef CONFIG_MCUMGR_CMD_OS_MGMT
#include &amp;quot;os_mgmt/os_mgmt.h&amp;quot;
#endif
#ifdef CONFIG_MCUMGR_CMD_IMG_MGMT
#include &amp;quot;img_mgmt/img_mgmt.h&amp;quot;
#endif
#include &amp;lt;mgmt/mcumgr/smp_bt.h&amp;gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;It doesn&amp;#39;t seem to advertise the SMP UUID, In nRF Connect Device Manager I have to disable &amp;quot;Only devices advertising SMP UUID&amp;quot;. Then I can connect and perform echo.&lt;/li&gt;
&lt;li&gt;When I try to upload app_update.bin I get &amp;quot;Remote error: Unrecognized (7)&amp;quot;&lt;/li&gt;
&lt;li&gt;How do you specify what the firmware version is? Or will it just blindly perform the update with any app_update.bin?&lt;/li&gt;
&lt;li&gt;Is bootloader update planned for the future on nRF52?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/299214?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 10:45:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8225733-4abf-448a-84be-461fd33b7177</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the slow response. I have spent about a day trying to add a bootloader to another project, and I almost made it. I failed due to some flash conflicts in the projects.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tested the smp_svr example description found here?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf52.html#fota-upgrades"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf52.html#fota-upgrades&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t see the same error as you did when I tried to follow the guide. It claims that there are some missing references to the key. Where is this key located? And is that file included in your project? Usually, you need to include both the header files, and add some definitions in the prj.conf file to add a module.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app/libapp.a(keys.c.obj):(.rodata.bootutil_keys+0x0): undefined reference to `rsa_pub_key&amp;#39;
undefined reference to `rsa_pub_key_len&amp;#39;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Where are these used, and where are they defined? Is that .h/.c file included in your project properly? A quick search shows me that it is found in bootloader\mcuboot\boot\cypress\MCUBootApp\keys.c. Is that intentional? I don&amp;#39;t think the bootloader for nRF52 should use the cypress files by default. Did it work before you tried to set your own key? By using the default key in NCS? I am not saying you should use that specific key in the end, but just to see that things are working before you start modifying too much.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/296944?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 15:47:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9da8d41d-6c7b-48b0-a74c-728460c9a14c</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Hi Edvin, no I haven&amp;#39;t got this working in any previous version.&lt;/p&gt;
&lt;p&gt;I set the key as in my solution here: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71892/cmake-warning-using-default-mcuboot-key-it-should-not-be-used-for-production/295833#295833"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/71892/cmake-warning-using-default-mcuboot-key-it-should-not-be-used-for-production/295833#295833&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am following these steps: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bootloader.html#adding-a-bootloader-chain-to-your-application"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bootloader.html#adding-a-bootloader-chain-to-your-application&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I tried adding both immutable bootloader and MCUBoot but it seems there is not enough flash to do that on nRF52832 (or the bootloader configuration for the board is incorrect) as I got a flash overflow error at build time, so I switched to just using MCUBoot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding DFU to NCS example on nRF52832</title><link>https://devzone.nordicsemi.com/thread/296942?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 15:42:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b8f54f6-0ff0-4e49-ab1d-39733b7db25c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Did you follow some guide to get to this point? If so, what guide did you follow. Let me know, and I can see if I can reproduce the issue you are seeing. If you didn&amp;#39;t have a guide, did you do anything other than just adding the config&amp;nbsp;&lt;span&gt;CONFIG_BOOTLOADER_MCUBOOT=y&amp;nbsp;in your prj.conf file? I see that you are using NCS v1.5.0. Did it work in a previous NCS version, or is this your first attempt?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>