<?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>scanning sometimes stopped</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44992/scanning-sometimes-stopped</link><description>nRF52, SDK15, S132 
 Hi! After few days work I have stop scan from my central device on the nRF52832. 
 I can&amp;#39;t to understand reason of this. But I need to know is scanning run or no at this time when device is not connected. How to do it? How to check</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Mar 2019 13:23:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44992/scanning-sometimes-stopped" /><item><title>RE: scanning sometimes stopped</title><link>https://devzone.nordicsemi.com/thread/178684?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 13:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c27349f6-edd3-499b-adea-33cf6e91890f</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;If the device is already in the whitelist you can use sd_ble_gap_connect and filterpolicy set to whitelist, no need to scan first. Then only use sd_ble_gap_scan_start in case you are looking for unknown devices.&lt;/p&gt;
&lt;p&gt;Have you seen the message sequence chart for &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.0/group___b_l_e___g_a_p___w_l___s_h_a_r_e___m_s_c.html"&gt;Whitelist Sharing&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning sometimes stopped</title><link>https://devzone.nordicsemi.com/thread/178679?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 13:16:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dea4a34-b277-4406-a8c4-8acf90fc6983</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Did you already receive the connected event when you try to start scanning again? If not, I assume the whitelist would be in use by sd_ble_gap_connect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning sometimes stopped</title><link>https://devzone.nordicsemi.com/thread/177303?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 11:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29834a94-d31d-4d75-b6e2-99c345d71fb3</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I have second case- I need start scan for second connect when already has connected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;after success connected I call sacn_start() and get error&amp;nbsp;&lt;/p&gt;
&lt;p&gt;// 0x3203&amp;nbsp; &amp;nbsp;BLE_ERROR_GAP_WHITELIST_IN_USE&lt;/p&gt;
&lt;p&gt;how to start the scan, being in the connection?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning sometimes stopped</title><link>https://devzone.nordicsemi.com/thread/177113?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 15:00:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64b39412-477b-4554-bfd0-f02fe863a472</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Regarding second answer- when I call&amp;nbsp;&lt;span&gt;sd_ble_gap_connect, means that whitelist is already started? And at this case after each received advertise packet, I restart scan by call&amp;nbsp;&amp;nbsp;sd_ble_gap_connect(). Correct?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;on_adv_report(&amp;amp;p_gap_evt-&amp;gt;params.adv_report);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But after connected, I need reinit whitelist by call&amp;nbsp;scan_start();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My question is - between received advertise packet, thw whitelist stored and&amp;nbsp;enough just call&amp;nbsp;sd_ble_gap_connect? But after connect I have to call whitelist init by call&amp;nbsp;scan_start();&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning sometimes stopped</title><link>https://devzone.nordicsemi.com/thread/177089?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 14:35:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdcd6228-13ba-40a9-9fa5-63b5f0b28e6d</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;1. &lt;a title="Invalid state, operation disallowed in this state." href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v5.0.0/group__nrf__error.html#gaf0aff2ba7864b34a36b4a96986e1851e"&gt;NRF_ERROR_INVALID_STATE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. Not sure I understand the question. When calling sd_ble_gap_connect, you do so to connect to a known device. i.e. you either have to provide a whitelist or the address you which to connect to. While sd_ble_gap_scan_start is used to look for advertiser, can also use the whitelist.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning sometimes stopped</title><link>https://devzone.nordicsemi.com/thread/176985?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 12:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f227c2a0-7607-41dd-89e6-eb5f6a137f18</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;1. What error will be returned if the scan is already running?&lt;/p&gt;
&lt;p&gt;2. Why after receive each advertice packet I need run&amp;nbsp;&lt;span&gt;sd_ble_gap_scan_start&amp;nbsp; but after connected I should run scan_start with full white list initialize again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanning sometimes stopped</title><link>https://devzone.nordicsemi.com/thread/176930?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 09:56:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ca23133-924d-4e84-affd-07059101619f</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;When calling sd_ble_gap_scan_start you can check the error message to see if scanning is started, if successfull it is ok. Please note that scanning needs to be restarted when you receive an adverisement report (This is normally handled by the scanning module).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>