<?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>The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54886/the-problem-of-uploading-zip-file-with-dfu</link><description>Hi there. 
 board : MBN52832 
 SDK : 15.3.0 
 Softdevice : S132, Ver 6.1.1 
 example file : ....\examples\dfu\bootloader_secure_ble 
 (refer) Nordic Documents : https://infocenter.nordicsemi.com/index.jsp , Nordic Blog : //devzone.nordicsemi.com/nordic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 30 Nov 2019 14:06:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54886/the-problem-of-uploading-zip-file-with-dfu" /><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222890?ContentTypeID=1</link><pubDate>Sat, 30 Nov 2019 14:06:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93d31d8e-8ef6-45e2-877e-71043e0de4f8</guid><dc:creator>micmind</dc:creator><description>&lt;p&gt;the issue is fixed now.&lt;/p&gt;
&lt;p&gt;it is caused by tool &amp;quot;nrfutil&amp;quot;. the vesion in my test is 6.0.0a1 before. Maybe this version has bug.&lt;/p&gt;
&lt;p&gt;after I updated it with the version 6.0.0 &amp;lt;published in date 29/10/2019&amp;gt; ,&amp;nbsp; ota can be done without any error.&lt;/p&gt;
&lt;p&gt;So I think it must be the issue of tool nrfutil.exe.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;by the way,&amp;nbsp; nrfutil.exe can be download from website &amp;lt;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/releases&amp;gt;"&gt;github.com/.../releases&amp;gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222811?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 12:44:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f6f6346-dc5b-4b4f-886c-23fb0dcf4c31</guid><dc:creator>speedycat</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/ym_5f00_beginner"&gt;YoungMin&lt;/a&gt;: Since you eventually made it working, can you try to generate `dfu_public_key.c` with the older v3.5.1 version of &lt;em&gt;nrfutil&lt;/em&gt; and see if that file also works. i.e. the bytes are in correct order? See my reply to &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt; above. It would be good for NordicSemi to fix this problem for others.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222806?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 12:40:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b353e83a-5b59-4003-8807-a1514d3af5fd</guid><dc:creator>speedycat</dc:creator><description>&lt;p&gt;There is something wrong with how&amp;nbsp; &lt;em&gt;nrfutil&lt;/em&gt; generates the `dfu_public_key.c` in newer versions of &lt;em&gt;nrfutil&lt;/em&gt;. We used lot of time getting the examples run with our own keys, and eventually stumbled upon this thread which solved our issue: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52946/nrfutil-and-dfu---invalid-object"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/52946/nrfutil-and-dfu---invalid-object&lt;/a&gt; . Using the older v3.5.1 of &lt;em&gt;nrfutil&lt;/em&gt; generates `dfu_public_key.c` with the bytes in correct order for bootloader to work.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how it suppose to work, but something inconsistent.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222605?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 11:24:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec3d42ac-cdb5-4322-b975-d994ab32d373</guid><dc:creator>YoungMin</dc:creator><description>&lt;p&gt;thank you for your reply.&lt;/p&gt;
&lt;p&gt;i already solved this problem.&lt;/p&gt;
&lt;p&gt;it is the problem key file -&amp;gt; .c code file&lt;/p&gt;
&lt;p&gt;i dont know why nrfutil command work strange.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;so i use command &amp;quot;&lt;span&gt;nrfutil keys display --key pk --format hex ...\Desktop\pip\private_key.pem&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and, make the .c key file myself.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222602?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 11:20:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4d0a269-179c-4dd2-bf33-0f5d64cba325</guid><dc:creator>YoungMin</dc:creator><description>&lt;p&gt;Yep, it was solved.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i dont know why the wrong .c key file appear, when i use the command nrfutil(&lt;span&gt;nrfutil keys display --key pk --format code ...\Desktop\pip\private_key.pem --out_file private_key.c&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;the problem is wrong .c key file.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;so, what should you check the key between .c file and generated code (it can show through command &amp;quot;nrfutil keys display --key pk --format hex ...\Desktop\pip\private_key.pem&amp;quot; in cmd)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222561?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 09:50:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d7d36e1-353c-42c6-b82d-2fbd8543370e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi CUI,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We need to debug the bootloader to check what went wrong here.&amp;nbsp;&lt;br /&gt;Please try testing with the bootloader _debug version where you can have the RTT log.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Make sure the log level is set to DEBUG in sdk_config.h&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are several reasons the DFU return INVALID_OBJECT. One of them is the signature is not correct , see&amp;nbsp;nrf_dfu_validation_signature_check() in nrf_dfu_validation.c .&lt;br /&gt;Another option could be that the init packet was corrupted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are about 5-6 places where&amp;nbsp;NRF_DFU_RES_CODE_INVALID_OBJECT returned. If the logging doesn&amp;#39;t help, you can add breakpoints at those place to check what returned.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since you mentioned that&amp;nbsp; &amp;quot;&lt;span&gt;only the example target file in folder “examples\dfu\secure_dfu_test_images\ble\nrf52832”&amp;nbsp; can be OTA&amp;nbsp;&amp;quot; , most likely you haven&amp;#39;t updated the bootloader with your own PUBLIC key.&amp;nbsp;&lt;br /&gt;In this line, you should generate an output public key file:&amp;nbsp;nrfutil keys display --key pk --format code private.pem&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfutil keys display --key pk --format code private.key --out_file public_key.c&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you include the public_key.c in your bootloader, replacing the dfu_public_key.c default in the bootloader.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222432?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 15:50:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4892da0-59e7-4431-9d21-9fb323947acb</guid><dc:creator>micmind</dc:creator><description>&lt;p&gt;yes, I tried more than 20 times, with different solution base on official guide and others.&lt;br /&gt;&lt;br /&gt;I can&amp;#39;t figure out what is the problem eventually.&lt;br /&gt;&lt;br /&gt;my test bed is&lt;br /&gt;&lt;br /&gt;1. IAR 8.30.1&lt;br /&gt;&lt;br /&gt;2. nRF5_SDK_15.3.0&lt;br /&gt;&lt;br /&gt;3. Chip: NRF52832&lt;br /&gt;&lt;br /&gt;4.version of make is 3.81&lt;br /&gt;&lt;br /&gt;5. version of urfutil is 6.0.0a1&lt;br /&gt;&lt;br /&gt;7. version of mergehex is 8.5.0&lt;br /&gt;&lt;br /&gt;8. and version of arm-none-eabi-gcc is 9.2.1&lt;br /&gt;&lt;br /&gt;I compiled bootloader project in foler &amp;quot;examples\dfu\secure_bootloader\pca10040_ble&amp;quot; and the debug version.&lt;br /&gt;&lt;br /&gt;and the app is come from &amp;quot;examples\ble_peripheral\ble_app_buttonless_dfu\pca10040&amp;quot;.&lt;br /&gt;&lt;br /&gt;at the previous several times, I didn&amp;#39;t change anything of these project to verify the dfu and OTA.&lt;br /&gt;&lt;br /&gt;all my test are failed at the end.&lt;br /&gt;&lt;br /&gt;but, only the example target file in folder &amp;ldquo;examples\dfu\secure_dfu_test_images\ble\nrf52832&amp;rdquo;&amp;nbsp; can be OTA 。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t whether it is the issue related with &amp;quot;micro-ecc&amp;quot; .&amp;nbsp; but there is no any error reported during my test.&lt;br /&gt;&lt;br /&gt;And I found the example bootloader proect called the ecc lib of the folder &amp;quot;external\micro-ecc\nrf52hf_iar\armgcc\micro_ecc_lib_nrf52.a&amp;quot;.&amp;nbsp; Help document from sdk said it is currect if I enable hardware FPU.&lt;br /&gt;&lt;br /&gt;And i also solved the issue &amp;quot;-short-char&amp;#39; related with &amp;quot;wchar_t&amp;quot; is 16bit or 32bit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;besides, i tried with different application version and&amp;nbsp; --bl-settings-version, no one can give me a success result.&lt;/p&gt;
&lt;p&gt;i also checked the help of nrfutil,&amp;nbsp; --bl-settings-version should be 2 for SDK15.3.0,&amp;nbsp; and --sd-req should 0xB7. So I think my script might be no problem.&lt;/p&gt;
&lt;p&gt;I also tried the buttonless example with different version and other app example such as uart or hrs.but&amp;nbsp; no one can be successfully ota.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;here is my script related this process. I really don&amp;#39;t know where I was wrong.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;::step1 generateo private key-file
nrfutil keys generate private.pem
nrfutil keys display --key pk --format code private.pem&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;::step2
nrfutil settings generate --family NRF52 --application app_ota.hex --application-version-string 0.0.0 --bootloader-version 0 --bl-settings-version 2 settings.hex &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;::step3
mergehex.exe --merge s132_nrf52_6.1.1_softdevice.hex bootloader.hex   --output ota_sd_boot.hex
mergehex.exe --merge app_ota.hex ota_sd_boot.hex settings.hex         --output ota_all.hex

del /f ota_sd_boot.hex &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;::step4
nrfjprog.exe --family NRF52 --eraseall
nrfjprog.exe --family NRF52 --program ota_all.hex --verify
nrfjprog.exe --family NRF52 --reset 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;::step5
nrfutil pkg generate --hw-version 52 --sd-req 0xB7 --application-version 1 --application app_ota.hex --key-file private.pem app_ota.zip
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;here is error message form IOS and android during OTA.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IOS error report" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2867.ios.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="android error report." src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/android.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222366?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 13:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b89d90c-3416-42fa-8ae4-1afa58a3e08b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try follow my step by step guide &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader"&gt;here &lt;/a&gt;and check if you have the same issue ?&amp;nbsp;&lt;br /&gt;Could you try setting application version to 1 instead of 0 ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The problem of Uploading Zip file with DFU</title><link>https://devzone.nordicsemi.com/thread/222201?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 03:15:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1667f2c-26c8-4590-8f7b-6083ee71c8f2</guid><dc:creator>micmind</dc:creator><description>&lt;p&gt;i met this issue for several days. still not fix it.....do you have any suggest ???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>