<?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>how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27279/how-to-discover-16bit-uuid</link><description>Hi. i&amp;#39;m using nRF52832, SDK13.0.0.
I&amp;#39;m developing Central, Peripheral both. 
 If peripheral just has 16bit UUID. It doesn&amp;#39;t contain base UUID.
Or if i don&amp;#39;t know what peripheral&amp;#39;s UUID is, how can I discover it? 
 My central source code has to know</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Nov 2017 23:19:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27279/how-to-discover-16bit-uuid" /><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107724?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 23:19:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36665289-b68c-47ab-8714-d7989e21ca06</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Exactly. Have you ever discovered bootloader? Why is it just having 16bit UUID? I think that&amp;#39;s why my central gets error message during discovering.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107719?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 10:02:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e7af3f1-468e-41a4-b1ec-e6468d17eff2</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Oh so you are building your Central app yourself? So then just paste your code of GATT Service discovery and where exactly you get error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107728?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 09:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47a6fa50-0bf1-42e7-af4c-9d72d04aa6ac</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;I&amp;#39;m developing both side(Central, Peripheral). And My Central&amp;#39;s goal is DFU.&lt;/p&gt;
&lt;p&gt;For peripheral, i&amp;#39;m using &amp;quot;bootloader_secure_ble&amp;quot;. and it calls nrf_ble_dfu.c to init GATT. I didn&amp;#39;t modify any source code. It is just sample code.
For central, I&amp;#39;m using &amp;quot;ble_lbs_c.c&amp;quot;, and I modify a little bit to find DFU bootloader.&lt;/p&gt;
&lt;p&gt;If you have any result, just tell me. I need your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107718?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 09:02:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cea28ee-9ec5-4439-8b0c-2c6359f2e544</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;This is confusing. So you or that stock SDK example uses this module? And how it interacts with &lt;code&gt;examples\dfu\bootloader_secure_ble\main.c&lt;/code&gt;? Sorry to ask stupid questions but I never really used this and I was just answering your problem as general &amp;quot;I cannot discover some service and I don&amp;#39;t understand how UUIDs work&amp;quot;, I don&amp;#39;t intend to debug some SDK module;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107717?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 08:50:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72f6e9bf-56bc-4a69-bdbf-bd22a0d8e3d7</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;I&amp;#39;m using ble_lbs_c.c for Central. And discover event function is &amp;quot;ble_lbs_on_db_disc_evt&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107716?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 08:34:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08a6c393-09d5-4bdf-8a77-b5cd177db1ca</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Sorry I never used this and I don&amp;#39;t see any GAP or GATT in &lt;code&gt;main.c&lt;/code&gt; in that project. Could you tell me in which file and on which line you get that &lt;code&gt;BLE_DB_DISCOVERY_SRV_NOT_FOUND&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107715?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 08:25:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c24bf71a-1209-439e-9087-adbdc122d154</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Because it&amp;#39;s just sample code of SDK. It is &amp;quot;bootloader_secure_ble&amp;quot; in SDK13.0.0. If you want me to post it, i will. Do you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107714?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 08:22:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a388224f-a4e4-4a8d-8c6f-a2d5b72214e9</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;You haven&amp;#39;t posted your code of GATT Client during discovery, hard to tell why you don&amp;#39;t look for correct UUID;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107713?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 08:15:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6153c4f8-31de-44c0-9619-020bef70ec5e</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;So how can i discover it without error message?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107712?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 08:12:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4f55877-629a-4039-9ade-05aa146997f5</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;It is not but we already agreed that this is not used for service UUID just for Characteristics because as you post in the code Service is initialized as&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BLE_UUID_BLE_ASSIGN(service_uuid, BLE_DFU_SERVICE_UUID);
err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY,
                                    &amp;amp;service_uuid,
                                    &amp;amp;(p_dfu-&amp;gt;service_handle));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which means it uses BT SIG base.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107711?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 08:10:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c3efac3-87bc-4fc9-bfce-64f8d7816f8b</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;I think the base UUID(0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F,  0x60, 0x4F, 0x15, 0xF3,  0x00, 0x00, 0xC9, 0x8E) isn&amp;#39;t BT SIG base. If it is, that&amp;#39;s the problem too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107710?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 08:06:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67800768-9c3d-4f88-8dbe-a78990f7f4d0</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well if you have on one side service with BT SIG base (which has value &lt;code&gt;BLE_UUID_TYPE_BLE = 0x01&lt;/code&gt;) then why you expect to be &lt;code&gt;p_evt-&amp;gt;params.discovered_db.srv_uuid.type=2&lt;/code&gt;?????&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107723?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 07:47:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8523c942-d02f-4a06-8830-06650d0d32c5</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Those are from discovery module.
