<?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 speed up connection and database discovery.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85967/how-to-speed-up-connection-and-database-discovery</link><description>Hi, 
 we are developing a system based on device with nRF52840 S140 ( central and pheripheral). 
 We developed on both side a custom service. 
 System is working fine bonding with PM manager. 
 PM manager is working as I can see that exchange of passekey</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Mar 2022 12:52:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85967/how-to-speed-up-connection-and-database-discovery" /><item><title>RE: How to speed up connection and database discovery.</title><link>https://devzone.nordicsemi.com/thread/360312?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 12:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d724e42b-9427-4088-88ba-29ce2154aa43</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure I understand the question, but I think you should be able to store multiple &amp;quot;peer datas&amp;quot; and load the one you plan to use as needed if that&amp;#39;s what you&amp;#39;re asking.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to speed up connection and database discovery.</title><link>https://devzone.nordicsemi.com/thread/360085?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 16:19:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76fad91e-3ea1-453d-97ba-3c5e801d1c97</guid><dc:creator>AlessandroADG</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I will try to implement it.&lt;br /&gt;Only one question looking to the code.&lt;/p&gt;
&lt;p&gt;The example is referred to a single link.&lt;/p&gt;
&lt;p&gt;I am on a central multilink.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Do you think&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__peer__manager.html&amp;amp;anchor=ga6a3e97cebdb08289e4807801727db1db"&gt;pm_peer_data_remote_db_store()&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;span&gt;pm_peer_data_remote_db_load() work only with peer database array?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Alessandro&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to speed up connection and database discovery.</title><link>https://devzone.nordicsemi.com/thread/359164?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 13:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6582ca7-7305-4a80-8fd3-43af67564313</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Indeed,&amp;nbsp;the peer manager supports storing the remote database on the central side. Typically, it&amp;#39;s used so that the database is stored once service discovery is completed&amp;nbsp;&lt;span&gt;when handling the&amp;nbsp;NRF_BLE_GATTS_C_EVT_DISCOVERY_COMPLETE event by calling&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__peer__manager.html&amp;amp;anchor=ga6a3e97cebdb08289e4807801727db1db"&gt;&amp;nbsp;pm_peer_data_remote_db_store()&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So when connecting to an already bonded peer at a later point the database is restored by a call to&amp;nbsp;pm_peer_data_remote_db_load(). The &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fble_sdk_app_gatts_c.html"&gt;GATT service client example &lt;/a&gt;does this already for example.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to speed up connection and database discovery.</title><link>https://devzone.nordicsemi.com/thread/358949?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2022 08:08:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f7be803-0f79-4cb9-bea7-2d3765655fb1</guid><dc:creator>AlessandroADG</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I read something about Database discovery module (not so detailed documentation) but solution 1 and 2 bring me to the same oubt.&lt;/p&gt;
&lt;p&gt;You wrote:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;service discovery is necessary to ensure that the client interacts with the servers characteristics using the correct attributes handles&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I know in advance the server characteristic or I can store and recover them with Peer Manager, fine.&lt;br /&gt;But how I can link characteristic with handles?&lt;/p&gt;
&lt;p&gt;On the pheripheral (server) I have:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;sd_ble_gatts_service_add() and&amp;nbsp;sd_ble_gatts_characteristic_add()&lt;/p&gt;
&lt;p&gt;I have found to similar function for the client.&lt;/p&gt;
&lt;p&gt;So, how to establish connection after the database restore?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note: searching in the forum I have found this thread&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27203/can-btle-communication-happen-without-service-discovery"&gt;Can BTLE communication happen without service discovery?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;They have our similar issue: database discovery taking 1.5s also with 7.5ms of connection interval.&lt;br /&gt;I guess I have to investigate about this.&lt;br /&gt;Do you have any suggestion about it?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Alessandro&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to speed up connection and database discovery.</title><link>https://devzone.nordicsemi.com/thread/358906?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 14:50:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90fae4a7-2fe8-4a7d-b7d5-ff212567ad24</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Alessandro&lt;/p&gt;
&lt;p&gt;1. Indeed, the application has control over when it wants to do a service discovery. If you store the handles of the characteristics together with the peer address after a service discovery they should be stored. I don&amp;#39;t think we have an example doing this unfortunately. But reading the usage page on the&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.1.0%2Flib_ble_db_discovery.html&amp;amp;cp=8_1_3_2_3_1&amp;amp;anchor=interaction"&gt; Database discovery module&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_pm_usage.html"&gt;Peer Manager&lt;/a&gt; should be helpful.&lt;/p&gt;
&lt;p&gt;2. No,&amp;nbsp;&lt;span&gt;&amp;nbsp;service discovery is necessary to ensure that the client interacts with the servers characteristics using the correct attributes handles. Service discovery is also important because Bluetooth LE advertising does not mandate that all services are advertised.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>