<?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>Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89062/accessing-different-services-with-pc-ble-driver</link><description>Hello, 
 I try to connect a BLE application with my PC by using an nRF52840 dongle and the PC-BLE driver. But I got stuck in the understanding of the driver, so I hope that someone can help me. 
 The ESP32 provides two additional services: 
 
 A device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Jun 2022 11:14:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89062/accessing-different-services-with-pc-ble-driver" /><item><title>RE: Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/thread/374711?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 11:14:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eacf014e-5de9-4070-8de2-7d4eda816ee9</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thank you. I&amp;acute;ve got it now &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1656501263621v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/thread/374587?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 14:31:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a6918cd-b9d2-4157-bc4b-69c0ce77fe71</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I assume you are trying to do is to do generic service discovery. Very similar to what our nRF Connect BLE app is doing.&amp;nbsp;&lt;br /&gt;I would suggest to have a look at this discussion here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/40387/custom-service-discovery-in-ble_central"&gt;custom service discovery in BLE_Central&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s about 4 years old but still relevant I think.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;After you receive the services, you would also receive the uuid and the handle_range of the services. Based on the range, you can start doing your&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.3.0/group___b_l_e___g_a_t_t_c___c_h_a_r___d_i_s_c___m_s_c.html?cp=4_7_3_1_2_2_3_1"&gt; characteristic discovery.&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I would suggest to have a look at our ble_db_discovery.c as the reference.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/thread/374551?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 13:11:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b52e9662-2792-4716-b64c-87de779957bd</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks. I figured it out today after I found the sequence chart. The application is finding all services now, but I have a new problem.&lt;br /&gt;&lt;br /&gt;I try to build up a tree view with all the services and all the characteristics. I got all the services already, but I need the characteristics for each service too&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1656421616635v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I also get the characteristics from &amp;quot;sd_ble_gattc_characteristics_discover&amp;quot;. Is there a way to figure out which characteristic is from which service?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/thread/374530?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 12:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e65d0e7-f584-4636-bd15-a5f6657c1a25</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Daniel,&amp;nbsp;&lt;br /&gt;As far as I know the application need to call&amp;nbsp;&lt;span&gt;sd_ble_gattc_primary_services_discover()&lt;/span&gt; again and again until you receive the&amp;nbsp;BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP event with ATTRIBUTE_NOT_FOUND.&lt;/p&gt;
&lt;p&gt;Please have a look at this sequence chart here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.3.0/group___b_l_e___g_a_t_t_c___p_r_i_m___s_r_v_c___d_i_s_c___m_s_c.html?cp=4_7_3_1_2_2_3_10"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.3.0/group___b_l_e___g_a_t_t_c___p_r_i_m___s_r_v_c___d_i_s_c___m_s_c.html?cp=4_7_3_1_2_2_3_10&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/thread/374397?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2022 16:40:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dda6ea3b-2548-41a1-96f2-9a96f6f0f3ec</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;yes I have checked it and it helps. But I&amp;acute;m looking for a more generic way to discover all services without letting the application know how many services it should discover. Is there a way to iterate through&lt;/p&gt;
&lt;p&gt;sd_ble_gattc_primary_services_discover&lt;/p&gt;
&lt;p&gt;until all services are discovered? How can I get feedback that the application doesn&amp;acute;t have discovered all services? I&amp;acute;m missing how I can implement the handling of different services with the pc-ble-driver. Is there an example how to do it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/thread/374378?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2022 15:10:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5dba16c-4a04-489b-9c63-21180917dc4d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Daniel,&amp;nbsp;&lt;br /&gt;As mentioned &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v3.0.0%2Fgroup___b_l_e___g_a_t_t_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=gaa778ccc1990e05fffa4aaf304c95e614"&gt;here&lt;/a&gt;. If you haven&amp;#39;t got all the primary service you need to call&amp;nbsp;sd_ble_gattc_primary_services_discover() again. Have you tried that ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/thread/373149?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2022 07:36:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4d3ad0a-1ad3-4929-9781-f2e159c90bad</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;sorry for the late response. I didn&amp;acute;t have checked the update...&lt;/p&gt;
&lt;p&gt;I don&amp;acute;t test the example, because I have to port the example to Qt and I don&amp;acute;t have the patience to do it till now. But I have checked the examples and tried to use them as a base for my code.&lt;/p&gt;
&lt;p&gt;I have appended the BLE class file to my answer. Please take a look at it. It is based on the examples from the pc-ble-driver. The service discovery ends in&amp;nbsp;&lt;span&gt;on_Service_Discovery_Response.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/qt_5F00_ble.cpp"&gt;devzone.nordicsemi.com/.../qt_5F00_ble.cpp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing different services with pc-ble driver</title><link>https://devzone.nordicsemi.com/thread/373005?ContentTypeID=1</link><pubDate>Fri, 17 Jun 2022 11:42:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1d4c4a6-deb7-4dd9-8ce6-27ce129c9282</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Daniel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you let me know how did you do service discovery ?&amp;nbsp;&lt;br /&gt;Have you tried to test with our heart_rate_collector example in examples folder in pc-ble-driver?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice how the&amp;nbsp;BLE_UUID_HEART_RATE_SERVICE is added to&amp;nbsp;sd_ble_gattc_primary_services_discover() call inside&amp;nbsp;service_discovery_start().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>