And the error is just &amp;quot;p_evt-&amp;gt;evt_type=BLE_DB_DISCOVERY_SRV_NOT_FOUND&amp;quot; the others are what I expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107722?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 07:44:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48d1e453-b5a7-47ff-94ef-41ee6e7fa2df</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;This &lt;code&gt;p_evt-&amp;gt;params.discovered_db.srv_uuid.type=2&lt;/code&gt; is returned by discovery module like real UUID discovered during GATT Service discovery? Or that&amp;#39;s what are you looking for (which would explain the error = if you use different type then obviously they don&amp;#39;t match)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107721?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 07:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8da1a160-42bd-4259-8281-d7cb6a292f32</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;So why you don&amp;#39;t look for Service with UUID = 0x59FE and then Characteristics with long UUID under it? Or if you don&amp;#39;t like short UUID why you don&amp;#39;t change sequence in your code and first provision proprietary base, then use it to build Service UUID and then call &lt;code&gt;sd_ble_gatts_service_add&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107720?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 07:35:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d91d4f4-5d44-4fd5-9a6c-2ff4cbab9fc6</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Thank you very much.
I totally understand what you mean.&lt;/p&gt;
&lt;p&gt;The problem is &amp;quot;my central gets error message after discover service&amp;quot;.
It always returns&lt;/p&gt;
&lt;p&gt;p_evt-&amp;gt;evt_type=BLE_DB_DISCOVERY_SRV_NOT_FOUND,
p_evt-&amp;gt;params.discovered_db.srv_uuid.uuid=0xfe59,
p_evt-&amp;gt;params.discovered_db.srv_uuid.type=2.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s why i&amp;#39;m stuck in there while I make central application for DFU using nRF52832.
I need your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107707?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 07:14:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f754bf9-b59e-4011-83d6-2a9168b7c51f</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well see &lt;code&gt;components\softdevice\s132\headers\ble_types.h&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/** @brief Set .type and .uuid fields of ble_uuid_struct to specified UUID value. */
#define BLE_UUID_BLE_ASSIGN(instance, value) do {\
            instance.type = BLE_UUID_TYPE_BLE; \
            instance.uuid = value;} while(0)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As I&amp;#39;ve tried to explain: Nordic stack internally always represents UUID as pair of 16-bit short string + reference to one of provisioned 128-bit UUID bases. In BLE if there is only 16-bit BLE transferred it means that it sits on BT SIG default UUID base. What is the problem now? If you don&amp;#39;t like it an you want to change the base to some proprietary then simply use &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt; function first and then use returned index to new base in &lt;code&gt;ble_uuid_struct&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107709?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 01:20:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:532e0750-ea75-4572-8bb6-5a63f7eb8f09</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Values are as below.&lt;/p&gt;
