<?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>S140 v6.1.1 Scan does not time out</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79646/s140-v6-1-1-scan-does-not-time-out</link><description>Hi! 
 I have a question regarding the scan timeout. The situation is the following: 
 On a nRF52840, I repeatedly perform scans every 120s (which is controlled by a CC Interrupt on the RTC). The scan should time out after 17s, which works well for a little</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Sep 2021 07:23:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79646/s140-v6-1-1-scan-does-not-time-out" /><item><title>RE: S140 v6.1.1 Scan does not time out</title><link>https://devzone.nordicsemi.com/thread/331838?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 07:23:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23a81ee7-f8ec-45ad-9f89-53fa908a61b0</guid><dc:creator>Luca Lattanzio</dc:creator><description>&lt;p&gt;Hi Amanda. Just wanted to give everybody an update: I did two things to fix the issue. First, I used an app timer to &amp;quot;manually&amp;quot; stop the scanning procedure after the required amount of time. While this seemed to work at first glance, I noticed that after some time I wasn&amp;#39;t able to receive any advertising packets after a while (no more BLE_GAP_EVT_ADV_REPORT events). So I did some more research and found this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50017/nrf52832-ble-scanning-event-not-triggered-after-some-time-randomly-like-1hour-3-hour"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/50017/nrf52832-ble-scanning-event-not-triggered-after-some-time-randomly-like-1hour-3-hour&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This seemed to describe my problem pretty well. After applying the suggested changes from this post, scanning works without any problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S140 v6.1.1 Scan does not time out</title><link>https://devzone.nordicsemi.com/thread/329603?ContentTypeID=1</link><pubDate>Wed, 15 Sep 2021 12:05:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21e65d4e-892d-43ad-a5cf-c1d431cdbf12</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Luca,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have set timeout to a non-0 value, then you should get a timeout, however, the actual timeout depends on whether you are scanning or connecting:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___b_l_e___g_a_p___c_e_n_t_r_a_l___c_o_n_n___m_s_c___l_e_g_a_c_y.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___b_l_e___g_a_p___c_e_n_t_r_a_l___c_o_n_n___m_s_c___l_e_g_a_c_y.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___b_l_e___g_a_p___s_c_a_n___m_s_c___l_e_g_a_c_y.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___b_l_e___g_a_p___s_c_a_n___m_s_c___l_e_g_a_c_y.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Invalid state, operation disallowed in this state." href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.3.0/group__nrf__error.html#gaf0aff2ba7864b34a36b4a96986e1851e"&gt;NRF_ERROR_INVALID_STATE&lt;/a&gt;&amp;nbsp;returned by &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.3.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#ga0e92b62656057a13747a2ef1e71fd128"&gt;&lt;span&gt;sd_ble_gap_scan_stop&lt;/span&gt;&lt;/a&gt;&amp;nbsp;means&amp;nbsp;&lt;span&gt;Not in the scanning state.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>