<?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>Error in &amp;quot;is_UUID_present&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13533/error-in-is_uuid_present</link><description>Hi! 
 I want to connect a nrf51 dk with a beacon and I&amp;#39;m using the UUID to make the connection. In the beacon code I define the UUID in this way: 
 ble_uuid_t adv_uuids[] = {{BCS_UUID_SERVICE, m_bcs.uuid_type}};
ble_uuid_t m_adv_uuids[]= {BLE_UUID_OUR_SERVICE_UUID</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 May 2016 07:31:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13533/error-in-is_uuid_present" /><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51652?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 07:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c065883-73da-445e-9561-233829cde27b</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;An answer to this is given &lt;a href="https://devzone.nordicsemi.com/question/78529/problems-with-the-db-discovery-module/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51651?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 08:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:976701dc-ca60-4f43-aeae-7bcf7f92008f</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;Thank you very much!!Now it&amp;#39;s working...but can you tell me another thing please?after connecting the two boards, I would like to use the db discovery module to find the service and enable notification and now I have checked that after connecting the function &lt;code&gt;ble_db_discovery_start&lt;/code&gt; return &lt;code&gt;NRF_SUCCESS&lt;/code&gt; but the function &lt;code&gt;db_disc_handler&lt;/code&gt; is never called...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51653?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 07:40:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fda9b293-d7ac-48b0-9ffd-13288f1deef0</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;New edit above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51650?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 16:07:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3462019-5e7a-4a92-af48-5eeb9a4dab51</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;I have uploaded my projects : the ble_app_uart_c is for the nrf51 that is my central (sdk11), my peripheral is a smart beacon kit that sends his temperature.
When I say that it doesn&amp;#39;t work I mean that I still get the error from is_uuid_present, NRF_ERROR_NOT_FOUND&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51649?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 14:25:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b27c8a2-5585-4a2d-9d83-5806a852853c</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Why didn&amp;#39;t it work? Can you upload your code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51648?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 14:20:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79e01725-069c-4d15-9a48-19470ba59fd0</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;I loaded the code but I had to include our_service.h otherwise it doesn&amp;#39;t work.But my beacon and my nrf51 still don&amp;#39;t connect to each other&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51647?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 13:17:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39e1c801-ea1b-443d-8b78-2a3adf0c46e9</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;See my edit 1 and 2 above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51646?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 12:34:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40c98d90-f7e5-40f7-8fb4-bff10a48e907</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;I have done like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;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 = BLE_UUID_OUR_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_OUR_SERVICE_UUID;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and now I have no error from sd_ble_uuid_vs_add but I stil have &lt;code&gt;NRF_ERROR_NOT_FOUND&lt;/code&gt; from &lt;code&gt;is_uuid_present&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51645?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 12:16:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08d99692-b6e3-4bb5-a404-1ba8a16f2621</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Try this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;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 = {0x23, 0xD1, 0x13, 0xEF, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00}; // &amp;lt;-- Put your 128-bit 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 = 0xABCD; // &amp;lt;-- Put your 16-bit service UUID here
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51644?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 12:06:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51dbff25-bb6f-4b18-9d61-3719feaddf92</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;If I paste those lines in &lt;code&gt;ble_nus_c_init&lt;/code&gt; I obtain the error &lt;code&gt;NRF_ERROR_NO_MEM&lt;/code&gt; from the function &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51643?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 11:30:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8756153c-78ca-4062-8bea-dd8ce0f770ab</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;Yes my base code is the &lt;code&gt;ble_app_uart_c&lt;/code&gt;. Do you mean that I have to paste the declaration of my service UUID inside &lt;code&gt;ble_nus_c_init&lt;/code&gt;?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_uuid_t        service_uuid;
    ble_uuid128_t     base_uuid = BLE_UUID_OUR_BASE_UUID;
    service_uuid.uuid = BLE_UUID_OUR_SERVICE_UUID;
err_code = sd_ble_uuid_vs_add(&amp;amp;base_uuid, &amp;amp;service_uuid.type);
    APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51642?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 10:29:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8710d597-ecc7-450e-81b0-22e28fd0c7bd</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I think the problem is on the central side. Since you are using &lt;code&gt;is_uuid_present()&lt;/code&gt; I assume that you base your code on the ble_app_uart_c example? You need to add your beacon base UUID with its 16-bit service UUID to the table of UUIDs in &lt;code&gt;ble_nus_c_init()&lt;/code&gt; located in ble_nus_c.c. The method is almost identical to the method used in the tutorial.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT 1:&lt;/strong&gt;
Modify &lt;code&gt;ble_nus_c_init()&lt;/code&gt; to look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;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 = BLE_UUID_OUR_BASE_UUID; // NORDIC: Use our base UUID instead
        
    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_OUR_SERVICE; // NORDIC: Use our service UUID instead
    
    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_rx_handle = BLE_GATT_HANDLE_INVALID;
    p_ble_nus_c-&amp;gt;handles.nus_tx_handle = BLE_GATT_HANDLE_INVALID;
    
    return ble_db_discovery_evt_register(&amp;amp;uart_uuid);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You also need to modify the &lt;code&gt;static const ble_uuid_t m_nus_uuid&lt;/code&gt; variable located almost at the top of main.c:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static const ble_uuid_t m_nus_uuid = 
{
    .uuid = BLE_UUID_OUR_SERVICE,
    .type = BLE_UUID_TYPE_VENDOR_BEGIN
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;EDIT 2:&lt;/strong&gt; Modified ble_app_uart_c example that works with finished service tutorial code: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/77683_2D00_ble_5F00_app_5F00_uart_5F00_c.zip"&gt;77683-ble_app_uart_c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT 3:&lt;/strong&gt; Example is for SDK 11. Search for &amp;quot;// NORDIC&amp;quot; to see what I have modified.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT 4:&lt;/strong&gt; I have looked at your code and I think I have found the issue. After I compiled and ran your beacon code I could see that you are not advertising the the correct vendor specific UUID. You have actually placed the DFU UUID in your scan response, not the BLE_UUID_OUR_BASE_UUID. The root cause is found in &lt;code&gt;advertising_init()&lt;/code&gt; and &lt;code&gt;services_init()&lt;/code&gt; in the Beacon project. In &lt;code&gt;services_init()&lt;/code&gt; you initiate three services; dfu, bcs, and our service. All three services add a 128-bit UUID to the table of UUIDs in the BLE stack, and BLE_UUID_OUR_BASE_UUID is the third UUID to be added to the table. So the solution is simply to change this line in &lt;code&gt;advertising_init()&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_uuid_t m_adv_uuids[]= {BLE_UUID_OUR_SERVICE,BLE_UUID_TYPE_VENDOR_BEGIN};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_uuid_t m_adv_uuids[]= {BLE_UUID_OUR_SERVICE,BLE_UUID_TYPE_VENDOR_BEGIN + 2};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;then you will put the third 128-bit UUID into your scan response packet. That was the only change I had to make to get your code working (after altering the ble_nus_c.c file as above of course).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51641?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 09:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eebf152-2db2-438f-a066-1d4b1bb4beba</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;Sorry if I continue on posting, but there&amp;#39;s a possibility that something is wrong with &lt;code&gt;is_uuid_present&lt;/code&gt; ? Because I create the service as in the tutorial, I can see the UUID from the mobile phone but I can&amp;#39;t establish a connection using the UUID because &lt;code&gt;is_uuid_present&lt;/code&gt; gives me error&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51639?ContentTypeID=1</link><pubDate>Mon, 02 May 2016 14:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd93cbe3-205f-44aa-a0e7-c150bae40a56</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;I see from the Android App an 128bit UUID, I have followed this tutorial to create it &lt;a href="https://devzone.nordicsemi.com/tutorials/8/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;  I have a question: if I would like to write in the code directly the UUID that I see in the app, which kind of variable should I use?and how to exactly write it inside the code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error in "is_UUID_present"</title><link>https://devzone.nordicsemi.com/thread/51640?ContentTypeID=1</link><pubDate>Mon, 02 May 2016 13:28:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22ccde85-7d7c-4c50-9fcd-16b32b2961b5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The only thing I can think of is that your BLE_UUID_OUR_SERVICE_UUID is not the BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE or BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE type. Can you sniff your advertisement packets to see if it is transmitting as 128BIT UUID AD_Type?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>