<?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>Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28165/time-cost-to-establish-ble-connection</link><description>Dear experts,
Currently I&amp;#39;m using the peripheral device(s130 softdevice) and central device(s120 softdevice) both base on nrf51822 to evaluate BLE connect time. The connection interval is configured as 30ms. The scan time is 300ms and scan window is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Jun 2019 08:00:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28165/time-cost-to-establish-ble-connection" /><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/192241?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 08:00:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0018793b-bab9-4ea9-a766-190c69a6717a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You can download the core spec here:&lt;br /&gt;&lt;a href="https://www.bluetooth.com/specifications/bluetooth-core-specification/"&gt;https://www.bluetooth.com/specifications/bluetooth-core-specification/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/192029?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 11:33:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfbff860-4b3e-453e-aaea-cad1ca417365</guid><dc:creator>GT</dc:creator><description>&lt;p&gt;Hi, Can you give the link to document? (the one you mentioned&amp;nbsp;&lt;span&gt;Volume 6, Part D, chapter 5.1)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/111245?ContentTypeID=1</link><pubDate>Tue, 12 Dec 2017 04:13:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:897980f4-582b-4642-aaf0-d9e73558e8d6</guid><dc:creator>leibin</dc:creator><description>&lt;p&gt;Cool! Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/111247?ContentTypeID=1</link><pubDate>Mon, 11 Dec 2017 09:38:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be55bb53-c795-461e-a87c-257c2bada838</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This is standard behavior, as defined by the Bluetooth specification. If you do directed advertising you can advertise quicker, and as such you can connect quicker, but you still have to advertise (and to do directed advertising you have to know in advance the BLE address of the device you want to connect to).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://microchip.wdfiles.com/local--files/wireless:ble-link-layer-connections/connecting-phase.png"&gt;This picture&lt;/a&gt; is showing the connection sequence quite clearly, including the initial advertise packets used for discovering the device.&lt;/p&gt;
&lt;p&gt;You can also find this sequence in the spec: Volume 6, Part D, chapter 5.1&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/111246?ContentTypeID=1</link><pubDate>Mon, 11 Dec 2017 07:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:498d5495-4133-4c34-bd0c-7c1762c910d2</guid><dc:creator>leibin</dc:creator><description>&lt;p&gt;If I can read some document about this then I will be more clear about it. Is this nordic/nrf51/sd120 special behavior or BLE standard protocol? I tested with some other BLE adapter, looks like this connect time cost does not exist. Looks like &lt;code&gt;The central is not able to discover a device and connect to it based on the same advertise packet.&lt;/code&gt; is just nordic special thing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/111248?ContentTypeID=1</link><pubDate>Fri, 08 Dec 2017 02:18:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2553ce0-077a-4b33-9c3f-8bfe195a8588</guid><dc:creator>leibin</dc:creator><description>&lt;p&gt;Sounds reasonable! Could you please tell me which part of which spec or protocol document which I can get this kind of information from?
Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/111243?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 11:27:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc7f9cef-31f6-461b-aa58-66c4f5f2bad7</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The central is not able to discover a device and connect to it based on the same advertise packet.&lt;/p&gt;
&lt;p&gt;When you call sd_ble_gap_connect() the central has to wait for the next advertising packet from the peripheral before it can send the connection request, and that is why the scanning interval/window and the advertising interval makes a difference on the time it takes to connect.&lt;/p&gt;
&lt;p&gt;Put it another way: The time it takes to connect is the time it takes to receive the next advertising packet, plus the time difference between sending the connection request and sending the first poll packet (this delay is quite short, typically a couple of milliseconds).&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/111244?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 02:21:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5937f879-acf4-4dc7-aa18-2441c0c0ec61</guid><dc:creator>leibin</dc:creator><description>&lt;p&gt;Hi,
Thanks for your quick reply! The advertising interval is 40ms. Actually the time I measured above has nothing to do with the advertising interval since I just measured the time between calling sd_ble_gap_connect() and getting BLE_GAP_EVT_CONNECTED event. Before this measuring the advertising data is already got. The adv and scan time is not included in this 600ms.
Actually now I have got some idea about the cause. After I change the scan interval from 300ms to 30ms, the connect time has been reduced to about 60ms. Looks like after calling &lt;code&gt;sd_ble_gap_connect()&lt;/code&gt;, the BLE will trigger the connect events only during scan window, then it means the connect events also have a interval equal to scan interval.
I&amp;#39;m not sure whether my understanding is right, but according to the test result it looks like yes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time cost to establish BLE connection</title><link>https://devzone.nordicsemi.com/thread/111242?ContentTypeID=1</link><pubDate>Wed, 06 Dec 2017 08:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c3ed1f8-bb85-46ea-b89a-c6393150adbe</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Do you know what the advertising interval of the advertising device is?&lt;/p&gt;
&lt;p&gt;With a scan interval of 300ms and a scan window of 10ms you are only scanning 3.3% of the time, and you will surely drop a lot of the advertise packets. Normally an advertiser can not advertise more quickly than every 20ms, which means you are lucky to receive even a single advertise packet in that 10ms scan window. The end result is that you have to wait for multiple periods before you receive an advertise packet that you can send a connection request on.&lt;/p&gt;
&lt;p&gt;If you know that the device is advertising, and you want to establish a connection quickly, I would recommend using a longer scan window and possibly a shorter scanning interval, to increase the chance of receiving an advertise packet quickly.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>