&lt;p&gt;GATT Primary service : 59fe
Characteristics 1 : 50eada308883b89f604f15f30200c98e
Characteristics 2 : 50eada308883b89f604f15f30100c98e&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107708?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 01:09:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61109d25-e136-49ff-876b-71277289b1c8</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Thank you very much for your help.
As I&amp;#39;ve tested,&lt;/p&gt;
&lt;p&gt;when it is on app mode, I can see 128bit UUID. Tha&amp;#39;t why I&amp;#39;m sure that my PC tool shows me all raw data.&lt;/p&gt;
&lt;p&gt;But when it is on bootloader mode, I can&amp;#39;t see 128bit, just 16bit.
Even I downloaded bootloader sample code, I can&amp;#39;t see 128bit, just 16bit.
Then I can see 128bit characteristics UUIDs for packet and control.&lt;/p&gt;
&lt;p&gt;Can you see all 128bit UUID containing 0xFE59, when you discover example bootloader?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107726?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2017 08:36:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e6f0c7d-dd51-407e-a74e-3e4422a740eb</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Oh and if you are concerned about the code which comes in your snippet before &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt; then I see &lt;code&gt;BLE_UUID_BLE_ASSIGN&lt;/code&gt; macro which I guess means that some short UUID will use standard BT SIG 128-bit base. Isn&amp;#39;t it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107725?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2017 08:33:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78fa6275-7403-47ff-b999-50604ae4d51c</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;What do you mean it doesn&amp;#39;t have base? It must, otherwise Nordic SD cannot work with it;) I don&amp;#39;t know these cryptic functions in the code snippet and I won&amp;#39;t learn them but what I clearly see is &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt; which is provisioning some base to be used later in composition with 16-bit short UUID.&lt;/p&gt;
&lt;p&gt;Note that on GATT layer when you see it in the BLE sniffer log it really can look like there are 16-bit UUIDs and if you do discovery through Nordic SD API and you will discover some object (Service or Char) with proprietary UUID base then you might need second GATT command (e.g. read) to get the base even it might be already transmitted before to the SD. But overall the high-level statement stays: there are only 128-bit UUIDs, all other shortcuts mean they can and should be mapped on top of some 128-bit base.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107727?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2017 08:28:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a3bfdf0-373b-4c5c-9305-ff7aed728335</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Thank you very much for your reply.
How about bootloader for DFU? As I discover it using PC program, It just has 0xfe59. It doesn&amp;#39;t have base uuid. But 2 characteristcs have base UUID. What could be the problem?
My bootloader&amp;#39;s init code is below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t ble_dfu_init(ble_dfu_t * p_dfu)
{
    ble_uuid_t service_uuid;
    uint32_t   err_code;

#ifndef NRF51
    if (p_dfu == NULL)
    {
        return NRF_ERROR_NULL;
    }
#endif

    m_conn_handle = BLE_CONN_HANDLE_INVALID;

    BLE_UUID_BLE_ASSIGN(service_uuid, BLE_DFU_SERVICE_UUID);

    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);

    const ble_uuid128_t base_uuid128 =
    {
        {
            0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F,
            0x60, 0x4F, 0x15, 0xF3,  0x00, 0x00, 0xC9, 0x8E
        }
    };
    err_code = sd_ble_uuid_vs_add(&amp;amp;base_uuid128, &amp;amp;p_dfu-&amp;gt;uuid_type);
    VERIFY_SUCCESS(err_code);

    err_code = dfu_pkt_char_add(p_dfu);
    VERIFY_SUCCESS(err_code);

    err_code = dfu_ctrl_pt_add(p_dfu);
    VERIFY_SUCCESS(err_code);

    m_flags |= DFU_BLE_FLAG_SERVICE_INITIALIZED;

    return NRF_SUCCESS;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I can&amp;#39;t see 128bit UUID, just 16bit uuid(0xfe59).&lt;/p&gt;
&lt;p&gt;I need your help more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to discover 16bit uuid?</title><link>https://devzone.nordicsemi.com/thread/107706?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2017 08:21:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa78a39a-5e59-4ed6-ab0e-15340b239550</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;That&amp;#39;s incorrect. All UUIDs are in fact 128-bit long and that&amp;#39;s why Nordic represents them always as pair of 128-bit base and 16-bit short UUID. In case that GATT Server presents just 16-bit short UUID that just means that 128-bit base is standard BT SIG base UUID as defined in the spec and hardcoded (as the only one base!) in Nordic BLE stack. So whenever you work with &amp;quot;just short 16-bit UUIDs&amp;quot; (aka standardized BT SIG UUIDs) in Nordic SD GATT API you should use &lt;code&gt;BLE_UUID_TYPE_BLE&lt;/code&gt; as reference to 128-bit base index in virtual table of UUID bases (which are provisioned in SD).&lt;/p&gt;
&lt;h2&gt;UPDATE #1 (2017-11-17)&lt;/h2&gt;
&lt;p&gt;Why? Because it&amp;#39;s in the code! Someone wrote it there. If not you then Nordic. Why? It doesn&amp;#39;t matter, it&amp;#39;s there! Do you like it? If yes then write your client accordingly! If not then do following little change on GATT Server side (according to code you posted earlier):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t ble_dfu_init(ble_dfu_t * p_dfu)
{
    ble_uuid_t service_uuid;
    uint32_t   err_code;

#ifndef NRF51
    if (p_dfu == NULL)
    {
        return NRF_ERROR_NULL;
    }
#endif

    m_conn_handle = BLE_CONN_HANDLE_INVALID;

    const ble_uuid128_t base_uuid128 =
    {
        {
            0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F,
            0x60, 0x4F, 0x15, 0xF3,  0x00, 0x00, 0xC9, 0x8E
        }
    };
    err_code = sd_ble_uuid_vs_add(&amp;amp;base_uuid128, &amp;amp;p_dfu-&amp;gt;uuid_type);
    VERIFY_SUCCESS(err_code);

    service_uuid.uuid = BLE_DFU_SERVICE_UUID;
    service_uuid.type = p_dfu-&amp;gt;uuid_type;

    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);

    // ...
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>