<?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>Concurrent services discovery</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21950/concurrent-services-discovery</link><description>I am using S132 4.0.2 and SDK 13, and I have theese questions: 
 
 
 I have an application where BLE node establishes multiple concurrent connections (several as central and several as peripheral). They will start db discovery on each other regardless</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 May 2017 12:07:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21950/concurrent-services-discovery" /><item><title>RE: Concurrent services discovery</title><link>https://devzone.nordicsemi.com/thread/86138?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 12:07:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ec59aa5-9a86-4bc7-96fa-24bc98e61af6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes, you can always skip the library and use sd_ble_gattc_primary_services_discover () and sd_ble_gattc_characteristics_discover () directly.
I think if we break the ble_db_discovery code down we can see it will call exact the same calls. The benefit of using that module is when you want to discover multiple services, or when you discovering on multiple servers automatically. It&amp;#39;s pretty handy I would say.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Concurrent services discovery</title><link>https://devzone.nordicsemi.com/thread/86139?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 11:35:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50c022b1-f798-4732-8243-4b858ec6a2e0</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Sorry, I&amp;#39;ve missed this possibility. But is there any added value in using &lt;code&gt;ble_db_discovery&lt;/code&gt; module if application on top of GATT Client layer wants to discover single Characteristic Value handle within specific Primary Service? Assuming using &lt;code&gt;sd_ble_gattc_primary_services_discover&lt;/code&gt; and &lt;code&gt;sd_ble_gattc_characteristics_discover&lt;/code&gt; functions directly is the competitive option...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Concurrent services discovery</title><link>https://devzone.nordicsemi.com/thread/86137?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 11:24:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65051c02-aca2-4615-b9bb-268c5c418d19</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Andrzej,&lt;/p&gt;
&lt;p&gt;Most of the requirements you listed are already implemented in the ble_app_multilink_central example. There is no issue to have concurrent service discovery. When a service discovery of a node is finished, you will get an event: BLE_DB_DISCOVERY_COMPLETE with the conn_handle attached to the node. Please have a look at db_disc_handler() in the example.&lt;/p&gt;
&lt;p&gt;@endnode: I don&amp;#39;t think we always do full service discovery. If you only look for one service UUID, we will only do &amp;quot;Find by Type Value Request&amp;quot; to ask the server the location of the exact service. This is when you call sd_ble_gattc_primary_services_discover() with a specific service UUID. This is variant 2 in &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/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=3_7_2_1_0_2_2_3_8"&gt;this MSC&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Concurrent services discovery</title><link>https://devzone.nordicsemi.com/thread/86135?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 07:12:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18fdde17-f0b8-4b4c-84d4-2541c0a549a5</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well what ble_db_discovery module does for you? Do you need it? Because doing GATT Service Discovery isn&amp;#39;t any magic, especially if you are looking for particular Service UUID (= one handle) which can be done by one GATT method. Similar for objects inside the Service (Characteristics, Descriptors), you typically need to exchange one GATT Command/Response pair to &amp;quot;discover&amp;quot; it. So if you have just bunch of handle variables for each GAP/GATT Client connection link (actually you have similar for GATT Server as well to be able to see which handle is used by client in particular Read/Write) then you can done the rest with few functions, not needing to use entire SDK module. Sure, if you are in hurry then you can rely on SDK, it should work in the end...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Concurrent services discovery</title><link>https://devzone.nordicsemi.com/thread/86136?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 06:23:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cd2dcbd-34d5-4dbf-bece-fa2465a3e7e7</guid><dc:creator>Andrzej Kuros</dc:creator><description>&lt;p&gt;&amp;quot;full DB module&amp;quot; - what do you mean? Is it about ble_db_discovery.c module supplied with nRF5 SDK 13 ?
I don&amp;#39;t want do enumerate all services just want to find those I can handle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Concurrent services discovery</title><link>https://devzone.nordicsemi.com/thread/86134?ContentTypeID=1</link><pubDate>Wed, 10 May 2017 11:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8ce91d8-76d7-4231-a881-2b9ee1a61ba0</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I would personally avoid using full DB module because you would need to build GATT &amp;quot;stack&amp;quot; image of every server you are connected to (whatever GAP role is used, (G)ATT server/client should be &amp;quot;instance per connection&amp;quot; according to BT SIG spec - logically;) and normally you don&amp;#39;t want to do that silly thing mobiles (or any &amp;quot;multi-app&amp;quot; rich-OS running thing today) do = general GATT Service Discovery procedure of enumerating all GATT handles regardless you are typically looking for particular Primary Service UUID etc. GATT Service Discovery procedure from Client side is surprisingly not so difficult thing, there are examples in SDK and on this forum... but if you build some generic device without clear understanding of APP/GATT layer at the compilation time then you probably need to stick with DB module (or invest in rewriting it to be smaller/faster if you care, thanks to knowing more about your specific use cases should help).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>