<?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>NRF Connect app stuck on &amp;quot;VALIDATING&amp;quot; when performing DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71795/nrf-connect-app-stuck-on-validating-when-performing-dfu</link><description>Based on documentation included in http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf52.html#fota-upgrades I am attempting to get DFU working on the following setup: 
 -nRF52840 
 -nrfConnect/Zephyr 
 -MCUBoot 
 
 I am loading the </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Feb 2021 12:08:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71795/nrf-connect-app-stuck-on-validating-when-performing-dfu" /><item><title>RE: NRF Connect app stuck on "VALIDATING" when performing DFU</title><link>https://devzone.nordicsemi.com/thread/295814?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 12:08:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d60b042-b486-4f73-8b3e-b54fe44373da</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/members/jon-rhees"&gt;Jon&lt;/a&gt;: It seems like your initial issue is solved: performing BLE DFU on the nRF52840 using the mcumgr protocol. Right?&lt;/p&gt;
&lt;p&gt;Could you open a new ticket about &amp;quot;&lt;span&gt;maximize throughput on DFU from IOS and Android&lt;/span&gt;&amp;quot;. This way we can keep the forum more organized and easier to navigate for other developers. By the way, I recommend you to check out the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-Device-Manager"&gt;nRF Connect Device Manager App&lt;/a&gt;, which is made for&amp;nbsp;your usecase;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;updating and managing devices running nRF Connect SDK (using the mcumgr protocol).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/members/mike-hibbett"&gt;Mike Hibbett&lt;/a&gt;: Your case will be assigned to a Nordic engineer today, which will take a look at you issue.&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;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect app stuck on "VALIDATING" when performing DFU</title><link>https://devzone.nordicsemi.com/thread/295788?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 10:22:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab4f36b9-876e-444e-89f6-988e36cea111</guid><dc:creator>Mike Hibbett</dc:creator><description>&lt;p&gt;I too am experiencing this issue. I reported it here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71915/fota-with-nordic-connect-sdk-ncs-not-working"&gt;devzone.nordicsemi.com/.../fota-with-nordic-connect-sdk-ncs-not-working&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect app stuck on "VALIDATING" when performing DFU</title><link>https://devzone.nordicsemi.com/thread/295457?ContentTypeID=1</link><pubDate>Sun, 21 Feb 2021 10:35:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12af122a-d5d6-438d-b546-84a7634665a0</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Sorry for the delay on this, I&amp;#39;ll look into this the next week&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect app stuck on "VALIDATING" when performing DFU</title><link>https://devzone.nordicsemi.com/thread/295445?ContentTypeID=1</link><pubDate>Sat, 20 Feb 2021 19:01:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:991b3cb5-0028-455f-89dd-71a8f397c767</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Yet another update:&lt;/p&gt;
&lt;p&gt;I added the following configs and was able to get a DFU to work from the NRF Connect app (note that I am still unsuccessful from the NRF Toolbox app, as I still get the same &amp;#39;&lt;span&gt;DFU Init packet required&amp;#39; error):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BT_RX_BUF_LEN=86&lt;br /&gt;CONFIG_BT_L2CAP_RX_MTU=75&lt;br /&gt;CONFIG_BT_L2CAP_TX_MTU=75&lt;br /&gt;CONFIG_MCUMGR_SMP_BT_AUTHEN=n&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With said configuration, I see a throughput of about 0.5KB/sec from my Android phone.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then I made the following changes to increase MTU:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BT_RX_BUF_LEN=258&lt;br /&gt;CONFIG_BT_L2CAP_RX_MTU=247&lt;br /&gt;CONFIG_BT_L2CAP_TX_MTU=247&lt;br /&gt;CONFIG_BT_CTLR_TX_BUFFER_SIZE=251&lt;br /&gt;CONFIG_BT_CTLR_DATA_LENGTH_MAX=251&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With this configuration, I see an average throughput of about 2.3KB/sec. I tried further increasing the MTU to 517 as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BT_RX_BUF_LEN=528&lt;br /&gt;CONFIG_BT_L2CAP_RX_MTU=517&lt;br /&gt;CONFIG_BT_L2CAP_TX_MTU=517&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;...but with this configuration I get an assert:&amp;quot;ASSERTION FAIL [net_buf_simple_tailroom(buf) &amp;gt;= len] @ WEST_TOPDIR/zephyr/subsys/net/buf.c:793&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you provide information on the ideal configuration to maximize throughput on DFU from IOS and Android (I realize that some issues cannot be controlled since they are handled by the mobile OS).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect app stuck on "VALIDATING" when performing DFU</title><link>https://devzone.nordicsemi.com/thread/295399?ContentTypeID=1</link><pubDate>Fri, 19 Feb 2021 16:26:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:214b60a5-a988-4dfe-b23e-126f20ecc97b</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Another update: I traced the DFU process to the point where the first upload message is sent to the device from the NRF Connect app. The CBOR message includes the MCUBoot header. The message includes the CBOR payload as follows:&lt;/p&gt;
&lt;p&gt;{&amp;quot;data&amp;quot;: h&amp;#39;3DB8F3960000000000020000344B0800000000000000&amp;#39;, &amp;quot;len&amp;quot;: 544203, &amp;quot;sha&amp;quot;: h&amp;#39;034862&amp;#39;, &amp;quot;off&amp;quot;: 0}&lt;/p&gt;
&lt;p&gt;As you can see, the MCUBoot magic is correct (&lt;span class="cp"&gt;0x96f3b83d). However, this data is rejected in the function&amp;nbsp;img_mgmt_impl_upload_inspect() in &amp;#39;modules/lib/mcumgr/cmd/img_mgmt/port/zephyr/src/zephyr_img_mgmt.c&amp;#39; of the NRFConnect SDK because the header sent by the app only contains 22 bytes of data, whereas the MCUBoot header is defined as 32 bytes in length. The line which checks this is:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="cp"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    if (req-&amp;gt;off == 0) {
        /* First upload chunk. */
        if (req-&amp;gt;data_len &amp;lt; sizeof(struct image_header)) {
            /*
             * Image header is the first thing in the image.
             */
            *errstr = img_mgmt_err_str_hdr_malformed;
            return MGMT_ERR_EINVAL;
        }
&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="cp"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect app stuck on "VALIDATING" when performing DFU</title><link>https://devzone.nordicsemi.com/thread/295242?ContentTypeID=1</link><pubDate>Fri, 19 Feb 2021 01:41:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e53d27ed-41ec-453e-88c4-ef27b7c179be</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;An update: I disabled CONFIG_MCUMGR_SMP_BT_AUTHEN, and now Nrf Connect app gets a little bit further: Instead of getting hung on the &amp;#39;Validating&amp;#39; message. it quickly flashes &amp;quot;Starting DFU&amp;quot; and then exits back to the characteristics screen.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Jon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>