<?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>How can I know that it&amp;#39;s scanning or not?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19371/how-can-i-know-that-it-s-scanning-or-not</link><description>Hi.
I&amp;#39;m using nRF51822AC, SDK12.2.0 as Central. 
 Q1. Is there any function to know regarding it is scanning or not? 
 Q2. As your example &amp;quot;ble_app_multilink_central&amp;quot;,
Does &amp;quot;Scan&amp;quot; stop automatically after &amp;quot;sd_ble_gap_connect&amp;quot;? 
 Q3. Why do you use</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Feb 2017 02:46:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19371/how-can-i-know-that-it-s-scanning-or-not" /><item><title>RE: How can I know that it's scanning or not?</title><link>https://devzone.nordicsemi.com/thread/75142?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2017 02:46:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:913c5449-dcb2-4065-8c3b-a0d6a79cdbd1</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;No worries.&lt;/p&gt;
&lt;p&gt;Good luck with your project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I know that it's scanning or not?</title><link>https://devzone.nordicsemi.com/thread/75141?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2017 02:15:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e31c871-827e-489a-b7c2-ae4af9b29a2d</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Thank you very much for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I know that it's scanning or not?</title><link>https://devzone.nordicsemi.com/thread/75140?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 04:45:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8fdfaba-5406-4f50-9663-f15343c27260</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Why are you casting the return value from sd_ble_gap_scan_stop() to void&lt;/p&gt;
&lt;p&gt;Also, I&amp;#39;d check that sd_ble_gap_scan() stop returns a valid response before continuing&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Error code 0x08 is&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define 	NRF_ERROR_INVALID_STATE   (NRF_ERROR_BASE_NUM + 8)
 	Invalid state, operation disallowed in this state.
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I know that it's scanning or not?</title><link>https://devzone.nordicsemi.com/thread/75139?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 04:32:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a056d896-958d-4414-a8de-b21c3ca915a2</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Thanks for your help.
about Q3.
I&amp;#39;m using scan_start function as below.&lt;/p&gt;
&lt;p&gt;void scan_start(void)
{
ret_code_t err_code;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	(void) sd_ble_gap_scan_stop();

	err_code = sd_ble_gap_scan_start(&amp;amp;m_scan_params);
	APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Sometimes it makes an error and reboot system. Error code is 0x08.
What could be the problem?&lt;/p&gt;
&lt;p&gt;I hope your reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I know that it's scanning or not?</title><link>https://devzone.nordicsemi.com/thread/75138?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 04:26:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4623f68-f077-4195-82bd-580a69804d17</guid><dc:creator>Roger Clark</dc:creator><description>&lt;ol&gt;
&lt;li&gt;No. I don&amp;#39;t think this exists. Use an application timer with the same duration as the scan.&lt;/li&gt;
&lt;li&gt;Yes. According to the other examples. Scan stops automatically when you connect succesfully&lt;/li&gt;
&lt;li&gt;Stop scan is sometimes called in start_scan function so that you can call start_scan and not get an error if its already scanning&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>