<?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>OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92782/ota-failed-failed-to-mcumgr-dfu-invalid-header-magic-number</link><description>why can cause this problem！ I&amp;#39;m not familiar with NCS OTA</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Oct 2022 12:22:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92782/ota-failed-failed-to-mcumgr-dfu-invalid-header-magic-number" /><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390992?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 12:22:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc03e460-1de7-4381-8e51-887171a53122</guid><dc:creator>spring.liu</dc:creator><description>&lt;p&gt;smp_svr&amp;nbsp; I run and it is ok&amp;nbsp; ,I tried to transplant&amp;nbsp; main.c and bluetooth.c .I hope it will work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390954?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 10:42:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17f93612-3630-46ec-8490-23809c855869</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;We do, that is the example I referred to under&amp;nbsp;&amp;lt;SDK&amp;gt;/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/. See documentation here: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;SMP Server Sample&lt;/a&gt;. This sample works out of the box. You use it in the exact same way as you do with 2.0.0, just remember to use the configuration overlay file for Bluetooth when you build it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390953?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 10:39:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e9c3817-c886-440f-a3a0-1491736aeafd</guid><dc:creator>spring.liu</dc:creator><description>&lt;p&gt;Do not work ！ if you have the OTA example in ncs1.5.1 ,you can send to me&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390951?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 10:31:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34981341-b6f5-4a33-88ed-5097500b8ae5</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="spring.liu"]it is new problem[/quote]
&lt;p&gt;Good to know. This is important information.&lt;/p&gt;
[quote user="spring.liu"]&lt;span&gt;As&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;mentioned above,&lt;/span&gt;Migration steps&amp;nbsp; inNCS2.0.0 is ok&amp;nbsp; &amp;nbsp;what different with NCS1.5.1[/quote]
&lt;p&gt;There has been a lot of changes between these (they are 5 releases apart, ignoring bug-fix release), but the fundamentals remain mostly the same. For details, you should refer to the SMP SVR sample for the release you are using.&lt;/p&gt;
[quote user="spring.liu"]&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;Add DFU support to your application - Software - nRF Connect SDK guides - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&amp;nbsp; &amp;nbsp;it is ok ？&amp;nbsp; &amp;nbsp; &amp;nbsp;where is SMP Server Sample&amp;nbsp;path？&amp;nbsp;&amp;nbsp;[/quote]
&lt;p&gt;The principles are OK, but there are minor differences. The sample path is: &amp;lt;SDK&amp;gt;/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390950?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 10:24:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58d84af5-e9e9-4a28-aa1c-80f79e7e5e7a</guid><dc:creator>spring.liu</dc:creator><description>&lt;ol&gt;
&lt;li class="name"&gt;
&lt;pre class="name"&gt;it is new problem&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p class="src grammarSection" data-group="1-1"&gt;&lt;span class="tran" data-group="0_0"&gt;As&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="tran highlight" data-group="1_1"&gt;mentioned above,&lt;/span&gt;Migration steps&amp;nbsp; inNCS2.0.0 is ok&amp;nbsp; &amp;nbsp;what different with NCS1.5.1&lt;/p&gt;
&lt;/li&gt;
&lt;li class="name"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;Add DFU support to your application - Software - nRF Connect SDK guides - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&amp;nbsp; &amp;nbsp;it is ok ？&amp;nbsp; &amp;nbsp; &amp;nbsp;where is SMP Server Sample&amp;nbsp;path？&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390949?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 10:15:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c13d6113-11a4-46e9-a8a3-dc5321f70316</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This bin looks good in this regard. Are you sure you get the &amp;quot;Invalid header magic number&amp;quot; error with this file? Or is it so that you get another error when you changed to (what looks like) the correct file?&lt;/p&gt;
&lt;p&gt;Note that you can refer to the&amp;nbsp;SMP Server Sample to see a working DFU example. I would recommend that you use that as a reference, and perhaps also test that sample first to check that your procedure is correct. Then, you can copy-paste configurations and a few things from main.c and bluetooth.c into your application in order to use it there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390934?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 09:21:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dae745ce-f83b-476d-a4b5-ecc8715a3fc0</guid><dc:creator>spring.liu</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/123.zip"&gt;devzone.nordicsemi.com/.../123.zip&lt;/a&gt; this is the program&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390933?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 09:19:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2e5b937-cbd7-4cf8-84c0-fb84d5560657</guid><dc:creator>spring.liu</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/app_5F00_update.zip"&gt;devzone.nordicsemi.com/.../app_5F00_update.zip&lt;/a&gt;this is the&amp;nbsp; &amp;nbsp; .bin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390930?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 09:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3a61f6b-b639-4299-a724-10b9097ba107</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The only way I am able to reproduce this is by using an invalid image. Can you clarify which image file you use with nRF Connect? You should use the file called &amp;quot;app_update_bin&amp;quot;, and this is found under build/zephyr.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390926?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 09:05:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f10dedcd-269a-4472-b4f0-b5ce54ebff2d</guid><dc:creator>spring.liu</dc:creator><description>&lt;p&gt;and how to open the OTA LOG&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_DFU_SMP_LOG_LEVEL&lt;/span&gt;&lt;span&gt;=4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_DEBUG_LOG&lt;/span&gt;&lt;span&gt; =y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_LOG_DEFAULT_LEVEL&lt;/span&gt;&lt;span&gt;=4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;this is only&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&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/pastedimage1665997532983v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390882?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 02:51:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ace5256-3fea-4506-8fff-ec8077392af0</guid><dc:creator>spring.liu</dc:creator><description>&lt;p&gt;I use NCS 1.5.1&amp;nbsp; uart example (ncs1.5.1\nrf\samples\bluetooth\peripheral_uart) add the ota, but fail&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1665974489880v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Steps are as follows&lt;/p&gt;
&lt;p&gt;1. add this code to&amp;nbsp;&lt;span&gt;prj.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BOOTLOADER_MCUBOOT=y &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_MCUMGR=y &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_MCUMGR_CMD_IMG_MGMT=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; CONFIG_MCUMGR_CMD_OS_MGMT=y &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BT_L2CAP_TX_MTU=252&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#CONFIG_BT_BUF_ACL_RX_SIZE&lt;/span&gt;&lt;span&gt;=256&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this in NCS2.0.0 is ok&amp;nbsp; but ncs1.5.1 without it&amp;nbsp; &amp;nbsp;so&amp;nbsp;&lt;span style="font-family:inherit;"&gt;CONFIG_BT_&lt;/span&gt;&lt;span class="highlighted" style="font-family:inherit;"&gt;ACL&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;_RX_COUNT replace it&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;CONFIG_BT_&lt;/span&gt;&lt;span class="highlighted" style="font-family:inherit;"&gt;ACL&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;_RX_COUNT=256&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_MCUMGR_SMP_BT=y &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_MCUMGR_SMP_BT_AUTHEN=n &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.add this code to main.c&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1665974678781v5.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p class="src grammarSection" data-group="1-1"&gt;I used this same approach successfully in NCS2.0&amp;nbsp; 。but NCS1.5.1&amp;nbsp; without&amp;nbsp;&lt;span&gt;CONFIG_BT_BUF_ACL_RX_SIZE and OTA failed。 the reson is MCUmgr disconnecting&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Failed！Failed to Mcumgr DFU: Invalid header magic number</title><link>https://devzone.nordicsemi.com/thread/390453?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2022 12:55:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9599f2a6-11b8-4988-aee1-bd28a2816210</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The error refers to the magic image number that is used in MCUboot (0x96f3b83d), and that is not found as expected in the image. Where does this .bin file come from? Are you sure it is a valid update image?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>