<?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>DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80792/dfu-for-external-ble-sensor</link><description>Hi, 
 I have a current project that is based on the nRf52840. This project acts both as a peripheral and a central. I have a need to update the firmware on a remote BLE sensor using DFU, i.e., I need to do exactly what the nRfConnect application does</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Nov 2021 13:40:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80792/dfu-for-external-ble-sensor" /><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/339449?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 13:40:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:724d8b67-c6a3-41a3-8bd4-e3c901954b34</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; One other IMPORTANT thing to note is that if the SHA is sent with the first Upload packet and the upload fails in the middle (let&amp;#39;s say at byte number 253400), when it restarts if will start from where it left off, i.e., when the upload is retried and the first block is sent the Peripheral will respond with the offset where the transfer should resume, i.e., 253400 in this case.&amp;nbsp; This is not true if the SHA is not sent with the first Upload packet.&amp;nbsp; This took a lot of work to figure this out so I thought I would share it for others benefit.&amp;nbsp; NOTE: Sending the SHA is optional.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dave Patton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/339350?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 08:26:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3eb31f4-5ddb-431c-a0e8-821cdc503898</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Dave,&lt;/p&gt;
&lt;p&gt;Thank you for the update. Actually, it seems like this hash digest is only used as an identifier for the upload session, and not for data integrity checks as I had expected. So the way the hash is computed may differ between different DFU clients. We need to document this better..&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the function that checks the hash in the first packet:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/mcumgr/blob/c854c85ec75d624c47058bc4ac0ab9b12e2dd0e7/cmd/img_mgmt/port/zephyr/src/zephyr_img_mgmt.c#L587"&gt;https://github.com/zephyrproject-rtos/mcumgr/blob/c854c85ec75d624c47058bc4ac0ab9b12e2dd0e7/cmd/img_mgmt/port/zephyr/src/zephyr_img_mgmt.c#L587&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/339307?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 19:19:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a84a0b52-7ece-48d9-ad7c-3f5640cda085</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I don&amp;#39;t think the information the developer provided is correct.&amp;nbsp; Through testing and trial and error I verified that the SHA is actually calculated over the entire image, i.e.,&lt;/p&gt;
&lt;p&gt;Image Header&amp;nbsp; &amp;nbsp;(512 bytes)&lt;br /&gt;Image Data&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(501,244 bytes)&lt;br /&gt;Image Trailer&amp;nbsp; &amp;nbsp; &amp;nbsp;(151 bytes)&lt;/p&gt;
&lt;p&gt;Just thought I would share this info with you in case someone else needs it.&lt;/p&gt;
&lt;p&gt;Many thanks for your help,&lt;/p&gt;
&lt;p&gt;Dave Patton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/339294?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 16:17:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6da4d7de-1a02-48b9-bcec-1a5f7459bd18</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please check if he has kept the &amp;quot;documentation folder. The is a release_notes.txt file in it which says what SDK version it is.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1637079475770v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/339293?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 16:16:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd085b71-16aa-4808-a52e-db0fff35ab77</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Dave,&lt;/p&gt;
&lt;p&gt;One of our developers pointed out&amp;nbsp; to me that the sha256 sent along with the first packet (when offset == 0) is actually only of the data sent in that packet. In other words, this has digest not the same one that you will find in the image trailer:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1637079154991v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The nRF5 SDK includes a sha library in \components\libraries\sha256 that you can use.&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/339079?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 16:19:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92709eee-89ca-4c73-8a99-cd5bea87f9eb</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I took this project over from someone who no longer works at the company and I am not 100% sure which SDK it is based on, I just know it is an SDK prior to 16.&amp;nbsp; Is there a way to identify which SDK it is based on?&amp;nbsp; Yesterday I actually pulled the GATT QUEUE stuff from SDK 16, i.e.,&amp;nbsp;nrf_ble_gq.c and&amp;nbsp;nrf_ble_gq.h as well as&amp;nbsp;nrf_queue.c and&amp;nbsp;nrf_queue.h and I was able to get our project working with the original SMP implementation that you provided so the weirdness that I described in the question from last week is thankfully gone.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dave Patton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/339077?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 16:12:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:597a4ab4-edbf-40a5-9ecc-5cf4f1726df1</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I have been unable to locate the last 3 bytes of the SHA in the image trailer.&amp;nbsp; I know what these 3 bytes are because I collected the entire OTA process between the nRFConnect android app and the Peripheral that is being updated.&amp;nbsp; I have attached both the RAW image file that contains the image header and image trailer as well as a &amp;quot;c&amp;quot; based header file that shows the HEX representation of the data in the RAW image file.&amp;nbsp; The SHA that is being sent for the files attached is:&amp;nbsp;&amp;nbsp;0xD1, 0x01, 0x34&lt;/p&gt;
&lt;p&gt;The CBOR object that is sent with this is as follows:&amp;nbsp;&amp;nbsp;char cSha[] = {0x63, 0x73, 0x68, 0x61, 0x43, 0xD1, 0x01, 0x34};&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think the SHA is in the image file but if I am wrong can&amp;nbsp;you point out where the SHA is inside the image file.&amp;nbsp; If the SHA is not in the image file I will need to be able to calculate the SHA myself in c code in the nRF5 SDK.&amp;nbsp; In this case can you provide some example code that performs this calculation?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dave Patton&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/480_2D00_00099_2D00_R1.27.2.1632834244_5F00_FOTA.bin"&gt;devzone.nordicsemi.com/.../480_2D00_00099_2D00_R1.27.2.1632834244_5F00_FOTA.bin&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Image1.27.2.h"&gt;devzone.nordicsemi.com/.../Image1.27.2.h&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/339075?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 16:06:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab0fe82b-d8d2-4ff6-83f6-88621ebe82cb</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m afraid I can&amp;#39;t think of any obvious explanations to the 2 problems you described. Is there chance you can share this project here or in a private support ticket so I can try to review the project configuration?&lt;/p&gt;
[quote user="davidpatton"] Is it possible to implement the SMP stuff in an earlier SDK?[/quote]
&lt;p&gt;Yes, but it will be more work if you use an older old SDK version. Which SDK/Softdevice are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/338858?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 22:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71ec538f-971d-4ddd-b13d-ec1e5344e85b</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I am still struggling with the integration of the SMP stuff into our real app, I detailed some issues in the last message.&amp;nbsp; The funny thing is that the SMP stuff is working in our real app now.&amp;nbsp; The addition of the SMP stuff into our real app has broken so many things now and I believe it is because our real app is based on an earlier SDK.&amp;nbsp; Is it possible to implement the SMP stuff in an earlier SDK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/338664?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 00:17:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca03dd83-6f7f-4e41-b90d-1674c5496496</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am having 2 very weird problems, one seems like it may be compiler related.&amp;nbsp; The other one I am clueless about.&amp;nbsp; I will explain both below.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;*************************&amp;nbsp; &amp;nbsp; PROBLEM #1&amp;nbsp; &amp;nbsp; ********************************&lt;/p&gt;
&lt;p&gt;See the code below:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;BLE_NUS_C_DEF(m_ble_nus_c);

