<?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>Secure DFU from s130/s132</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21438/secure-dfu-from-s130-s132</link><description>Hi,
We&amp;#39;re using a 51422 with s130 to perform OTA DFU. 
 Both bases for bootloader and central are from sdk 12.2. 
 We have already implemented the older DFU (non-secure) for nRF51, which was a 128bit UUID, and it is working fine. 
 We started implementing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Sep 2020 12:37:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21438/secure-dfu-from-s130-s132" /><item><title>RE: Secure DFU from s130/s132</title><link>https://devzone.nordicsemi.com/thread/268528?ContentTypeID=1</link><pubDate>Tue, 08 Sep 2020 12:37:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04f322dc-9e0b-4c0a-ac0d-b7f188885cb3</guid><dc:creator>braymond</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;faced the same issue on my project. The DFU characteristics uuid returned by the db discovery were always 0x0000. I was able to solve it by registering the DFU service to the BLE stack before initiating the db discovery. This way, the BLE stack knows this custom service and can bisect it. At least, that is my understanding.&lt;/p&gt;
&lt;p&gt;Hope this could help others.&lt;/p&gt;
&lt;p&gt;Ben&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t ble_dfu_init (ble_dfu_t * p_dfu, ble_dfu_evt_handler_t evt_handler)
{
    uint32_t        err_code;
    ble_uuid_t      service_uuid;
    ble_uuid128_t   nordic_base_uuid = { 0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F,
                                         0x60, 0x4F, 0x15, 0xF3, 0x00, 0x00, 0xC9, 0x8E };

    VERIFY_PARAM_NOT_NULL(p_dfu);

    // Initialize the service structure
    p_dfu-&amp;gt;conn_handle                  = BLE_CONN_HANDLE_INVALID;
    p_dfu-&amp;gt;evt_handler                  = evt_handler;

    BLE_UUID_BLE_ASSIGN(service_uuid, BLE_DFU_SERVICE_UUID);

    // Add proprietary service
    err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY,
                                        &amp;amp;service_uuid,
                                        &amp;amp;(p_dfu-&amp;gt;service_handle));
    VERIFY_SUCCESS(err_code);

    // Add vendor specific UUID to use with the DFU characteristic
    err_code = sd_ble_uuid_vs_add(&amp;amp;nordic_base_uuid, &amp;amp;p_dfu-&amp;gt;uuid_type);
    VERIFY_SUCCESS(err_code);

    return (NRF_SUCCESS);
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU from s130/s132</title><link>https://devzone.nordicsemi.com/thread/121975?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 14:29:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71ae808d-42d4-47aa-a134-fcd087271f57</guid><dc:creator>bama</dc:creator><description>&lt;p&gt;Hi Elias, is there the possibiliy that you could share your DFU-Central source code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU from s130/s132</title><link>https://devzone.nordicsemi.com/thread/84097?ContentTypeID=1</link><pubDate>Sun, 30 Apr 2017 05:48:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8b0f7a3-1f8f-44d6-85a7-f85ceaeea930</guid><dc:creator>Gili Elias</dc:creator><description>&lt;p&gt;Hi Bjorn, any update on this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU from s130/s132</title><link>https://devzone.nordicsemi.com/thread/84095?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 08:22:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:147a95b9-8fcb-45f0-8981-14e010f58282</guid><dc:creator>Gili Elias</dc:creator><description>&lt;p&gt;Unfortunately, I can&amp;#39;t share the project at the moment.
Is there any other specific part of code you&amp;#39;d like to see?&lt;/p&gt;
&lt;p&gt;How do I read the 128bit of the discovered characteristics?
The ble_gattc_char_t struct that is passed to the event handler has only 16bit (or octets 12-13 of 128-bit UUID), but as I said, both handles has 0 in this parameter.&lt;/p&gt;
&lt;p&gt;For now, the only way I&amp;#39;ve managed to bypass this issue is to hard code char[0] as the packet handle and char[1] as the control point (I based this on the properties values). Obviously this is not ideal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU from s130/s132</title><link>https://devzone.nordicsemi.com/thread/84096?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 14:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80cdb84c-4f93-4f1a-9762-5010809f8c67</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;No, both the DFU Packet and DFU Control Point characteristics should have different 128-bit UUIDs. Would it be possible for you to share the project either here on DevZone or Mypage?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>