<?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 get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37397/how-to-get-central-name-and-unique-uuid</link><description>Hi all, 
 I use nRF52832 with the UART peripheral example. 
 I need to get the name and unique UUID of the Central I&amp;#39;m connecting to (after connection). 
 The Central can either be Android, iOS or nRF52832 with the Central code of the UART example. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Sep 2018 15:08:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37397/how-to-get-central-name-and-unique-uuid" /><item><title>RE: How to get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/thread/147020?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 15:08:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d603d89c-c0e4-45c6-8354-4d29fe18ba7e</guid><dc:creator>Clonimmus74</dc:creator><description>&lt;p&gt;I used a timer and it solved the problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;100msec wasn&amp;#39;t enough, had to set 200msec, I have no idea why the Central is busy for so long, as I do that right after the connection had established, nothing else is executed.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/thread/146883?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 06:59:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9131503c-0d8b-4afb-bc3f-773643509260</guid><dc:creator>Clonimmus74</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tried (in BLE_GAP_EVT_CONNECTED):&lt;/p&gt;
&lt;p&gt;do&lt;br /&gt; {&lt;br /&gt; err_code = sd_ble_gattc_char_value_by_uuid_read(m_conn_handle, p_uuid, p_handle_range);&lt;br /&gt; }&lt;br /&gt; while (NRF_ERROR_BUSY == err_code);&lt;/p&gt;
&lt;p&gt;and I never get out of the do-while loop....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/thread/146116?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 12:49:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19b33680-f0de-4bf4-b551-efb09b6877b8</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;NRF_ERROR_BUSY means&amp;nbsp;that a client procedure is already in progress and you need to try again.&amp;nbsp;You&amp;nbsp;might need to call the function again to test if it’s ready. Adding a timer could be the solution.&lt;/p&gt;
&lt;p&gt;You need to add the&amp;nbsp;BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP event in the ble_evt_handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/thread/145776?ContentTypeID=1</link><pubDate>Sun, 26 Aug 2018 07:27:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b106bd2-694f-4064-951d-839a997b1f81</guid><dc:creator>Clonimmus74</dc:creator><description>&lt;p&gt;What do you mean by &amp;quot;&lt;span&gt;anything else is running&amp;quot;? I execute the code in the&amp;nbsp;BLE_GAP_EVT_CONNECTED event in&amp;nbsp;ble_evt_handler after the execution of&amp;nbsp;nrf_ble_qwr_conn_handle_assign.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried also executing the code in main, right after&amp;nbsp;BLE_GAP_EVT_CONNECTED event, before any data exchange is happening.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do I look for&amp;nbsp;BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP event in&amp;nbsp;ble_evt_handler() function?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/thread/145650?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 10:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0899379-6939-42f2-b00f-4b020de2a033</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Error code 17 means NRF_ERROR_BUSY, have you checked if anything else is running when you call this function?&lt;/p&gt;
&lt;p&gt;Regarding the repsonse, have a look at this &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_t_t_c___r_e_a_d___u_u_i_d___m_s_c.html?cp=2_3_1_1_0_2_2_3_11" target="_blank" rel="noopener noreferrer"&gt;message sequence chart&lt;/a&gt;. After calling&amp;nbsp;sd_ble_gattc_char_value_by_uuid_read(and it returns success) you will receive an event&amp;nbsp;BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP. You will need to handle this in the ble_evt_handler and then you can get the value from&amp;nbsp;p_ble_evt-&amp;gt;gattc_evt.params.char_val_by_uuid_read_rsp.handle_value[0].&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/thread/145336?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 13:55:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab0f0019-644e-4308-8a01-1321101d74f8</guid><dc:creator>Clonimmus74</dc:creator><description>&lt;p&gt;I tried:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  ble_uuid_t p_uuid = {.uuid = BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME,.type = BLE_UUID_TYPE_BLE};
  ble_gattc_handle_range_t p_handle_range = {.start_handle = 0x0001, .end_handle = 0xFFFF};

  err_code = sd_ble_gattc_char_value_by_uuid_read(m_conn_handle, &amp;amp;p_uuid, &amp;amp;p_handle_range);
  APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And received err_code = 17&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/thread/145322?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 12:58:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5222fe51-7681-44bb-bba4-fd54e12481db</guid><dc:creator>Clonimmus74</dc:creator><description>&lt;p&gt;I understand I need to use:&lt;/p&gt;
&lt;p&gt;sd_ble_gattc_char_value_by_uuid_read&lt;/p&gt;
&lt;p&gt;So I did:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;             ble_uuid_t p_uuid = {.uuid = BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME,.type = BLE_UUID_TYPE_BLE};

             sd_ble_gattc_char_value_by_uuid_read(m_conn_handle, &amp;amp;p_uuid,
            ble_gattc_handle_range_t const *  p_handle_range
            )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;As you can see, I have no idea what to put in p_handle_range.&lt;/p&gt;
&lt;p&gt;Also, where do I see the response?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Central name and unique UUID?</title><link>https://devzone.nordicsemi.com/thread/144196?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 13:27:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:926b82b7-10f7-4904-bf95-2bf9cd29441a</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The device name of the central is contained in the device name characteristic, if it has a name. It can then be extracted through the GATT layer by discovering the service. After you have done a service discovery, you will be able to get the device name and UUID.&lt;/p&gt;
&lt;p&gt;Also, if you are using the UART central example, you would need to add a service with a name characteristic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>