uint32_t ble_nus_c_init(ble_nus_c_t * p_ble_nus_c, ble_nus_c_init_t * p_ble_nus_c_init)
{
    uint32_t      err_code;
    ble_uuid_t    uart_uuid;
    ble_uuid128_t nus_base_uuid = NUS_BASE_UUID;

    VERIFY_PARAM_NOT_NULL(p_ble_nus_c);
    VERIFY_PARAM_NOT_NULL(p_ble_nus_c_init);

    err_code = sd_ble_uuid_vs_add(&amp;amp;nus_base_uuid, &amp;amp;p_ble_nus_c-&amp;gt;uuid_type);
    VERIFY_SUCCESS(err_code);

    uart_uuid.type = p_ble_nus_c-&amp;gt;uuid_type;
    uart_uuid.uuid = BLE_UUID_NUS_SERVICE;

    p_ble_nus_c-&amp;gt;conn_handle           = (uint16_t)0x1111;
    p_ble_nus_c-&amp;gt;conn_handle           = BLE_CONN_HANDLE_INVALID;
    p_ble_nus_c-&amp;gt;evt_handler           = p_ble_nus_c_init-&amp;gt;evt_handler;
    p_ble_nus_c-&amp;gt;handles.nus_tx_handle = (uint16_t)0x2222;
    p_ble_nus_c-&amp;gt;handles.nus_tx_handle = BLE_GATT_HANDLE_INVALID;
    p_ble_nus_c-&amp;gt;handles.nus_status_handle = BLE_GATT_HANDLE_INVALID;
    p_ble_nus_c-&amp;gt;handles.nus_buffer_handle = BLE_GATT_HANDLE_INVALID;
    p_ble_nus_c-&amp;gt;handles.nus_rx_handle = BLE_GATT_HANDLE_INVALID;

	print_trace(&amp;quot;ble_nus_c_init(1) p_ble_nus_c-&amp;gt;conn_handle: %d&amp;quot;, p_ble_nus_c-&amp;gt;conn_handle);
    err_code = ble_db_discovery_evt_register(&amp;amp;uart_uuid);
	print_trace(&amp;quot;ble_nus_c_init(2) p_ble_nus_c-&amp;gt;conn_handle: %d&amp;quot;, p_ble_nus_c-&amp;gt;conn_handle);

	return err_code;
}

