<?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>Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10660/can-services-characteristics-descriptors-discovery-could-be-made-faster</link><description>I&amp;#39;m working with a nrf51422/s110 dev kit on which I downloaded the Heart rate Monitoring sample project. On my PC, using a s130 dongle, I connect the device and wrote some code (based on Heart Rate Collector sample program) to discover all services/characteristics</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 May 2016 06:44:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10660/can-services-characteristics-descriptors-discovery-could-be-made-faster" /><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39793?ContentTypeID=1</link><pubDate>Mon, 09 May 2016 06:44:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ba7e5dd-2535-4890-8878-5bad802cbe48</guid><dc:creator>jpo38</dc:creator><description>&lt;p&gt;@dalida20893: Never tested on iOS. Sorry.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39792?ContentTypeID=1</link><pubDate>Thu, 05 May 2016 09:23:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f59da05b-f069-43a4-a164-d909315809cc</guid><dc:creator>dalida20893</dc:creator><description>&lt;p&gt;Hi, i have the same problem i tried the same solution but it doesn&amp;#39;t work for me for iPhone, full services/characteristic/ descriptor is done in ~1200 ms, have you an idea why i have such a time ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39790?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 15:23:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a796ec7-82f4-4df4-94dc-ed830b492fb9</guid><dc:creator>jpo38</dc:creator><description>&lt;p&gt;Fantastic. Thanks a lot for all those clarifications.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39791?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 15:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afacafc1-ec3b-44b7-ad22-94015cecc00e</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;just power consumption - and you can always change the connection parameters after you&amp;#39;ve done the initial service discovery if you like. As a peripheral you can request a change, as a central you can require one. The BTLE protocol is well-designed and allows for connection parameters to be changed as the connection moves into different stages. It&amp;#39;s not uncommon to start a connection up on a higher power, low connection interval, no slave latency basis to get the service discovery done quickly but then allow it to drop back to something much lower power.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39785?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 14:53:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddff5576-4f09-44e0-b614-a7e9eeb923b8</guid><dc:creator>jpo38</dc:creator><description>&lt;p&gt;@Anders: It&amp;#39;s running on PC. See my answer, I changed to 10ms, I&amp;#39;ll try 7.5 ms but 10ms is already fast enough as it challenged Android performances!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39784?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 14:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:744c3c20-0e6c-4537-b2ab-0ce22df9f154</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Are you running the central code on the PC, or on the Dongle? You can choose connection parameters when you connect to the peripheral using &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v1.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gacb36dc9947591179acb83aef50b04282"&gt;sd_ble_gap_connect&lt;/a&gt;. Update the p_conn_params struct with 7.5 ms max and min inerval before connecting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39783?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 14:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9eaed3be-d25b-4c6f-b704-2f37c58bc530</guid><dc:creator>jpo38</dc:creator><description>&lt;p&gt;@RK: Got it. I changed connection min/max interval and it&amp;#39;s now much faster (see posted answer below). I&amp;#39;m just wondering if changing those parameters present any risk of any kind...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39789?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 14:50:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30eeda39-ba41-4511-9f98-15c8d67a6f06</guid><dc:creator>jpo38</dc:creator><description>&lt;p&gt;With RK help, I finally solved this.&lt;/p&gt;
&lt;p&gt;On the application side (PC), I was keeping the connection parameters from Nordic example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define MIN_CONNECTION_INTERVAL          MSEC_TO_UNITS(30, UNIT_1_25_MS)
#define MAX_CONNECTION_INTERVAL          MSEC_TO_UNITS(60, UNIT_1_25_MS)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I changed them to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define MIN_CONNECTION_INTERVAL          MSEC_TO_UNITS(10, UNIT_1_25_MS)
#define MAX_CONNECTION_INTERVAL          MSEC_TO_UNITS(10, UNIT_1_25_MS)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, full services/characteristic/descriptors is done in ~400ms. It&amp;#39;s even faster than what I have when using Android/Qt API!&lt;/p&gt;
&lt;p&gt;Now, Im&amp;#39; not sure about the consequences of such a change....will it only impact my device power consumption? Or could it alterate data or performances...?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39786?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 09:34:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb27cd29-441e-40a1-b263-fbeea18f7dc4</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Half the connection interval/slave latency comes from the peripheral, other half from the central connecting. So first off you need to figure out which one is limiting the connection interval and you need to also see if there was slave latency set on the connection. You have both halves of that code so it should be quite practical to see what&amp;#39;s set. Log it too - on connection you are given the actual parameters, dump them and see what you&amp;#39;ve got. Or sniff, you can see them in the connection packet.&lt;/p&gt;
&lt;p&gt;Most likely reason the other thing is faster is because it negotiates a lower connection interval or no slave latency. Dump it or sniff it and see what you get. Interval goes down to 7.5ms, so you should be able to get a request/response pair in 15ms.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve never seen anything manage to receive a response and send the next request same interval, sniff to see if that&amp;#39;s happening too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39788?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 09:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:916fd88c-5ef0-4090-921c-5ab496cdf465</guid><dc:creator>jpo38</dc:creator><description>&lt;p&gt;&amp;quot;Some people reduce the connection interval&amp;quot; how can I do that? Can it be done on application side (PC/dongle)? How do you explain the fact that QtBluetooth API on Android goes 3 time faster with the same BLE device being connected?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can services/characteristics/descriptors discovery could be made faster</title><link>https://devzone.nordicsemi.com/thread/39787?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 09:04:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15bbf924-3d72-46e2-9f52-a376e5595b8f</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;What&amp;#39;s your connection interval, looks like it&amp;#39;s about 100ms? You only get one request/response per connection interval so if that&amp;#39;s higher, it takes longer. Some people reduce the connection interval to a low value before connection so that service discovery is faster, then drop it back down later if such a connection interval isn&amp;#39;t required.&lt;/p&gt;
&lt;p&gt;And the &amp;#39;few at a time&amp;#39; discovery API isn&amp;#39;t going to get reworked, that&amp;#39;s how discovery is specified in the bluetooth spec, max information which fits in a request, then a new request. The only thing which could change there is a higher MTU which currently isn&amp;#39;t supported (it&amp;#39;s not supported by many implementations).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>