<?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>Custom scan interval &amp;amp; window to be 100,150,200.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95753/custom-scan-interval-window-to-be-100-150-200</link><description>Hi , I wanted to know how to change the scan interval and scan window to required timings , since only a few options available with using the given macros in gap.h ?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Jan 2023 10:25:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95753/custom-scan-interval-window-to-be-100-150-200" /><item><title>RE: Custom scan interval &amp; window to be 100,150,200.</title><link>https://devzone.nordicsemi.com/thread/405433?ContentTypeID=1</link><pubDate>Wed, 18 Jan 2023 10:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:741b47cf-c1c8-41b6-ae37-47a05c453718</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The scan interval and window can be specified with the struct &lt;code&gt;bt_le_scan_param&lt;/code&gt; (documented &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/gap.html#c.bt_le_scan_param"&gt;here&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;When the parameters of the struct is filled, it is used as the value for the &lt;code&gt;.scan_param&lt;/code&gt; parameter in a &lt;code&gt;bt_scan_init_param&lt;/code&gt; struct. Then the &lt;code&gt;bt_scan_init_param&lt;/code&gt; struct is passed to &lt;code&gt;bt_init_scan&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Below is how this is done in the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.1.1/samples/bluetooth/throughput/src/main.c#L221-L234"&gt;Bluetooth Throughput sample&lt;/a&gt; from nRF Connect SDK v2.1.1.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	struct bt_le_scan_param scan_param = {
		.type = BT_LE_SCAN_TYPE_PASSIVE,
		.options = BT_LE_SCAN_OPT_FILTER_DUPLICATE,
		.interval = 0x0010,
		.window = 0x0010,
	};

	struct bt_scan_init_param scan_init = {
		.connect_if_match = 1,
		.scan_param = &amp;amp;scan_param,
		.conn_param = conn_param
	};

	bt_scan_init(&amp;amp;scan_init);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The values for &lt;code&gt;.interval&lt;/code&gt; and &lt;code&gt;.window&lt;/code&gt; can be changed to meet your requirements.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;br /&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom scan interval &amp; window to be 100,150,200.</title><link>https://devzone.nordicsemi.com/thread/405140?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 04:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:069b5426-cc0f-4082-8988-200cd883ec29</guid><dc:creator>Manas_punjabi</dc:creator><description>&lt;p&gt;using nrf connect 2.1.1 with 52833 dk&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>