<?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>nrf52840 can we scan while connected to a device in BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25592/nrf52840-can-we-scan-while-connected-to-a-device-in-ble</link><description>I always have to stop scanning before making a connection. If i keep the scanning on, the two devices wouldn&amp;#39;t connect.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Oct 2017 16:52:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25592/nrf52840-can-we-scan-while-connected-to-a-device-in-ble" /><item><title>RE: nrf52840 can we scan while connected to a device in BLE</title><link>https://devzone.nordicsemi.com/thread/100876?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 16:52:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4631c9af-3dad-450f-9fe6-0f475b65cd87</guid><dc:creator>yatish</dc:creator><description>&lt;p&gt;Hi
I am using zephyr OS 1.8 V. I am using bt_conn_create_le() to make connection. For this to work i have to call bt_le_scan_stop() before that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 can we scan while connected to a device in BLE</title><link>https://devzone.nordicsemi.com/thread/100882?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 13:04:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3261d6c7-bf5b-4645-9023-5fc8cbe32891</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;My bad, I&amp;#39;ve thought that scanning works even during waiting for target of connect request...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 can we scan while connected to a device in BLE</title><link>https://devzone.nordicsemi.com/thread/100877?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 11:51:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ccab43f-b8e9-4cfc-9ca7-9800c10bac71</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Which SDK and SoftDevice version are you using? Could you include some code? Are you saying that you have to call sd_ble_gap_scan_stop() before you call sd_ble_gap_connect()? Does sd_ble_gap_connect() return an error code if you don&amp;#39;t call sd_ble_gap_scan_stop() first?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 can we scan while connected to a device in BLE</title><link>https://devzone.nordicsemi.com/thread/100881?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 11:50:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fd8b4bc-9952-4fa5-bf6d-f79e5fcd6785</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I was convinced that when sd_ble_gap_connect() is called it will stop the normal scanning. It will then start scanning with the scanning parameters given to it. It will filter out any advertising packets that is not the specific peer address it wants to connect to, so advertising reports will not be forwarded to the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 can we scan while connected to a device in BLE</title><link>https://devzone.nordicsemi.com/thread/100879?ContentTypeID=1</link><pubDate>Sat, 30 Sep 2017 09:48:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48c69808-5170-49c2-9270-26c64d690917</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;When you call &lt;code&gt;sd_ble_gap_connect&lt;/code&gt; it should be still sending scanning events to your app until target device is seen and CONNECT_REQ packet issued. At that moment you will get &lt;code&gt;BLE_GAP_EVT_CONNECTED&lt;/code&gt; event and scanning will stop. If you want to continue you need to open new scanner slot which means you need to previously enable multiple roles during Soft Device init.&lt;/p&gt;
&lt;p&gt;Btw. none of nRF5 SDK examples need to stop scanning before issuing &lt;code&gt;sd_ble_gap_connect&lt;/code&gt;, it should be possible to call directly from &lt;code&gt;BLE_GAP_EVT_ADV_REPORT&lt;/code&gt; event handler. How exactly you test this so you can claim that without stopping scanning it doesn&amp;#39;t connect?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>