<?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>Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67896/problem-with-signing-images-for-ota-dfu</link><description>I have had several problems with signing images, so I&amp;#39;ll start with something simple, and I hope you can bear with me as I get to my final goal which is to OTA (which I am already doing, but not signed) with the project we are working on. 
 I am testing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Dec 2020 20:32:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67896/problem-with-signing-images-for-ota-dfu" /><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/283917?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2020 20:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0223cb5f-dafd-46ad-8fc6-47e478b10b1a</guid><dc:creator>dstarling</dc:creator><description>&lt;p&gt;I can also confirm the stack change fixed the issue on nrf52840dk as well. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/283904?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2020 17:13:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf2a3a30-5924-4e69-9149-f47d7928e2d5</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Thank you Einar, that did the trick.&lt;/p&gt;
&lt;p&gt;About modifying the boot Kconfig, at least with ubuntu, only the relative&amp;nbsp;path worked. I placed it as:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;default &amp;quot;../../../Documents/tracker_sensor/Tools/psl-rsa-2048.pem&amp;quot; if BOOT_SIGNATURE_TYPE_RSA &amp;amp;&amp;amp; BOOT_SIGNATURE_TYPE_RSA_LEN=2048&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Placing an absolute path would have problems at compile time.&lt;/p&gt;
&lt;p&gt;The other option that worked was to simply rename my key and substitute root_rsa-2048.pem at the mcuboot folder that contains all of the default keys.&lt;/p&gt;
&lt;p&gt;Please let me know when the issue has been fixed.&lt;/p&gt;
&lt;p&gt;Thank you!&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f600.svg" title="Grinning"&gt;&amp;#x1f600;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/283847?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2020 14:22:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3ee9ea7-d373-4ad9-80cc-270fcf90fdd1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is unfortunately an issue with too little stack in the sample. You can fix this by adding&amp;nbsp;&lt;code&gt;CONFIG_MAIN_STACK_SIZE=4096&lt;/code&gt; to prj.conf.&lt;/p&gt;
&lt;p&gt;As a general tip you can often find these problems by testing with&amp;nbsp;&lt;code&gt;CONFIG_DEBUG=y&lt;/code&gt; (though in this case that would not work on the nRF52832 without removing a few things, as the app would be too large to fit in flash).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/283697?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2020 06:50:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79d01b0e-5b0e-4fd4-9cec-0230633ec6e0</guid><dc:creator>dstarling</dc:creator><description>&lt;p&gt;I also am having the exact same issue currently that I program the smp_svr example and no matter what I seem to do, it just continues in the same reboot loop as shown above.&amp;nbsp; Since I see that it is not just me, I guess I&amp;#39;ll go work on something else and monitor this thread. Also I am trying to get this to work on the nrf52840dk_nrf52840 dev board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/283641?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 16:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7462c5c1-dcf7-421a-be75-57f7980ee5d9</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;My request is more basic right now. I cannot get the smp_svr sample working on the BT configuration not even with the default signature. I have tried 1.4.0, 1.4.1-rc1 and 1.4.99-dev1.&lt;/p&gt;
&lt;p&gt;We already know that the manual west instructions for &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;smp_svr sample&lt;/a&gt;&amp;nbsp;do not work for the BT configuration, since they have the header size problem, so I opted for the Segger Studio option by&amp;nbsp;including the CONFIGs from overlay-bt.conf to prj.conf and compiled-flashed, as is, to a nrf52dk_nrf52832 board, and the result in the serial terminal is a continuous re-boot from mcuboot with no error or warning, maybe rejecting the image in slot-0.&lt;/p&gt;
&lt;p&gt;Can you tell me how to make work the smp_svr sample with the BT configuration, as is?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screen-Shot-2020_2D00_12_2D00_07-at-10.40.54-AM.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/283276?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2020 10:05:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dd88e68-d07c-449c-9070-eadee966b4b8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the delay with this.&amp;nbsp;I do not have a proper way of handling this yet, but the R&amp;amp;D team responsible has it on their list.&lt;/p&gt;
&lt;p&gt;There is a dirty but very simple workaround you can do though, which is to simply replace the path to the default key with the path to your key in ncs/bootloader/mcuboot/boot/zephyr/Kconfig:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5460.Kconfig.diff"&gt;devzone.nordicsemi.com/.../5460.Kconfig.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This&amp;nbsp;is not ideal, but it is a simple workaround that works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/283215?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 23:57:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aeaadf5-63ae-470e-9f26-0f778e39243f</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;I tried again with the sample app smp_svr from the v1.4.1-rc1, using the default keys, not even mine, and could not make it work. It would keep reseting, I imagine because it is not accepting the primary image.&lt;/p&gt;
&lt;p&gt;Can you make it work with that sample code in the BLE configuration, flash the&amp;nbsp;first image, create another and OTA it, and send me a &lt;span style="text-decoration:underline;"&gt;step by step of how to do it?&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Or, if you prefer, copy the smp_svr folder outside ncs, like ~/Documents, make it work&amp;nbsp;&lt;span&gt;in the BLE configuration, flash the&amp;nbsp;first image, create another and OTA it, and attach here the folder? I can just check what you did in the config files.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;At this point I am feeling helpless and I already tried everything.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/282683?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2020 13:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2ef658e-c178-473b-9e60-6a9e573c7282</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Antonio,&lt;/p&gt;
&lt;p&gt;No, it is not fixed in 1.4.1. I think the only way around it for now is to set the key configurations in your app for the app and in the mcboot folder in within NCS. It has been reported though and the developers are looking at it, so I hope it will be fixed in 1.5.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/282546?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 20:20:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ed37fb5-29b5-4165-83e3-0579b2b4c893</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Do you have news on this?&lt;/p&gt;
&lt;p&gt;I saw that there is a 1.4.1-rc1. Do you think it is fixed there?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/281297?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2020 11:38:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1692d8b0-ca1d-4aaa-8727-25dbc516696b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry this has taken so long, but we are still looking into this. There is also another bug in NCS 1.4 which prevents setting MCUboot overlay via CMakeLists.txt. So instead the key file must be specified on the command line similar to this instead:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf52dk_nrf52832 --pristine -- -Dmcuboot_OVERLAY_CONFIG=mcuboot.conf&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;That brings us a bit further, but are still some issues. I am discussing with the R&amp;amp;D team and &lt;em&gt;hope&lt;/em&gt; to have a proper solution in a few days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/281159?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 15:30:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3266e329-f45f-4c44-8888-37c00a2735de</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;That is how I was doing it on v1.3.2. It does not work on v1.4.0, that is the reason I started again this thread, when 1.4.0 was official.&lt;/p&gt;
&lt;p&gt;This&amp;nbsp;is&amp;nbsp;a functionality esencial and basic, signed OTA DFU, and the sample that I included is from the NCS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please modify the sample included so that it works, or should we all stay away from 1.4.0 for now?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/281116?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 13:29:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:015dfc10-6f36-4dfe-8e3e-6364cd3a1af2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am also not able to get this to work as you want in NCS 1.4. The logic is changed a bit and it does not seem straightforward to adapt it to refer to external keys. Perhaps another approach in the mean time could be to copy the key in the mcuboot folder and refer to it, then delete it again if you write a build script, as suggested in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/65235/config_boot_signature_key_file-doesn-t-correctly-get-propagated-to-mcuboot-build/274164#274164"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/280865?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 11:48:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3640feaa-5ac0-419e-9852-26e764fbe72f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the delay. I have not been able to test your project&amp;nbsp; yet, but I will do so and get back to you later today.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/280467?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 19:07:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7faa3fd-3d3d-4e3e-826a-e76cb5adae9b</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Hi Again Einar,&lt;/p&gt;
&lt;p&gt;I tried the new PR as presented, and did not work either.&lt;/p&gt;
&lt;p&gt;I am attaching the project as modified and tested. Can you try to cmake it and tell me what is wrong? It includes a temporary pem key for testing purposes that I created using imgtool&lt;/p&gt;
&lt;p&gt;To reproduce:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Environment: Ubuntu 20.04, SES v5.10d, Clean NCS v1.4.0 @ ~/ncs&lt;/li&gt;
&lt;li&gt;Updated the &lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/3239/files"&gt;affected files as PR-3239&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Did a west update, which brought the &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/129/files"&gt;updated mcuboot kconfig as in PR 129&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Copied smp_svr from samples to ~/Documents&lt;/li&gt;
&lt;li&gt;Modified as per original instructions to include the mcu_boot child image&lt;/li&gt;
&lt;li&gt;You can find the modified project, including the pem file, as an attachment.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Can you please cmake it and tell me what I might be doing wrong?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5265.smp_5F00_svr.zip"&gt;devzone.nordicsemi.com/.../5265.smp_5F00_svr.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/280063?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 10:02:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5699b237-41be-40df-90d3-4c3c8f90346e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for not getting back to you sooner. I got the same problem as you when I tested, and it turns out that the reason was that &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/129"&gt;this PR (sdk-mcuboot 129)&lt;/a&gt;&amp;nbsp;&amp;nbsp;is not enough. You also need &lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/3239"&gt;this PR (sdk-nrf 3239)&lt;/a&gt;&amp;nbsp;(it is linked to in the first one, but it is easy to miss it). With this you can use the same approach in NCS 1.4 as in NCS 1.3.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/280019?ContentTypeID=1</link><pubDate>Sun, 15 Nov 2020 15:44:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f136df0-0336-4add-abcd-2353b174e288</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am very eager to jump to 1.4. Do&amp;nbsp;you know if this has been fixed or there is a workaround?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278494?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 15:27:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2126a6c1-2473-425e-a9fb-fabbf634e826</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There seems to be more problems with this in 1.4 then just what is fixed by &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/129"&gt;this PR&lt;/a&gt;. I am not able to make it work with 1.4 either, but unfortunately I have not made any progress yet. I am checking with the developer and will let you know when I know more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278332?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 20:01:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:712b7e4f-13c5-42ed-b6a1-70bfb77fe740</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;I think I must be doing something wrong because I tried all the combinations possible and neither one worked.&lt;/p&gt;
&lt;p&gt;I modified Kconfig as you and the PR described, tried with and without default (which should not matter because i am changing the key) tried the key with absolute and relative paths (relative ended up compiling).&lt;/p&gt;
&lt;p&gt;I also tried with and without the extra mcuboot.conf, calling the setting both&amp;nbsp;&lt;span&gt;CONFIG_BOOT_SIGNATURE_KEY_FILE and the new&amp;nbsp;CONFIG_MCUBOOT_SIGNATURE_KEY_FILE, etc, etc.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is my setting. I take the smp_srv project and place it under ~/Documents/, my key is on ~/Documents/tracker_sensor/Tools/psl-rsa-2048.pem, created using imgtool, and I added to prj.conf the folowing in order for it to load BT:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;hr /&gt;&lt;span&gt;# Enable the Bluetooth (unauthenticated) and shell mcumgr transports.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_MCUMGR_SMP_BT&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_MCUMGR_SMP_BT_AUTHEN&lt;/span&gt;&lt;span&gt;=n&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;# Linux&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BOOT_SIGNATURE_KEY_FILE&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;quot;../../../Documents/tracker_sensor/Tools/psl-rsa-2048.pem&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;hr /&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;and added also to CMakeLists.txt:&lt;/div&gt;
&lt;div&gt;&lt;hr /&gt;if (EXISTS &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf&amp;quot;)&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp;set(mcuboot_CONF_FILE prj.conf ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf)&lt;/div&gt;
&lt;div&gt;endif()&lt;/div&gt;
&lt;div&gt;&lt;hr /&gt;&lt;/div&gt;
&lt;div&gt;As well as the included mcuboot.conf.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;So, I tried all combinations, some of them would not even make the project, some others would fail at compiling, some other would fail on runtime.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Bottom line is I am not sure if it is&amp;nbsp;&lt;span&gt;CONFIG_MCUBOOT_SIGNATURE_KEY_FILE or&amp;nbsp;CONFIG_BOOT_SIGNATURE_KEY_FILE or a combination, if I need to modified CMakeLists to load mcuboot.conf, if the path is absolute or relative to my key,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Could you tell me in a few steps how to make&amp;nbsp;smp_srv sample work out of tree?&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Thanks!&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278285?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 13:47:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b5bd6f9-60aa-4300-8548-daed5f74eeec</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Antonio,&lt;/p&gt;
&lt;p&gt;There is a bug in NCS 1.4 that causes problems in this case. BOOT_SIGNATURE_KEY_FILE needs to be duplicated in bootloader/mcuboot/zephyr/Kconfig, but that was removed from NCS 1.4. So you should&amp;nbsp;put it back as done in &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/129"&gt;this PR&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278079?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 19:56:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78f38314-7984-494a-9c52-f65b2a0a2a84</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Updated&amp;nbsp;request now that v1.4.0 is official&lt;/p&gt;
&lt;p&gt;I am using the just released v1.4.0, the sample which I started with smp_srv, with the board nrf52dk_nrf52832, but since now it does not loads BL automatically, I added to the pro.conf:&lt;/p&gt;
&lt;p&gt;CONFIG_MCUMGR_SMP_BT=y&lt;/p&gt;
&lt;p&gt;CONFIG_MCUMGR_SMP_BT_AUTHEN=n&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This compiles and runs as expected, but does not OTA (as expected) since the new rule is that if no valid key is presented, you have to sign yourself afterwards. If you try to do an OTA, y connects, then you select “Test and verify” with the android app nRF Connect, and it keeps at “Validating” for like a minute, and then disconnects. The logger does not show any error, other that disconnecting…&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If introduce a key, that in my case is:&lt;/p&gt;
&lt;p&gt;CONFIG_MCUBOOT_SIGNATURE_KEY_FILE=&amp;quot;~/Documents/tracker_sensor/Tools/psl-rsa-2048.pem&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The behavior is exactly the same as when I did not include any key.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And finally, if, as per last instructions, I modify CMakeLists.txt after minimum_required with:&lt;/p&gt;
&lt;p&gt;if (EXISTS &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf&amp;quot;)&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;set(mcuboot_CONF_FILE prj.conf ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf)&lt;/p&gt;
&lt;p&gt;endif()&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And I include such file with:&lt;/p&gt;
&lt;p&gt;CONFIG_MCUBOOT_SIGNATURE_KEY_FILE=&amp;quot;~/Documents/tracker_sensor/Tools/psl-rsa-2048.pem&amp;quot;&lt;/p&gt;
&lt;p&gt;Or:&lt;/p&gt;
&lt;p&gt;CONFIG_BOOT_SIGNATURE_KEY_FILE=&amp;quot;~/Documents/tracker_sensor/Tools/psl-rsa-2048.pem&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I reload the project it responds with the following error:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;CMake Warning at /home/antonio/ncs/zephyr/kernel/CMakeLists.txt:54 (message):&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;Single threaded mode (CONFIG_MULTITHREADING=n) is deprecated&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;MCUBoot bootloader key file: ~/Documents/tracker_sensor/Tools/psl-rsa-2048.pem&lt;/p&gt;
&lt;p&gt;-- Configuring done&lt;/p&gt;
&lt;p&gt;-- Generating done&lt;/p&gt;
&lt;p&gt;-- Build files have been written to: /home/antonio/Documents/tests/smp_svr/build_nrf52dk_nrf52832/mcuboot&lt;/p&gt;
&lt;p&gt;=== child image mcuboot -&lt;span&gt;&amp;nbsp; &lt;/span&gt;end ===&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CMake Error at /home/antonio/ncs/nrf/cmake/mcuboot.cmake:112 (get_filename_component):&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;get_filename_component unknown component&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;/home/antonio/Documents/tests/smp_svr/mcuboot.conf&lt;/p&gt;
&lt;p&gt;Call Stack (most recent call first):&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;/home/antonio/ncs/bootloader/mcuboot/zephyr/CMakeLists.txt:1 (include)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CMake Warning at /home/antonio/ncs/nrf/cmake/mcuboot.cmake:120 (message):&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;---------------------------------------------------------&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;--- WARNING: Using default MCUBoot key, it should not ---&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;--- be used for production. &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;---&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;---------------------------------------------------------&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Call Stack (most recent call first):&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;/home/antonio/ncs/bootloader/mcuboot/zephyr/CMakeLists.txt:1 (include)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CMake Warning at /home/antonio/ncs/nrf/cmake/mcuboot.cmake:303 (message):&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;CONFIG_MCUBOOT_SIGNATURE_KEY_FILE is set to&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&amp;quot;~/Documents/tracker_sensor/Tools/psl-rsa-2048.pem&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;You are using the NCS Mcuboot signing, which means this option will be&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;ignored.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;Image signing in NCS is done via the MCUboot image&amp;#39;s&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;CONFIG_BOOT_SIGNATURE_KEY_FILE option.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;Consider setting CONFIG_MCUBOOT_SIGNATURE_KEY_FILE in your application&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;image back to its default value, the empty string.&lt;/p&gt;
&lt;p&gt;Call Stack (most recent call first):&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;/home/antonio/ncs/bootloader/mcuboot/zephyr/CMakeLists.txt:1 (include)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-- Configuring incomplete, errors occurred!&lt;/p&gt;
&lt;p&gt;See also &amp;quot;/home/antonio/Documents/tests/smp_svr/build_nrf52dk_nrf52832/CMakeFiles/CMakeOutput.log&amp;quot;.&lt;/p&gt;
&lt;p&gt;See also &amp;quot;/home/antonio/Documents/tests/smp_svr/build_nrf52dk_nrf52832/CMakeFiles/CMakeError.log&amp;quot;.&lt;/p&gt;
&lt;p&gt;Project load failed&lt;/p&gt;
&lt;p&gt;Reported error: solution load command failed (1)&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please advise…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278078?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 13:59:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df1b83eb-6a55-49f2-b919-d5c7e09e2186</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Thanks Einar,&lt;/p&gt;
&lt;p&gt;I see that it is somehow fixed in v1.4.0-rc2, but I am failing to make it work so far. It does not say if the mcuboot.conf is still needed.&lt;/p&gt;
&lt;p&gt;Also, and it has happened to me before, my modules that use the &amp;quot;u8_t&amp;quot; short typing start failing, they expect the normal &amp;quot;uint8_t&amp;quot;. Do yo know if it is a header that I am missing?&lt;/p&gt;
&lt;p&gt;Also a comment. if you do in ubuntu in a terminal &amp;quot;git checkout v1.4.0-rc2&amp;quot; it fails to find it. You have to use a GUI git handler like VS Code or SmartGit to do the checkout.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Update&lt;/p&gt;
&lt;p&gt;It does look like the key directories is fixed on the new 1.4.0 release.&lt;/p&gt;
&lt;p&gt;I failed to make smp_srv work though. I tested 1.4.0-rc2&lt;/p&gt;
&lt;p&gt;I did not have a problem signing with the new&amp;nbsp;&lt;span&gt;CONFIG_MCUBOOT_SIGNATURE_KEY_FILE, which is supposed to take care of both signings, and is no longer an extension of the absolute position of mcuboot dir, and now yo have to add&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_MCUMGR_SMP_BT&lt;/span&gt;&lt;span&gt;=y and&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_MCUMGR_SMP_BT_AUTHEN&lt;/span&gt;&lt;span&gt;=n&amp;nbsp;since BLE is not a default now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope the is a guide (I did not find one), as the instructions to do BLE OTA changed, and this sample project is the only guide for that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ll wait for the final release to test again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks!&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278077?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 13:52:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7ec3122-5b42-4c30-91df-83e57f97e101</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Antonio,&lt;/p&gt;
[quote user="antoniordz"]The whole thing is a mess, I hope something is figured out for portability sake.[/quote]
&lt;p&gt;It should be possible to do this more elegantly using a &lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/27740/"&gt;Zephyr module&lt;/a&gt; in the future. Then you can use _defconfig and point to a Zephyr module with your key (and code). That is not available in NCS 1.3.x, though.&lt;/p&gt;
[quote user="antoniordz"]I have another question, is there a guide or a plan to be able to have the BLE controller separately in its own image, so only the app can be OTA?[/quote]
&lt;p&gt;I do not see how. The controller is part of the application (for the nRF52 series / single CPU) so it is not easily separated. (This is fundamentally different from when using the nRF5 SDK and SoftDevice, as then the SoftDevice and application are built independently).&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278076?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 00:34:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:273e4f0b-7306-4d28-a583-3435dc8f0fa3</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;I did not think of that. My logic was that&amp;nbsp;imgtool is being called from the ncs/bootloader/mcuboot location and it makes an assumption of going back from the zepyr env location and then forward, to where the default keys are, and from&amp;nbsp;there I had to go back and into my own directory.&lt;/p&gt;
&lt;p&gt;The main problem is that KConfig in prj.conf has a default on&amp;nbsp;CONFIG_BOOT_SIGNATURE_KEY_FILE which if it is not set there, iot places a default, overriding whatever you do in CMakeLists.&lt;/p&gt;
&lt;p&gt;And even when that is solved, there is still a problem with the key for mcuboot.conf.&lt;/p&gt;
&lt;p&gt;The whole thing is a mess, I hope something is figured out for portability sake.&lt;/p&gt;
&lt;p&gt;I have another question, is there a guide or a plan to be able to have the BLE controller separately in its own image, so only the app can be OTA?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278075?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 14:35:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b28e045-8e9c-4313-9797-5e235a4c090a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Antonio,&lt;/p&gt;
&lt;p&gt;I see.&lt;/p&gt;
&lt;p&gt;There are some issues with your Cmake code. &lt;code&gt;${CMAKE_CURRENT_SOURCE_DIR}&lt;/code&gt; gives you the absolute path, so it makes no sense to prefix it with &lt;code&gt;../../../&lt;/code&gt;. A possible way to solve this is to slightly adjust the suggestion from &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/66210/change-mcuboot_menuconfig-configuration/270799#270799"&gt;here&lt;/a&gt; and use something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (EXISTS &amp;quot;${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf&amp;quot;)
  set(mcuboot_CONF_FILE prj.conf ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf)
  set(CONFIG_BOOT_SIGNATURE_KEY_FILE &amp;quot;${CMAKE_CURRENT_LIST_DIR}/../../../psl-rsa-2048.pem&amp;quot;)
endif()&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But then you need to have both the mcuboot.conf and key file at the correct location. Also, this will only work if it comes &lt;em&gt;before&lt;/em&gt; &lt;code&gt;find_package(Zephyr)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Br,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with signing images for OTA DFU</title><link>https://devzone.nordicsemi.com/thread/278074?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 13:06:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb21caab-eaec-46cd-ac60-4a5d0397df4f</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;Thanks Einar.&lt;/p&gt;
&lt;p&gt;Actually my question was not about how to detect the OS, but rather that setting the&amp;nbsp;&lt;em&gt;CONFIG_BOOT_SIGNATURE_KEY_FILE in&amp;nbsp;CMakeLists did not work, as I highlighted&amp;nbsp;in yellow, and even if it did, I would still need to find a way to set it for the mcuboot build, outside mcuboot.conf, which will not let me do conditionals to detect the OS.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Please advice.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>