<?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>Init Packet</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50438/init-packet</link><description>I&amp;#39;m referring this 
 https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Flib_dfu_transport_ble.html 
 which states that when in bootloader mode, I&amp;#39;ve to send the init packet first &amp;amp; then the firmware image. 
 So what</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Jan 2022 11:15:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50438/init-packet" /><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/346123?ContentTypeID=1</link><pubDate>Wed, 05 Jan 2022 11:15:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:048658b7-e4c0-46ac-b3c8-d477b719576f</guid><dc:creator>Rakkumuthu</dc:creator><description>&lt;p&gt;Hi Bjorn,&lt;/p&gt;
&lt;p&gt;I have the init packet as 141 bytes. I am sending over the DFU packet characteristics as 15 bytes from nrf52833 controller. The another nrf52833 DFU bootloader receives upto 135 bytes. the last set of 6 bytes are not received by the bootloader. If i retransmit also, it gives the same result. Please suggest how to send all the 141 init bytes data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/206354?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2019 11:55:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53198b37-017a-44b4-9463-0f0874f930e8</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Sonal,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;its on_data_obj_write_request() in nrf_dfu_req_handler.c that handles data sent do the DFU packet characteristic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
    NRF_LOG_DEBUG(&amp;quot;Handle NRF_DFU_OP_OBJECT_WRITE (data)&amp;quot;);

    if (!nrf_dfu_validation_init_cmd_present())
    {
        /* Can&amp;#39;t accept data because DFU isn&amp;#39;t initialized by init command. */
        p_res-&amp;gt;result = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;
        return;
    }

    uint32_t const data_object_offset = s_dfu_settings.progress.firmware_image_offset -
                                        s_dfu_settings.progress.firmware_image_offset_last;

    if ((p_req-&amp;gt;write.len + data_object_offset) &amp;gt; s_dfu_settings.progress.data_object_size)
    {
        /* Can&amp;#39;t accept data because too much data has been received. */
        NRF_LOG_ERROR(&amp;quot;Write request too long&amp;quot;);
        p_res-&amp;gt;result = NRF_DFU_RES_CODE_INVALID_PARAMETER;
        return;
    }

    uint32_t const write_addr = m_firmware_start_addr + s_dfu_settings.write_offset;

    ASSERT(p_req-&amp;gt;callback.write);

    ret_code_t ret =
        nrf_dfu_flash_store(write_addr, p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, p_req-&amp;gt;callback.write);

    if (ret != NRF_SUCCESS)
    {
        /* When nrf_dfu_flash_store() fails because there is no space in the queue,
         * stop processing the request so that the peer can detect a CRC error
         * and retransmit this object. Remember to manually free the buffer !
         */
        p_req-&amp;gt;callback.write((void*)p_req-&amp;gt;write.p_data);
        return;
    }

    /* Update the CRC of the firmware image. */
    s_dfu_settings.write_offset                   += p_req-&amp;gt;write.len;
    s_dfu_settings.progress.firmware_image_offset += p_req-&amp;gt;write.len;
    s_dfu_settings.progress.firmware_image_crc     =
        crc32_compute(p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, &amp;amp;s_dfu_settings.progress.firmware_image_crc);

    /* This is only used when the PRN is triggered and the &amp;#39;write&amp;#39; message
     * is answered with a CRC message and these field are copied into the response.
     */
    p_res-&amp;gt;write.crc    = s_dfu_settings.progress.firmware_image_crc;
    p_res-&amp;gt;write.offset = s_dfu_settings.progress.firmware_image_offset;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If the DFU process stops, then please post the debug log output from the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is possible to write larger chunks than 20 bytes as long as you do not exceed the object size, see&amp;nbsp;on_data_obj_write_request().&amp;nbsp; The ATT MTU size is negotiable, see&amp;nbsp;the&amp;nbsp;BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST case in&amp;nbsp;ble_evt_handler() in nrf_dfu_ble.c. It can be set as high as&amp;nbsp;NRF_SDH_BLE_GATT_MAX_MTU_SIZE, i.e. 247.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/206353?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2019 11:55:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef7f94da-9f42-4728-8888-f18650004573</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Sonal,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;its on_data_obj_write_request() in nrf_dfu_req_handler.c that handles data sent do the DFU packet characteristic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
    NRF_LOG_DEBUG(&amp;quot;Handle NRF_DFU_OP_OBJECT_WRITE (data)&amp;quot;);

    if (!nrf_dfu_validation_init_cmd_present())
    {
        /* Can&amp;#39;t accept data because DFU isn&amp;#39;t initialized by init command. */
        p_res-&amp;gt;result = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;
        return;
    }

    uint32_t const data_object_offset = s_dfu_settings.progress.firmware_image_offset -
                                        s_dfu_settings.progress.firmware_image_offset_last;

    if ((p_req-&amp;gt;write.len + data_object_offset) &amp;gt; s_dfu_settings.progress.data_object_size)
    {
        /* Can&amp;#39;t accept data because too much data has been received. */
        NRF_LOG_ERROR(&amp;quot;Write request too long&amp;quot;);
        p_res-&amp;gt;result = NRF_DFU_RES_CODE_INVALID_PARAMETER;
        return;
    }

    uint32_t const write_addr = m_firmware_start_addr + s_dfu_settings.write_offset;

    ASSERT(p_req-&amp;gt;callback.write);

    ret_code_t ret =
        nrf_dfu_flash_store(write_addr, p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, p_req-&amp;gt;callback.write);

    if (ret != NRF_SUCCESS)
    {
        /* When nrf_dfu_flash_store() fails because there is no space in the queue,
         * stop processing the request so that the peer can detect a CRC error
         * and retransmit this object. Remember to manually free the buffer !
         */
        p_req-&amp;gt;callback.write((void*)p_req-&amp;gt;write.p_data);
        return;
    }

    /* Update the CRC of the firmware image. */
    s_dfu_settings.write_offset                   += p_req-&amp;gt;write.len;
    s_dfu_settings.progress.firmware_image_offset += p_req-&amp;gt;write.len;
    s_dfu_settings.progress.firmware_image_crc     =
        crc32_compute(p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, &amp;amp;s_dfu_settings.progress.firmware_image_crc);

    /* This is only used when the PRN is triggered and the &amp;#39;write&amp;#39; message
     * is answered with a CRC message and these field are copied into the response.
     */
    p_res-&amp;gt;write.crc    = s_dfu_settings.progress.firmware_image_crc;
    p_res-&amp;gt;write.offset = s_dfu_settings.progress.firmware_image_offset;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If the DFU process stops, then please post the debug log output from the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is possible to write larger chunks than 20 bytes as long as you do not exceed the object size, see&amp;nbsp;on_data_obj_write_request().&amp;nbsp; The ATT MTU size is negotiable, see&amp;nbsp;the&amp;nbsp;BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST case in&amp;nbsp;ble_evt_handler() in nrf_dfu_ble.c. It can be set as high as&amp;nbsp;NRF_SDH_BLE_GATT_MAX_MTU_SIZE, i.e. 247.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/204371?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2019 23:12:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a860a7b0-c09a-421f-826d-2d7b7b1a86be</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/204131?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2019 14:52:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6980f88f-9af9-4998-af09-48cbc06ad9b8</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;I followed the sequence which you mentioned above. Could you please tell me the location where the packets from firmware file being received are handled in bootloader code? For me, the DFU process stops midway, like only 50% of the firmware file is sent OTA.&lt;/p&gt;
