<?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 to change the advert interval in NRF connect sdk project?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91238/how-to-change-the-advert-interval-in-nrf-connect-sdk-project</link><description>Hi All, 
 
 I am working with NRF beacon project currently, and I explored many other NRF connect SDK sample projects like, Ble peripheral, ibeacon etc. But I am unable to find, how and where I can change the ble advert interval. 
 So, please help me</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Aug 2022 10:47:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91238/how-to-change-the-advert-interval-in-nrf-connect-sdk-project" /><item><title>RE: How to change the advert interval in NRF connect sdk project?</title><link>https://devzone.nordicsemi.com/thread/382886?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 10:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f36ded0d-0062-4a49-917a-7933190bdbba</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Pradeep&lt;/p&gt;
&lt;p&gt;The advertising interval is included in the bt_le_adv_param struct, which is the first argument to the bt_le_adv_start(..) function. In the beacon example it will simply use one of the standard advertising parameter defines, setting all the parameters for you, but it is possible to define the fields of this struct yourself.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please find some code attached, showing a way to modify the standard settings before passing them to the bt_le_adv_start(..) function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* Make a local copy of the BLE advertising parameters */
struct bt_le_adv_param adv_params = *(BT_LE_ADV_NCONN_IDENTITY); 
adv_params.interval_min = 1000;
adv_params.interval_max = 1000;

/* Start advertising */
err = bt_le_adv_start(&amp;amp;adv_params, ad, ARRAY_SIZE(ad),
		      sd, ARRAY_SIZE(sd));
if (err) {
	printk(&amp;quot;Advertising failed to start (err %d)\n&amp;quot;, err);
	return;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>