<?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>Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49005/issuse-about-nrf51822-ota-by-android-9-0</link><description>Hi,I had a problem with nRF51822 DFU.I tried to OTD nRF51822( version SDK_9.0.0 s110 ) wiht Android 9.0 devices( nRF tool version 1.9.0 ),but it always fail at 1%.The problem occured because of the version? The log of Android dfu is on attachment.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Jul 2019 09:53:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49005/issuse-about-nrf51822-ota-by-android-9-0" /><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/196469?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 09:53:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3b386c1-2e48-4c97-8287-49858bc93739</guid><dc:creator>james</dc:creator><description>&lt;p&gt;Thanks Bjorn. I&amp;nbsp;&lt;span&gt;set the number of packets to 8, it works fine too.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/196465?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 09:43:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffdcf756-d326-4d10-8f84-7c15d9b29739</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI James,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the older bootloaders SDK v9.0.0 and older had a known issue with the packet buffers being filled up faster than the data could be written to flash, if the the central sent packets with a very short interval and/or sent many packets per connection interval. So that is why we have the PRN (&lt;span&gt;packes receipts notification) which sets the number of packets between each acknowledgement from the DfuTarget. If you set it to 1, the DfuTarget will ack every packet and prevent the buffer from overflowing. Increasing the connection interval will also work, as you have seen.&amp;nbsp;&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;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/196355?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 01:17:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:876f3758-d822-4861-9aa6-f2606b59b024</guid><dc:creator>james</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Bj&amp;oslash;rn,I changed the MIN_CONN_INTERVAL&lt;/span&gt;&amp;nbsp;from 15 to 25, it worked fine now.I didn&amp;#39;t know why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/196304?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 13:50:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adfe344c-e94e-4e96-9305-a966b02b8e28</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI James, I took a closer look at the Android log and its not the Init or start packet, as I can see that these are processed correctly. The error occurs when the DFU controller(Android phone) is writing to the DFU Packet characteristic. I believe that we&amp;#39;re entering the default case in&amp;nbsp;nrf_err_code_translate() which is called by&amp;nbsp;dfu_error_notify() which is in turn called by app_data_process() if something goes wrong during the reception of the firmware data.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;My bet is that&amp;nbsp;hci_mem_pool_rx_consume() is returning&amp;nbsp;NRF_ERROR_NO_MEM, which is translated to&amp;nbsp;BLE_DFU_RESP_VAL_OPER_FAILED by&amp;nbsp;nrf_err_code_translate().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to use the nRF connect application and enable the packes receipts notification and set the number of packets to 1 under DFU Settings.? ( DFU settings is found under settings when pressing the three horizontal bars in the upper-left corner of the app window. )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/196096?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 01:38:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6b07647-ba66-4b2b-a4c5-f3c525134118</guid><dc:creator>james</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Bj&amp;oslash;rn, I generate the firmware image by&amp;nbsp;&lt;/span&gt;Master&amp;nbsp;Control&amp;nbsp;Panel\3.8.0.7\nrf\nrf.exe&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/195973?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 12:04:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8bc8c1b-7ee8-439c-bcea-84f6205fe459</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi James, the SDK v9.0.0 bootloader will reply with op Code 6 (&lt;span&gt;Operation Failed) if the length of the start DFU packet or Init packet is longer than&amp;nbsp;PKT_START_DFU_PARAM_LEN (2).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint32_t on_ctrl_pt_write(ble_dfu_t * p_dfu, ble_gatts_evt_write_t * p_ble_write_evt)
{
    ble_gatts_rw_authorize_reply_params_t write_authorize_reply;

    write_authorize_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE;

    if (!is_cccd_configured(p_dfu))
    {
        // Send an error response to the peer indicating that the CCCD is improperly configured.
        write_authorize_reply.params.write.gatt_status =
            BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR;

        return (sd_ble_gatts_rw_authorize_reply(p_dfu-&amp;gt;conn_handle, &amp;amp;write_authorize_reply));

    }
    else
    {
        uint32_t err_code;

        write_authorize_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS;

        err_code = (sd_ble_gatts_rw_authorize_reply(p_dfu-&amp;gt;conn_handle, &amp;amp;write_authorize_reply));

        if (err_code != NRF_SUCCESS)
        {
            return err_code;
        }
    }

    ble_dfu_evt_t ble_dfu_evt;

    switch (p_ble_write_evt-&amp;gt;data[0])
    {
        case OP_CODE_START_DFU:
            ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_START;

            if (p_ble_write_evt-&amp;gt;len &amp;lt; PKT_START_DFU_PARAM_LEN)
            {
                return ble_dfu_response_send(p_dfu,
                                             (ble_dfu_procedure_t) p_ble_write_evt-&amp;gt;data[0],
                                             BLE_DFU_RESP_VAL_OPER_FAILED);
            }

            ble_dfu_evt.evt.ble_dfu_pkt_write.len    = 1;
            ble_dfu_evt.evt.ble_dfu_pkt_write.p_data = &amp;amp;(p_ble_write_evt-&amp;gt;data[1]);

            p_dfu-&amp;gt;evt_handler(p_dfu, &amp;amp;ble_dfu_evt);
            break;

        case OP_CODE_RECEIVE_INIT:
            ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_RECEIVE_INIT_DATA;

            if (p_ble_write_evt-&amp;gt;len &amp;lt; PKT_INIT_DFU_PARAM_LEN)
            {
                return ble_dfu_response_send(p_dfu,
                                             (ble_dfu_procedure_t) p_ble_write_evt-&amp;gt;data[0],
                                             BLE_DFU_RESP_VAL_OPER_FAILED);
            }
            
            ble_dfu_evt.evt.ble_dfu_pkt_write.len    = 1;
            ble_dfu_evt.evt.ble_dfu_pkt_write.p_data = &amp;amp;(p_ble_write_evt-&amp;gt;data[1]);

            p_dfu-&amp;gt;evt_handler(p_dfu, &amp;amp;ble_dfu_evt);
            break;
        .
        .
        .
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which version of nrfutil did you use to generate the firmware image used for the DFU?&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;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/195778?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 01:27:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fa7fc27-a288-4219-ad60-0fff30acb586</guid><dc:creator>james</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/android9.0.txt"&gt;devzone.nordicsemi.com/.../android9.0.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/195659?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 13:04:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:017158fc-e0ad-4673-b120-42a34d87c686</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi james,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The attachment has still not been uploaded properly. Upload by &lt;em&gt;Insert-&amp;gt;insert image/video/file&lt;/em&gt;, next &lt;em&gt;chose from file upload&lt;/em&gt; and then &lt;em&gt;browse&lt;/em&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/195612?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 11:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aef216f7-8ce3-4793-9cf0-a393544052be</guid><dc:creator>james</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry. I had uploaded the attachment again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issuse about nRF51822 OTA By Android 9.0</title><link>https://devzone.nordicsemi.com/thread/195610?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 11:31:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11843964-2c3c-49d3-b604-c55b96ae63c3</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you retry uploading the attachment? It doesn&amp;#39;t seem it got uploaded.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>