&lt;p&gt;How come nRFConnect sends 244 byte packets? The connection diagram&amp;nbsp;in the documentation mentions sending only 20 bytes. Also the sdk config file in the bootloader has 27 bytes set for BLE packet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/203746?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 08:14:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01d29051-f96b-431d-9d88-189a85384e7a</guid><dc:creator>bjorn-spockeli</dc:creator><description>[quote user="bop123"] I&amp;#39;m facing problems sending the firmware image. After I send 06 02, I receive&amp;nbsp;60-06-01-00-10-00-00-00-00-00-00-00-00-00-00. Does that mean each data object can only be 0x1000 bytes long?[/quote]
&lt;p&gt;&amp;nbsp;Yes, the maximum object size is 4kB (0x1000 bytes).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="bop123"]Can you please tell me the sequence of commands to send the firmware image? Should I send create command, CRC command &amp;amp; execute command separately for every data object or do I send it just once?[/quote]
&lt;p&gt;&amp;nbsp;This is described in the&amp;nbsp;&lt;a title="Transfer of a firmware image" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_dfu_transport_ble.html?cp=5_1_3_5_2_2_3_1#lib_dfu_transport_msc_data"&gt;Transfer of a firmware image&lt;/a&gt;&amp;nbsp;message sequence chart. The Select command should only be sent once in the beginning, then you will have to create data objects&amp;nbsp;, transfer the data and send CRC requests until all the objects have been transferred.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Once all objects have been received you send the Execute command.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/203702?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 00:02:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06904482-7bab-46ec-a308-9af1f684423e</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Thanks!! I&amp;#39;m facing problems sending the firmware image. After I send 06 02, I receive&amp;nbsp;60-06-01-00-10-00-00-00-00-00-00-00-00-00-00. Does that mean each data object can only be 0x1000 bytes long? Can you please tell me the sequence of commands to send the firmware image? Should I send create command, CRC command &amp;amp; execute command separately for every data object or do I send it just once?&lt;/p&gt;
&lt;p&gt;Also I never really get this response for both init packet &amp;amp; firmware image.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1565654751065v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/203509?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 08:54:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbf81fdf-2fba-4162-97b9-d40b6ac020d3</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Sonal,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Happy to hear that you&amp;#39;re able to send the init packet successfully now. The CRC32 request is handled by the&amp;nbsp;on_data_obj_crc_request() callback in nrf_dfu_req_handler.c. It simply retrieves the CRC stored on the bootloader settings page, see snippet below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void on_data_obj_crc_request(nrf_dfu_request_t * p_req, nrf_dfu_response_t * p_res)
{
    NRF_LOG_DEBUG(&amp;quot;Handle NRF_DFU_OP_CRC_GET (data)&amp;quot;);
    NRF_LOG_DEBUG(&amp;quot;Offset:%d, CRC:0x%08x&amp;quot;,
                 s_dfu_settings.progress.firmware_image_offset,
                 s_dfu_settings.progress.firmware_image_crc);

    p_res-&amp;gt;crc.crc    = s_dfu_settings.progress.firmware_image_crc;
    p_res-&amp;gt;crc.offset = s_dfu_settings.progress.firmware_image_offset;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The CRC value is updated on every write request to the DFU packet characteristic, which is handled by the&amp;nbsp;&amp;nbsp;on_data_obj_write_request() callback&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void on_data_obj_write_request(nrf_dfu_request_t * p_req, nrf_dfu_response_t * p_res)
{
    NRF_LOG_DEBUG(&amp;quot;Handle NRF_DFU_OP_OBJECT_WRITE (data)&amp;quot;);

    if (!nrf_dfu_validation_init_cmd_present())
    {
        /* Can&amp;#39;t accept data because DFU isn&amp;#39;t initialized by init command. */
        p_res-&amp;gt;result = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;
        return;
    }

    uint32_t const data_object_offset = s_dfu_settings.progress.firmware_image_offset -
                                        s_dfu_settings.progress.firmware_image_offset_last;

    if ((p_req-&amp;gt;write.len + data_object_offset) &amp;gt; s_dfu_settings.progress.data_object_size)
    {
        /* Can&amp;#39;t accept data because too much data has been received. */
        NRF_LOG_ERROR(&amp;quot;Write request too long&amp;quot;);
        p_res-&amp;gt;result = NRF_DFU_RES_CODE_INVALID_PARAMETER;
        return;
    }

    uint32_t const write_addr = m_firmware_start_addr + s_dfu_settings.write_offset;
    /* CRC must be calculated before handing off the data to fstorage because the data is
     * freed on write completion.
     */
    uint32_t const next_crc =
        crc32_compute(p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, &amp;amp;s_dfu_settings.progress.firmware_image_crc);

    ASSERT(p_req-&amp;gt;callback.write);

    ret_code_t ret =
        nrf_dfu_flash_store(write_addr, p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, p_req-&amp;gt;callback.write);

    if (ret != NRF_SUCCESS)
    {
        /* When nrf_dfu_flash_store() fails because there is no space in the queue,
         * stop processing the request so that the peer can detect a CRC error
         * and retransmit this object. Remember to manually free the buffer !
         */
        p_req-&amp;gt;callback.write((void*)p_req-&amp;gt;write.p_data);
        return;
    }

    /* Update the CRC of the firmware image. */
    s_dfu_settings.write_offset                   += p_req-&amp;gt;write.len;
    s_dfu_settings.progress.firmware_image_offset += p_req-&amp;gt;write.len;
    s_dfu_settings.progress.firmware_image_crc     = next_crc;

    /* This is only used when the PRN is triggered and the &amp;#39;write&amp;#39; message
     * is answered with a CRC message and these field are copied into the response.
     */
    p_res-&amp;gt;write.crc    = s_dfu_settings.progress.firmware_image_crc;
    p_res-&amp;gt;write.offset = s_dfu_settings.progress.firmware_image_offset;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It calls&amp;nbsp;crc32_compute to compute the CRC.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/203413?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 23:18:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e19ad539-d977-4cef-a098-ea94f1f3d43d</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Thanks Bjorn, I could successfully send the init packet with your help! Can you tell me how is the CRC32 response calculated?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/203294?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 11:58:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:898d1a21-74d6-4d58-9256-01259506cbeb</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Sonal,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It looks like you are writting the date of the init packet to the Control Point Characteristic and not the DFU Packet characteristic. You see that you get a lot of invalid opcode respones. Try writting the data to the DFU packet characteristic instead.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/203177?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2019 22:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1fc93b9-3d8f-4737-af40-4c1c306f79ff</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;My nrf log file which I captured using RTT viewer -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; &amp;lt;info&amp;gt; app: Inside main
00&amp;gt; &amp;lt;debug&amp;gt; app: In nrf_bootloader_init
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_settings: Settings OK
00&amp;gt; &amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate
00&amp;gt; &amp;lt;info&amp;gt; app: No firmware to activate.
00&amp;gt; &amp;lt;debug&amp;gt; app: Enter nrf_dfu_app_is_valid
00&amp;gt; &amp;lt;debug&amp;gt; app: No valid app to boot.
00&amp;gt; &amp;lt;debug&amp;gt; app: DFU mode because app is not valid.
00&amp;gt; &amp;lt;info&amp;gt; nrf_bootloader_wdt: WDT is not enabled
00&amp;gt; &amp;lt;debug&amp;gt; app: in weak nrf_dfu_init_user
00&amp;gt; &amp;lt;debug&amp;gt; app: timer_stop (0x200057D0)
00&amp;gt; &amp;lt;debug&amp;gt; app: timer_activate (0x200057D0)
00&amp;gt; &amp;lt;info&amp;gt; app: Entering DFU mode.
00&amp;gt; &amp;lt;debug&amp;gt; app: Initializing transports (found: 1)
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Initializing BLE DFU transport
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Setting up vector table: 0x00072000
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Enabling SoftDevice.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Configuring BLE stack.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Enabling the BLE stack.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: No advertising name found
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Using default advertising name
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Advertising...
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: BLE DFU transport initialized.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
00&amp;gt; &amp;lt;debug&amp;gt; app: Enter main loop
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Connected
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST (request: 527, reply: 247).
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (command)
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
00&amp;gt; &amp;lt;debug&amp;gt; app: Shutting down transports (found: 1)
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)
00&amp;gt; &amp;lt;debug&amp;gt; app: timer_stop (0x200057D0)
00&amp;gt; &amp;lt;debug&amp;gt; app: timer_activate (0x200057D0)
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
00&amp;gt; &amp;lt;info&amp;gt; nrf_dfu_req_handler: Invalid opcode received: 0x12.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x2
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 18 failed with error: 0x2
00&amp;gt; &amp;lt;info&amp;gt; nrf_dfu_req_handler: Invalid opcode received: 0x28.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x2
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 40 failed with error: 0x2
00&amp;gt; &amp;lt;info&amp;gt; nrf_dfu_req_handler: Invalid opcode received: 0xFC.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x2
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 252 failed with error: 0x2
00&amp;gt; &amp;lt;info&amp;gt; nrf_dfu_req_handler: Invalid opcode received: 0x8A.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x2
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 138 failed with error: 0x2
00&amp;gt; &amp;lt;info&amp;gt; nrf_dfu_req_handler: Invalid opcode received: 0x94.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x2
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 148 failed with error: 0x2
00&amp;gt; &amp;lt;info&amp;gt; nrf_dfu_req_handler: Invalid opcode received: 0xBF.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x2
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 191 failed with error: 0x2
00&amp;gt; &amp;lt;info&amp;gt; nrf_dfu_req_handler: Invalid opcode received: 0xE2.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x2
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 226 failed with error: 0x2
00&amp;gt; &amp;lt;info&amp;gt; nrf_dfu_req_handler: Invalid opcode received: 0x28.
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x2
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 40 failed with error: 0x2
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (command)
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (command)
00&amp;gt; &amp;lt;error&amp;gt; nrf_dfu_validation: Execute with faulty offset
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x8
00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_ble: DFUrequest 4 failed with error: 0x8
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 12
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 12
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 600&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Whats missing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/202980?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2019 08:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6de007e-dff0-4015-bb97-b5e6894c1adf</guid><dc:creator>bjorn-spockeli</dc:creator><description>[quote user="bop123"]Is the init packet generated from the zip package? - .dat file?&amp;nbsp;[/quote]
&lt;p&gt;Yes, the init packet is the .dat file in the zip package.&amp;nbsp;&lt;/p&gt;
[quote user="bop123"]I think the responses below are incorrect except the first two. What am I doing wrong?[/quote]
&lt;p&gt;&lt;br /&gt;The first request from the host is the select command, where the control point replies with&amp;nbsp;&lt;span&gt;60-06-01-00-01-00-00-00-00-00-00-00-00-00-00, which means that the Select command was successful, i.e.&amp;nbsp;60-06-01, then you have the max size of the init packet&amp;nbsp;00-01-00-00, the offset&amp;nbsp;00-00-00-00 and the CRC32&amp;nbsp;00-00-00-00.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The second request is a Create request from the host, i.e.&amp;nbsp;01 01, where it informs the Control Point that the size of the init packet is&amp;nbsp;8E 00 00 00.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The Control point should not respond to the data packets after the Control Point has replied with Create Success, i.e. 60-01-01.&lt;/p&gt;
&lt;p&gt;The two last operations consists of the following:&lt;/p&gt;
&lt;p&gt;Opcode 3 is a CRC request from the host. The control point replies with&amp;nbsp;&lt;span&gt;60-03-01-00-00-00-00-00-00-00-00, which is means NRF_SUCESS, but the offset and the current CRC is zero.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Opcode 4 is an Execute request from the host. The control point replies replies with&amp;nbsp;60-04-08, which means&amp;nbsp;NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I would recommend to debug the bootloader when you transfer the init packet and set breakpoints at the following locations in the bootloader code.&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;nRF5_SDK_15.2.0_9412b96/components/libraries/bootloader/dfu/nrf_dfu_req_handler.c:p_res-&amp;gt;result = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;
nRF5_SDK_15.2.0_9412b96/components/libraries/bootloader/dfu/nrf_dfu_req_handler.c:p_res-&amp;gt;result = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;
nRF5_SDK_15.2.0_9412b96/components/libraries/bootloader/dfu/nrf_dfu_req_handler.c:p_res-&amp;gt;result = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;
nRF5_SDK_15.2.0_9412b96/components/libraries/bootloader/dfu/nrf_dfu_req_handler.c:p_res-&amp;gt;result = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;
nRF5_SDK_15.2.0_9412b96/components/libraries/bootloader/dfu/nrf_dfu_validation.c:ret_val = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You should hit one of them and then hopefully get an indication to why the bootloader does not permit the init packet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/202932?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 21:43:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f444e4d-3a2d-419f-b393-3fbc221e2280</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Is the init packet generated from the zip package? - .dat file?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think the responses below are incorrect except the first two. What am I doing wrong?&lt;/p&gt;
&lt;table width="664"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="373"&gt;HOST -&amp;gt; BLE DEVICE&lt;/td&gt;
&lt;td width="291"&gt;BLE DEVICE -&amp;gt; HOST&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;06 01&lt;/td&gt;
&lt;td&gt;60-06-01-00-01-00-00-00-00-00-00-00-00-00-00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;01 01 8E 00 00 00&lt;/td&gt;
&lt;td&gt;60-01-01&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12 8b 01 0a 45 08 01 12 41 08 90 4e 10 34 1a 02 af 01 20 00&amp;nbsp;&lt;/td&gt;
&lt;td&gt;60-12-02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28 00 30 00 38 b0 8e 03 42 24 08 03 12 20 01 91 8e 46 bb 14&amp;nbsp;&lt;/td&gt;
&lt;td&gt;60-28-02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;fc b6 37 95 6d dd d4 34 40 a4 60 ab ec 76 57 8f 9c 72 e6 b5&amp;nbsp;&lt;/td&gt;
&lt;td&gt;60-FC-02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8a 62 c7 9b b3 df 48 00 52 04 08 01 12 00 10 00 1a 40 9d 86&lt;/td&gt;
&lt;td&gt;60-8A-02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;94 d0 23 bd 0e db 03 47 26 f9 4d 27 77 4c 4b 04 8e de 75 79&amp;nbsp;&lt;/td&gt;
&lt;td&gt;60-94-02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bf d4 b5 1a df 0f 5a 39 f0 b1 5b 44 bc 12 bf 16 87 99 6d c8&amp;nbsp;&lt;/td&gt;
&lt;td&gt;60-BF-02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;e2 a7 aa 4e 62 c4 ad 68 55 2f b1 8c a4 27 1e bc 07 65 5a 0f&amp;nbsp;&lt;/td&gt;
&lt;td&gt;60-E2-02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28 a3&lt;/td&gt;
&lt;td&gt;60-28-02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;60-03-01-00-00-00-00-00-00-00-00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;60-04-08&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/201942?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2019 14:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01727b37-47b1-4217-b47f-d5fd2910fde6</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;It is done in the request handler module of the bootloader , see on_data_obj_select_request in &lt;span&gt;nrf_dfu_req_handler.c&amp;nbsp;&lt;/span&gt;(nRF5_SDK_15.2.0_9412b96\components\libraries\bootloader\dfu\nrf_dfu_req_handler.c)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void on_data_obj_select_request(nrf_dfu_request_t * p_req, nrf_dfu_response_t * p_res)
{
    NRF_LOG_DEBUG(&amp;quot;Handle NRF_DFU_OP_OBJECT_SELECT (data)&amp;quot;);

    p_res-&amp;gt;select.crc    = s_dfu_settings.progress.firmware_image_crc;
    p_res-&amp;gt;select.offset = s_dfu_settings.progress.firmware_image_offset;

    p_res-&amp;gt;select.max_size = DATA_OBJECT_MAX_SIZE;

    NRF_LOG_DEBUG(&amp;quot;crc = 0x%x, offset = 0x%x, max_size = 0x%x&amp;quot;,
                  p_res-&amp;gt;select.crc,
                  p_res-&amp;gt;select.offset,
                  p_res-&amp;gt;select.max_size);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/201694?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 21:08:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee06c46b-dc56-4561-8a44-0e7a69b5ea9c</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Ok. Where in the secure bootloader code is this response being sent?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/201660?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 15:16:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d74f695-28a8-432f-873a-c2c13283acf8</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;As show in the&amp;nbsp;&lt;a title="Transfer of an init packet" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_dfu_transport_ble.html?cp=5_5_0_3_5_2_2_3_0#lib_dfu_transport_msc_init"&gt;Transfer of an init packet&lt;/a&gt;&amp;nbsp;MSC, its the DFU Control Point characteristic that Notifies the DFU controller. In order to receive notifications you will have to enable Notifications by writting to the CCCD of the DFU Control Point characteristic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/201658?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 15:07:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70021dd1-122b-45e9-9ddc-8c794322281d</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Thanks Bjorn! How can I read this response? On which characteristic is this response sent?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/201546?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 11:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f3f97b0-b295-4a33-93e1-730aad9090f9</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Sonal,&amp;nbsp;&lt;/p&gt;
[quote user=""]What is init packet? How do I create one? [/quote]
&lt;p&gt;the Init packet is part of the DFU firmware image that you create using nrfutil, see&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;https://github.com/NordicSemiconductor/pc-nrfutil&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
[quote user=""]The response received for each command - is it written over a characteristic or a descriptor inside characteristic? My understanding is&amp;nbsp;&lt;span&gt;DFU Control Point &amp;amp;&amp;nbsp;DFU Packet characteristics do not support read property. So where can I see the response received for every command sent by host to BLE device?&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;The response is a characteristic notification from the BLE peripheral to the BLE Central.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Init Packet</title><link>https://devzone.nordicsemi.com/thread/201545?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 11:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d0c41e0-43cf-4aeb-b6f2-3c1d7500a1c3</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Sonal,&amp;nbsp;&lt;/p&gt;
[quote user=""]What is init packet? How do I create one? [/quote]
&lt;p&gt;the Init packet is part of the DFU firmware image that you create using nrfutil, see&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;https://github.com/NordicSemiconductor/pc-nrfutil&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
[quote user=""]The response received for each command - is it written over a characteristic or a descriptor inside characteristic? My understanding is&amp;nbsp;&lt;span&gt;DFU Control Point &amp;amp;&amp;nbsp;DFU Packet characteristics do not support read property. So where can I see the response received for every command sent by host to BLE device?&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;The response is a characteristic notification from the BLE peripheral to the BLE Central.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>