<?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>Scan / Connection Request</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55331/scan-connection-request</link><description>Team, 
 I received the following customer inquiry and hope you can help: 
 The BLE – WiFi bridge project I’m working on will need to control up to 64 nodes, not concurrently though. So I built the system to have a message queue from the server and if</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Dec 2019 13:56:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55331/scan-connection-request" /><item><title>RE: Scan / Connection Request</title><link>https://devzone.nordicsemi.com/thread/224208?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 13:56:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48babfcd-81cc-4b7e-9d50-ab7bdc95be47</guid><dc:creator>gritten</dc:creator><description>&lt;p&gt;Kenneth,&lt;/p&gt;
&lt;p&gt;Thanks!&amp;nbsp; Will share with customer and keep you posted.&lt;/p&gt;
&lt;p&gt;Gene&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scan / Connection Request</title><link>https://devzone.nordicsemi.com/thread/224207?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 13:54:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58f006dc-4494-4b4f-819b-ced377033e45</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi Gene,&lt;/p&gt;
&lt;p&gt;So you simply call&amp;nbsp;sd_ble_gap_scan_start() to start receiving advertisement reports. Once you want to connect to a specific peer&amp;nbsp;based on the received advertisment report you call&amp;nbsp;sd_ble_gap_connect(). For both api calls you define a set of parameters, one is the timeout:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint16_t              timeout;                    /**&amp;lt; Scan timeout in 10 ms units. @sa BLE_GAP_SCAN_TIMEOUT. */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;On&amp;nbsp;BLE_GAP_EVT_TIMEOUT or BLE_GAP_EVT_CONNECTED, you need to call&amp;nbsp;&lt;span&gt;sd_ble_gap_scan_start() again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you know the advertisement&amp;nbsp;interval, then you can time the call to the&amp;nbsp;sd_ble_gap_connect(), such that if the advertisment interval is 100ms, then possible wait 95ms before calling&amp;nbsp;sd_ble_gap_connect() with a 20ms timeout. It&amp;#39;s not possible with accurate timing, since the BLE spec mandate a 10ms random delay on the advertisment intervals.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>