/**@brief Function for initializing the Nordic UART Service (NUS) client. */
static void nus_c_init(void)//FA191118
{
	ret_code_t  err_code;
	ble_nus_c_init_t init;

	init.evt_handler = ble_nus_c_evt_handler;

	err_code = ble_nus_c_init(&amp;amp;m_ble_nus_c, &amp;amp;init);
	APP_ERROR_CHECK(err_code);
}

void main(void)
{
    nus_c_init();
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What is happening is that when I run this line of code:&amp;nbsp;&amp;nbsp;p_ble_nus_c-&amp;gt;conn_handle = (uint16_t)0x1111; it does not set the conn_handle to 0x1111, it sets it to 0x0011 and also sets part of the nus_tx_handle when this instruction is executed.&amp;nbsp; I have attached a screen shot of the debugger showing this.&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;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/DebugImage.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This started happening after I pulled the SMP implementation from the dev board project to our real project.&amp;nbsp; Our real project was based on a SDK that did not contain the GAT QUEUE stuff, i.e., nrf_ble_gq.c and&amp;nbsp;nrf_ble_gq.h.&amp;nbsp; I therefore copied these file from the 17.1SDK into our real project.&amp;nbsp; I then had to replace the nrf_queue.c and nrf_queue.h in our real project with the files from the 17.1SDK to get the project to build.&amp;nbsp; The SMP service stuff is now working in our real project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;*************************&amp;nbsp; &amp;nbsp; PROBLEM #2&amp;nbsp; &amp;nbsp; ********************************&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can no longer initialize the watchdog.&amp;nbsp; Here is the code:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void watchdog_init(void)
{
	uint32_t err_code = NRF_SUCCESS;
	//Configure WDT.
	nrf_drv_wdt_config_t config = NRF_DRV_WDT_DEAFULT_CONFIG;
	err_code = nrf_drv_wdt_init(&amp;amp;config, wdt_event_handler);
	APP_ERROR_CHECK(err_code);
	err_code = nrf_drv_wdt_channel_alloc(&amp;amp;m_channel_id);
	APP_ERROR_CHECK(err_code);
	nrf_drv_wdt_enable();
}

int main(void)
{
    watchdog_init();
}&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It is crashing inside watchdog_init() at this line:&amp;nbsp;&amp;nbsp;err_code = nrf_drv_wdt_init(&amp;amp;config, wdt_event_handler);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Look at this line:&amp;nbsp;&amp;nbsp;nrf_drv_wdt_config_t config = NRF_DRV_WDT_DEAFULT_CONFIG;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Below is a Debug Watch showing the values:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636674848223v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I single step through the functions I get to the function below&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfx_err_t nrfx_wdt_init(nrfx_wdt_config_t const * p_config,
                         nrfx_wdt_event_handler_t  wdt_event_handler)
{
    NRFX_ASSERT(p_config);
    nrfx_err_t err_code;

#if !NRFX_CHECK(NRFX_WDT_CONFIG_NO_IRQ)
    NRFX_ASSERT(wdt_event_handler != NULL);
    m_wdt_event_handler = wdt_event_handler;
#else
    NRFX_ASSERT(wdt_event_handler == NULL);
    (void)wdt_event_handler;
#endif
    if (m_state == NRFX_DRV_STATE_UNINITIALIZED)
    {
        m_state = NRFX_DRV_STATE_INITIALIZED;
    }
    else
    {
        err_code = NRFX_ERROR_INVALID_STATE;
        NRFX_LOG_WARNING(&amp;quot;Function: %s, error code: %s.&amp;quot;,
                         __func__,
                         NRFX_LOG_ERROR_STRING_GET(err_code));
        return err_code;
    }

    nrf_wdt_behaviour_set(p_config-&amp;gt;behaviour);

    nrf_wdt_reload_value_set((p_config-&amp;gt;reload_value * 32768) / 1000);

#if !NRFX_CHECK(NRFX_WDT_CONFIG_NO_IRQ)
    NRFX_IRQ_PRIORITY_SET(WDT_IRQn, p_config-&amp;gt;interrupt_priority);
    NRFX_IRQ_ENABLE(WDT_IRQn);
#endif

    err_code = NRFX_SUCCESS;
    NRFX_LOG_INFO(&amp;quot;Function: %s, error code: %s.&amp;quot;, __func__, NRFX_LOG_ERROR_STRING_GET(err_code));
    return err_code;
}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I set a breakpoint at this line:&amp;nbsp;&amp;nbsp;NRFX_IRQ_PRIORITY_SET(WDT_IRQn, p_config-&amp;gt;interrupt_priority);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And then look at the p_config variable which should be&amp;nbsp;filled with&amp;nbsp;NRF_DRV_WDT_DEAFULT_CONFIG but it is not.&amp;nbsp; I have attached a debug screen showing this below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636675265303v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If after entering the&amp;nbsp;nrfx_wdt_init function I stop at a breakpoint and&amp;nbsp; adjust the&amp;nbsp;p_config&amp;nbsp; data values to be those of&amp;nbsp;NRF_DRV_WDT_DEAFULT_CONFIG Before NRFX_IRQ_PRIORITY_SET(WDT_IRQn, p_config-&amp;gt;interrupt_priority); is called then I do not get a crash.&amp;nbsp; &amp;nbsp;This is similar to the first problem, the compiler seems like it is messing things up.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am guessing that this may have&amp;nbsp;been caused by adding in the SMP stuff to our real project since it did not happen prior to that.&amp;nbsp; I have been beating my head against a wall all day trying to make sense of this.&amp;nbsp; I am really hoping that you have some ideas.&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;Dave Patton&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/338629?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 15:31:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:170219aa-4f6a-4344-844d-502d2b102936</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Nevermind, I solved it.&amp;nbsp; My project has a queue dir that contained the QUEUE files nrf_queue.h and&amp;nbsp;&lt;span&gt;n&lt;/span&gt;&lt;span&gt;rf_queue.c from the earlier SDK.&amp;nbsp; I copied those files from the 17.1SDK and the code now builds.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&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;Dave&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/338619?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 14:49:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c71f1dc-8185-47b7-9a5f-5a0016a56bb6</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I forgot to mention that the file that gets the compile error contains these header includes&amp;gt;&lt;/p&gt;
&lt;p&gt;#include &amp;quot;../../nRF_Includes/queue/nrf_queue.h&amp;quot;&lt;br /&gt;#include &amp;quot;../../nRF_Includes/nrf_ble_gq/nrf_ble_gq.h&amp;quot;&lt;/p&gt;
&lt;p&gt;I would have expected these headers to resolve the compile issues but they did not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/338616?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 14:46:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:321517cf-8525-49db-994d-c93f6158789a</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I did the DFU via SMP project on the Dev kit to get it working.&amp;nbsp; I now have to move that code to our real project that has many other things in it.&amp;nbsp; Unfortunately our project was based on an SDK that did not contain the BLE GATT QUEUE.&amp;nbsp; I copied the&amp;nbsp;&lt;code&gt;/ble/nrf_ble_gq&lt;/code&gt;&lt;span&gt;&amp;nbsp;directory from the 17.01 SDK to our project to add the BLE GAT QUEUE.&amp;nbsp; Then I added the following to the skd_config.h file:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;// &amp;lt;e&amp;gt; NRF_QUEUE_ENABLED - nrf_queue - Queue module&lt;br /&gt;//==========================================================&lt;br /&gt;#ifndef NRF_QUEUE_ENABLED&lt;br /&gt;#define NRF_QUEUE_ENABLED 1&lt;br /&gt;#endif&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_BLE_GQ_BLE_OBSERVER_PRIO &lt;br /&gt;// &amp;lt;i&amp;gt; Priority with which BLE events are dispatched to the GATT Queue module.&lt;/p&gt;
&lt;p&gt;#ifndef NRF_BLE_GQ_BLE_OBSERVER_PRIO&lt;br /&gt;#define NRF_BLE_GQ_BLE_OBSERVER_PRIO 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;e&amp;gt; NRF_BLE_GQ_ENABLED - nrf_ble_gq - BLE GATT Queue Module&lt;br /&gt;//==========================================================&lt;br /&gt;#ifndef NRF_BLE_GQ_ENABLED&lt;br /&gt;#define NRF_BLE_GQ_ENABLED 1&lt;br /&gt;#endif&lt;br /&gt;// &amp;lt;o&amp;gt; NRF_BLE_GQ_DATAPOOL_ELEMENT_SIZE - Default size of a single element in the pool of memory objects. &lt;br /&gt;#ifndef NRF_BLE_GQ_DATAPOOL_ELEMENT_SIZE&lt;br /&gt;#define NRF_BLE_GQ_DATAPOOL_ELEMENT_SIZE 20&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_BLE_GQ_DATAPOOL_ELEMENT_COUNT - Default number of elements in the pool of memory objects. &lt;br /&gt;#ifndef NRF_BLE_GQ_DATAPOOL_ELEMENT_COUNT&lt;br /&gt;#define NRF_BLE_GQ_DATAPOOL_ELEMENT_COUNT 8&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_BLE_GQ_GATTC_WRITE_MAX_DATA_LEN - Maximal size of the data inside GATTC write request (in bytes). &lt;br /&gt;#ifndef NRF_BLE_GQ_GATTC_WRITE_MAX_DATA_LEN&lt;br /&gt;#define NRF_BLE_GQ_GATTC_WRITE_MAX_DATA_LEN 2&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_BLE_GQ_GATTS_HVX_MAX_DATA_LEN - Maximal size of the data inside GATTC notification or indication request (in bytes). &lt;br /&gt;#ifndef NRF_BLE_GQ_GATTS_HVX_MAX_DATA_LEN&lt;br /&gt;#define NRF_BLE_GQ_GATTS_HVX_MAX_DATA_LEN 16&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To me this looks like all that should be required but I am getting a compile error that I can&amp;#39;t figure out.&amp;nbsp; I tried searching online for others having this issue but I have been unable to find anything, can you help with this.&amp;nbsp; The code that is generating the error is:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_BLE_GQ_DEF(m_ble_gatt_queue, /**&amp;lt; BLE GATT Queue instance. */&lt;br /&gt; NRF_SDH_BLE_CENTRAL_LINK_COUNT,&lt;br /&gt; NRF_BLE_GQ_QUEUE_SIZE);&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Building &amp;lsquo;SkyHub&amp;rsquo; from solution &amp;lsquo;Solution &amp;lsquo;SkyHub&amp;rsquo;&amp;rsquo; in configuration &amp;lsquo;Release&amp;rsquo;&lt;br /&gt; Preprocessing file_transfer.c&lt;br /&gt; Preprocessing packet_processing.c&lt;br /&gt; Preprocessing pc_uart_interface.c&lt;br /&gt; Preprocessing mobile_app_interface.c&lt;br /&gt; Preprocessing sky_dfu.c&lt;br /&gt; Preprocessing skybitz_app.c&lt;br /&gt; Preprocessing int_flash.c&lt;br /&gt; Preprocessing mx25flash_spi.c&lt;br /&gt; Preprocessing spi_flash.c&lt;br /&gt; Preprocessing skycam_ota.c&lt;br /&gt; Preprocessing con_controller.c&lt;br /&gt; Compiling &amp;lsquo;file_transfer.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;packet_processing.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;pc_uart_interface.c&amp;rsquo;&lt;br /&gt; Preprocessing rtc_timer.c&lt;br /&gt; Compiling &amp;lsquo;mobile_app_interface.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;sky_dfu.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;mx25flash_spi.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;int_flash.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;skybitz_app.c&amp;rsquo;&lt;br /&gt; unknown type name &amp;#39;m_ble_gatt_queuereq_queue&amp;#39;&lt;br /&gt; expected declaration specifiers or &amp;#39;...&amp;#39; before numeric constant&lt;br /&gt; expected declaration specifiers or &amp;#39;...&amp;#39; before &amp;#39;NRF_QUEUE_MODE_NO_OVERFLOW&amp;#39;&lt;br /&gt; expected declaration specifiers or &amp;#39;...&amp;#39; before numeric constant&lt;br /&gt; &amp;#39;m_ble_gatt_queuereq_queue&amp;#39; undeclared here (not in a function); did you mean &amp;#39;m_ble_gatt_queuepurge_queue&amp;#39;?&lt;br /&gt; conversion from &amp;#39;unsigned int&amp;#39; to &amp;#39;unsigned char&amp;#39; changes value from &amp;#39;4022250974&amp;#39; to &amp;#39;222&amp;#39; [-Woverflow]&lt;br /&gt; Compiling &amp;lsquo;spi_flash.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;skycam_ota.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;con_controller.c&amp;rsquo;&lt;br /&gt; Compiling &amp;lsquo;rtc_timer.c&amp;rsquo;&lt;br /&gt;Build failed&lt;br /&gt;&amp;nbsp;&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;Dave Patton&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/338549?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 11:55:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03a4f002-ec6a-426e-8906-bbe1b33df1dd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Dave,&lt;/p&gt;
&lt;p&gt;Are you sure you need to create a new project for this? Normally it&amp;#39;s sufficient to just change the board file (&lt;span&gt;&lt;a title="Using the SDK with other boards" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/sdk_for_custom_boards.html?cp=8_1_1_5"&gt;Using the SDK with other boards&lt;/a&gt;&lt;/span&gt;) in addition to maybe updating some of the global pre-processor defines. Anyway. The code in nrf_queue.c should become enabled as long as NRF_QUEUE_ENABLED==1. Maybe it&amp;#39;s being defined as &amp;#39;0&amp;#39; elsewhere in your project?&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/338451?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 23:19:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b36dc96-bc62-4867-bffd-d1d754a0caae</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi, I am trying to move this code into my non-dev board project and for this file nrf_queue.c this is at the top of the file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;#if NRF_MODULE_ENABLED(NRF_QUEUE)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This currently is false so none of the code in this file is active.&amp;nbsp; I added this to my sdk_config.h&lt;/p&gt;
&lt;p&gt;// &amp;lt;e&amp;gt; NRF_QUEUE_ENABLED - nrf_queue - Queue module&lt;br /&gt;//==========================================================&lt;br /&gt;#ifndef NRF_QUEUE_ENABLED&lt;br /&gt;#define NRF_QUEUE_ENABLED 1&lt;br /&gt;#endif&lt;br /&gt;// &amp;lt;q&amp;gt; NRF_QUEUE_CLI_CMDS - Enable CLI commands specific to the module&lt;/p&gt;
&lt;p&gt;however, that did not enable the code in nrf_queue.c.&amp;nbsp; How can I enable this code?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/337956?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 14:40:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d7eadcb-d2e4-4793-b591-9f21b0e382e3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Dave,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s the sha-256 digest of your signed image, but only the first 3 bytes of it: &lt;a href="https://github.com/zephyrproject-rtos/mcumgr/blob/master/cmd/img_mgmt/src/img_mgmt.c#L493-L501"&gt;https://github.com/zephyrproject-rtos/mcumgr/blob/master/cmd/img_mgmt/src/img_mgmt.c#L493-L501&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The easiest way to get the digest (is placed in the image trailer) is to use the imgtool and run&amp;nbsp;imgtool verify &amp;lt;signed_image&amp;gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/337804?ContentTypeID=1</link><pubDate>Sun, 07 Nov 2021 18:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5d2763c-a126-4753-8afa-162195e2bd32</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is one piece of information that I have been unable to figure out.&amp;nbsp; The first block of data in the upload contains the entire image length and a &amp;quot;sha&amp;quot; field.&amp;nbsp; Below is a real example of the data in both binary and the &amp;quot;json&amp;quot; representation of the cbor data.&amp;nbsp; I need to know exactly what the &amp;quot;sha&amp;quot; is and how to calculate it so I can include the &amp;quot;sha&amp;quot; with my uploads.&lt;/p&gt;
&lt;p&gt;Binary data = SMPHeader|CBOR_Data packet:&amp;nbsp;020000f400010001bf646461746158d53db8f3960000000000020000fca5070000000000011b0100860e536100000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff636c656e1a0007a8936373686143525249636f666600ff&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SMPHeader: 020000f400010001&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CBOR_Data:&amp;nbsp;bf646461746158d53db8f3960000000000020000fca5070000000000011b0100860e536100000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff636c656e1a0007a8936373686143525249636f666600ff&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;cbor json:&amp;nbsp;{&amp;quot;data&amp;quot;: h&amp;#39;3DB8F3960000000000020000FCA5070000000000011B0100860E536100000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF&amp;#39;, &amp;quot;len&amp;quot;: 501907, &amp;quot;sha&amp;quot;: h&amp;#39;525249&amp;#39;, &amp;quot;off&amp;quot;: 0}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dave Patton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/337392?ContentTypeID=1</link><pubDate>Thu, 04 Nov 2021 07:51:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6de30e5f-6fdd-4763-8cdc-9043bbcbde72</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Excellent! I did not even think of using debug logs from the phone. My plan was to try to log the data from the DFU target. I didn&amp;#39;t get that far though. Not sure if I would have been able to log the data fast enough either.&lt;/p&gt;
&lt;p&gt;I will report the missing documentation as a feature request. Hopefully we can add it so others who are developing their own DFU clients in the future do not have to reverse engineer the protocol like you had to.&lt;/p&gt;
&lt;p&gt;Thanks for the update.&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/337353?ContentTypeID=1</link><pubDate>Wed, 03 Nov 2021 20:23:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4b9c092-2a07-443c-acef-ab63d7db5923</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I figured it out and just had my first successful Image Upload!&amp;nbsp; I actually discovered &amp;quot;adb&amp;quot; which is android debug and set that up which allowed me to capture EVERYTHING that nRfConnect was sending while it was doing a firmware update of the sensor.&amp;nbsp; Then I used looked at the capture file with the Wireshark application which allowed me to see the raw bytes that were being sent.&amp;nbsp; Once I had that I was able to figure it out.&amp;nbsp; Really there is literally no decent documentation ANYWHERE that describes the DFU vis SMP process on a byte level which is what is needed if you are developing a solution from scratch.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Anyway, I wanted to thank you again for the help that you gave me, without that I would still be struggling.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Many Thanks,&lt;/p&gt;
&lt;p&gt;Dave Patton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/337106?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 13:28:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32c7d215-9542-4941-b699-695adbd7448f</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; The image you sent contains the log output from the DFU, this is one level above where the actual bytes are sent.&amp;nbsp; Although that contains most of the data for an Upload block it is missing some stuff, I am looking for a log at the byte level.&amp;nbsp; Something that shows the actual bytes being sent over the BLE, if I get this I will know how to extract the data I need:&lt;/p&gt;
&lt;p&gt;BLE Header (I don&amp;#39;t really need this)&lt;br /&gt;SMP Header (this is 8 bytes)&lt;br /&gt;CBOR Data (this is variable length)&lt;/p&gt;
&lt;p&gt;If possible a file containing the raw bytes would be AWESOME.&amp;nbsp; Thanks so much for your help, once I get this piece of information I am sure I will be able to complete this project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/337081?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 12:28:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:396d0197-436b-4eb4-9fb5-a21593cea9bb</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not familiar with the low level details of the mcumgr protocol or the cbor encoding, to be honest. But you can do DFU using the same image with nRF connect on Android or iOS, then inspect the log to see the cbor requests and responses that are being sent.&lt;/p&gt;
&lt;p&gt;Here is the log I got from nRF connect on iOS for reference:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6840.cbor.jpg" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Let me know if this is not the data you are looking for.&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/336928?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 17:09:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37a03daf-6c1c-4250-acf1-fd6e375a781b</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Thanks to your help I have made significant progress towards uploading a new image via SMP but I need one more piece of information that I am hoping you could help me with.&amp;nbsp; What I need is an example of one Upload block for the DFU over SMP.&amp;nbsp; Note that I don&amp;#39;t need the BLE overhead, just the DFU SMP data portion of the Upload Block.&amp;nbsp; What I am looking for is just the raw bytes that are sent for the Upload block.&amp;nbsp; Here is my attempt at creating and sending two Upload Blocks and the responses that I am getting back.&lt;/p&gt;
&lt;p&gt;// Data sent for block 0 of the upload&lt;/p&gt;
&lt;p&gt;A4 62 70 31 01 64 64 61 74 61 58 C0 3D B8 F3 96 00 00 00 00 00 02 00 00 FC A5 07 00 00 00 00 00 01 1B 02 00 C4 12 53 61 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 63 6C 65 6E 18 C0 63 6F 66 66 00 00&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;checked the CBOR&amp;nbsp;through cbor.me it is valid CBOR data and I get the following...&lt;/p&gt;
&lt;p&gt;{&amp;quot;p1&amp;quot;: 1, &amp;quot;data&amp;quot;: h&amp;#39;3DB8F3960000000000020000FCA5070000000000011B0200C412536100000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF&amp;#39;, &amp;quot;len&amp;quot;: 192, &amp;quot;off&amp;quot;: 0}&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;When I send this I get the following response&lt;/p&gt;
&lt;p&gt;BF 62 72 63 00 63 6F 66 66 18 C0 FF&lt;/p&gt;
&lt;p&gt;cbor.me tells me this is the CBOR:&amp;nbsp;&amp;nbsp;{&amp;quot;rc&amp;quot;: 0, &amp;quot;off&amp;quot;: 192}&lt;/p&gt;
&lt;p&gt;This seems like a valid response but when I try sending the 2nd block I get something back that is not valid.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;// Data sent for block 1 of the upload&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A4 62 70 31 01 64 64 61 74 61 58 C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 63 6C 65 6E 18 C0 63 6F 66 66 18 C0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;nbsp;checked the CBOR&amp;nbsp;through cbor.me it is valid&amp;nbsp;CBOR&amp;nbsp;data and I get the following...&lt;br /&gt;cbor.me: {&amp;quot;p1&amp;quot;: 1, &amp;quot;data&amp;quot;: h&amp;#39;FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF&amp;#39;, &amp;quot;len&amp;quot;: 192, &amp;quot;off&amp;quot;: 192}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;// Block #1 response - this is INVALID according to cbor.me&lt;br /&gt;BF 62 72 63 01 FF 6F 66 66 18 C0 FF&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;Dave&amp;nbsp;&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: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/336355?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 08:35:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f799a63-6303-4bd3-92f3-94cebf1cb341</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like it should be straight forward to integrate &lt;a href="https://github.com/zephyrproject-rtos/tinycbor"&gt;tinycbor &lt;/a&gt;library we use in our nRF Connect SDK. The SDK is including the following files from the library: &lt;a href="https://github.com/zephyrproject-rtos/tinycbor/blob/zephyr/zephyr/CMakeLists.txt"&gt;https://github.com/zephyrproject-rtos/tinycbor/blob/zephyr/zephyr/CMakeLists.txt&lt;/a&gt; which do not seem to have any external dependencies.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/336310?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 04:04:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abb1e75b-0dca-4413-a3bc-8120f6a6674b</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Does nordic have a CBOR library that is suitable for use with my nRF SKD5 implementation?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for external BLE Sensor</title><link>https://devzone.nordicsemi.com/thread/336299?ContentTypeID=1</link><pubDate>Wed, 27 Oct 2021 20:57:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afc2ae46-cc43-449b-a837-284c08e1644a</guid><dc:creator>davidpatton</dc:creator><description>&lt;p&gt;Thanks!!!&amp;nbsp; &amp;nbsp;You are AWESOME!!&amp;nbsp; Now I can send and receive data and can actually start on the real implementation!&amp;nbsp; I may have more questions but now I have a great starting point...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>