<?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>Unable to find the name of the BLE peripheral and how to discover all services from a connected BLE peripheral.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48904/unable-to-find-the-name-of-the-ble-peripheral-and-how-to-discover-all-services-from-a-connected-ble-peripheral</link><description>Hi, 
 I am creating a wrapper that uses nrf-ble-driver-sd_api_v6-mt-4_1_1.dll. I had burn the dongle with fw: connectivity_4.1.1_usb_with_s140_6.1.1.hex. 
 I am trying to create a central app by following and modifying the heart_rate_collector example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Jun 2019 11:18:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48904/unable-to-find-the-name-of-the-ble-peripheral-and-how-to-discover-all-services-from-a-connected-ble-peripheral" /><item><title>RE: Unable to find the name of the BLE peripheral and how to discover all services from a connected BLE peripheral.</title><link>https://devzone.nordicsemi.com/thread/194850?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2019 11:18:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a3417d0-ed16-430f-8f1f-202268bd0073</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;UUIDs are stored internally as a combination of &amp;quot;type&amp;quot; and a 16 bit UUID. The type refers to a &amp;quot;base UUID&amp;quot;, which is all but 16 bits of the full 128 bit UUID. This follows the same pattern as Bluetooth SIG 16 bit UUIDs, which all are really 128 bit UUIDs which are a combination of a specially assigned base UUID adn the 16 bits from the 16 bit UUID. You can read more about the system with base UUIDs in &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial"&gt;Bluetooth low energy SErvices, a beginner&amp;#39;s tutorial&lt;/a&gt;. You can also convert between the ble_uuid_t data type (16 bit UUID + base UUID index) and a 16 byte array representation of the full 128 bit UUID using the functions &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fgroup___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga2e55f7d7e631d072c24f2d6bc0860cc8"&gt;sd_ble_uuid_encode()&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fgroup___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga53a62e0d6e8604b73c937f89424b89ba"&gt;sd_ble_uuid_decode()&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What to do with the UUID depends on what is your use case. You can for instance recognize a service or characteristic based on the UUID. What to do really depends on the answer to the question &amp;quot;What is the purpose of your application?&amp;quot;&lt;/p&gt;
&lt;p&gt;Regarding &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fgroup___b_l_e___g_a_t_t_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga813daa5810a1d2ed31d2d6fe49d3ef11"&gt;sd_ble_gattc_read()&lt;/a&gt;, there is no direct connection there to the UUIDs. When using the discover functions for services and characteristics, you will get discovery events that provides &amp;quot;handles&amp;quot; in addition to the UUIDs, Services, characteristics and descriptors are all entries in the GATT table, and the handle is an unique identifier for selecting one such entry. I am a bit confused as to what you are trying to do there, but usually one would store the handle in a data structure used for keeping track of a given service. We have numerous examples of this in our SDK, just have a look at any of the BLE central examples.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to find the name of the BLE peripheral and how to discover all services from a connected BLE peripheral.</title><link>https://devzone.nordicsemi.com/thread/194762?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2019 07:18:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbaca910-1dc5-4677-8194-a7589fd28be2</guid><dc:creator>LCC</dc:creator><description>&lt;p&gt;Hi Terje,&lt;/p&gt;
&lt;p&gt;Thanks for the link. It&amp;#39;s very useful.&lt;/p&gt;
&lt;p&gt;I am able to find the different services now.&lt;/p&gt;
&lt;p&gt;Just another question, do you know how to get the custom characteristic uuid?&lt;/p&gt;
&lt;p&gt;Currently, after finding the custom service uuid, i had add it to&amp;nbsp;sd_ble_uuid_vs_add() and i had a return uuid type of 0x2.&lt;/p&gt;
&lt;p&gt;But i am not sure how to use that type or i don&amp;#39;t have to do anything with it?&lt;/p&gt;
&lt;p&gt;And on characteristic respond, i get the uuid = 0 and if i were to call&amp;nbsp;sd_ble_gattc_read(), i am unable to find the uuid also.&lt;/p&gt;
&lt;p&gt;Any advice on this?&lt;/p&gt;
&lt;p&gt;Thanks for helping.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;LC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to find the name of the BLE peripheral and how to discover all services from a connected BLE peripheral.</title><link>https://devzone.nordicsemi.com/thread/194704?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2019 15:00:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d0341cc-c977-427d-87af-6b9691e60a79</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Since pc-ble-driver uses serialization of the SoftDevice, you can use the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fmodules.html"&gt;SoftDevice API documentation&lt;/a&gt; for reference.&lt;/p&gt;
&lt;p&gt;For question 1, good question. What fields are present in the advertisement? If you do not get the name from the advertisement, you can still read the Device Name characteristic of the Generic Access service after connecting.&lt;/p&gt;
&lt;p&gt;For question 2, if you provide NULL for the &amp;amp;srvc_uuid argument you will get a result of any service. See documentation for &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fgroup___b_l_e___g_a_t_t_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=gaa778ccc1990e05fffa4aaf304c95e614"&gt;sd_ble_gattc_primary_services_discover()&lt;/a&gt;, and the message sequence chart for &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fgroup___b_l_e___g_a_t_t_c___p_r_i_m___s_r_v_c___d_i_s_c___m_s_c.html"&gt;GATTC Primary Service Discovery&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>