<?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 Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41908/scanning-duration-nrf-sdk-15-2-0</link><description>Hi, 
 I am working with nRF PCA10056 evaluation board and using SDK 15.2.0. I am using nRF52840 as a central scanner, where it will scan broadcast data from beacons. 
 I want to have a specified scan duration in my application. I could not find the specified</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 May 2020 10:28:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41908/scanning-duration-nrf-sdk-15-2-0" /><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/251676?ContentTypeID=1</link><pubDate>Tue, 26 May 2020 10:28:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a8de8e9-e857-4fd2-9590-cc9d726d258e</guid><dc:creator>Somesh Burkule</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/cann0021"&gt;cann0021&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;you cannot set timeout value in scan init.&lt;/p&gt;
&lt;p&gt;you will need to set scan parameter&amp;#39;s using&amp;nbsp;&lt;strong&gt;ble_gap_scan_params_t&lt;/strong&gt; struct.&lt;/p&gt;
&lt;p&gt;for example:&lt;/p&gt;
&lt;p&gt;static ble_gap_scan_params_t m_scan_param;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; m_scan_param.timeout = timeout,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BR,&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Somesh Burkule&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/251116?ContentTypeID=1</link><pubDate>Thu, 21 May 2020 08:58:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54efaef6-e9aa-48a6-9725-0b5cf87b6ce9</guid><dc:creator>cann0021</dc:creator><description>&lt;p&gt;Hello everyone.&lt;/p&gt;
&lt;p&gt;(borad:nRF52832 sdk:16.0.0)&lt;br /&gt;&lt;br /&gt;How to update timeout value at runtime ?&lt;/p&gt;
&lt;p&gt;In scan_init() function, I tried to add&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;init_scan.p_scan_param-&amp;gt;timeout = my_value;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When I compile the code, compiler turns with an error: &amp;quot;assignment of member &amp;lsquo;timeout&amp;rsquo; in read-only object&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/247126?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 13:49:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:665a6cc5-a025-4543-aa63-fa08fbeed014</guid><dc:creator>Somesh Burkule</dc:creator><description>&lt;p&gt;Ohh. got it.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/244970?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 11:58:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fce82be-c9ae-4885-b8f7-05c0df23f265</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;X0ms meaning if you set&amp;nbsp;&lt;span&gt;scan_params.timeout&amp;nbsp;= 2, the scanning timeout is 20ms. You don&amp;#39;t need to call scan_stop() before you can start again.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/244940?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 10:41:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35f6b094-c2ac-4db2-9c62-b57b90543dfa</guid><dc:creator>Somesh Burkule</dc:creator><description>&lt;p&gt;&lt;strong&gt;X0ms? what does it mean?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;my scan duration is 500ms. and I&amp;#39;ll get timeout event after 500ms. right?&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And after that I again start scanning. does it need sd_ble_gap_scan_stop(); after timeout?&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/169124?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 18:53:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c3ec3c2-9137-4e7c-b545-5ec6efa94dbe</guid><dc:creator>Abhishek</dc:creator><description>&lt;p&gt;Thanks, I think I am good here with the explanation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/166824?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 12:15:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf513c37-3ba2-4f82-b69e-de7e756adb6e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Abhishek,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When you use timeout and when it&amp;#39;s timed out you will receive an event (BLE_GAP_EVT_TIMEOUT), please have a look here:&amp;nbsp;&lt;a href="https://www.nordicsemi.com/DocLib/Content/SoftDevice_API_Doc/S140/v6-0-0/group_ble_gap_scan_msc"&gt;https://www.nordicsemi.com/DocLib/Content/SoftDevice_API_Doc/S140/v6-0-0/group_ble_gap_scan_msc&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;At the bottom you can find the two variant, stopping scanning either by sd_ble_gap_scan_stop() or with the timeout event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can find the documentation about&amp;nbsp;&lt;span&gt;sd_ble_gap_scan_stop() in ble_gap.h or &lt;a href="https://www.nordicsemi.com/DocLib/Content/SoftDevice_API_Doc/S140/v6-0-0/group_ble_gap_functions?683#ga0e92b62656057a13747a2ef1e71fd128"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/166573?ContentTypeID=1</link><pubDate>Fri, 18 Jan 2019 17:07:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92b9cea5-68d3-4f72-9c97-350c5015e29f</guid><dc:creator>Abhishek</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I have queries further here, which is leading me to some confusion.&lt;/p&gt;
&lt;p&gt;1) what is the difference between the scan.timeout and the nrf_ble_scan_stop(), finding for its definition I searched the SDK which lead to sd_ble_gap_scan_stop(); whose defintion I could not find anywhere in the SDK.&lt;/p&gt;
&lt;p&gt;2) If I use scan.timeout to limit the duration scan, how would I determine in my code if the scan has timed out&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Abhishek&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/163436?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 13:09:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad19b488-1c6d-4a1b-8b87-ed4c9e828b62</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry, my mistake. If you set the&amp;nbsp;&lt;span&gt;scan_params.timeout&amp;nbsp;&amp;nbsp; = 0 then there will be no duration and you continue scanning until you stop. But if you set the scan_params.timeout = X it will be stopped automatically after X0ms after you start scanning.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/163206?ContentTypeID=1</link><pubDate>Fri, 28 Dec 2018 14:47:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39cfe685-78a0-4fee-873e-b9f76a215ba2</guid><dc:creator>Abhishek</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;what is the definition of .timeout variable in&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;scan_params.timeout&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NRF_BLE_SCAN_SCAN_DURATION; &amp;quot;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Abhishek&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning Duration nRF SDK 15.2.0</title><link>https://devzone.nordicsemi.com/thread/163117?ContentTypeID=1</link><pubDate>Fri, 28 Dec 2018 07:20:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b57a0bf1-9f09-482d-88d4-4f7bab2f277e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You scan until you stop scanning. There is no duration to configure. Simply call stop scanning to stop&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>