<?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>BLE advertising rate interval - how to auto change from min to max?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90701/ble-advertising-rate-interval---how-to-auto-change-from-min-to-max</link><description>II have a question on how to automatically activate the change from “minimum BLE advertising interval” to “maximum BLE advertising interval” after (for instance) 30 seconds. 
 ↵ 
 I am using the nrf5340-DK board (as well as a custom battery-only nrf5340</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Aug 2022 14:37:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90701/ble-advertising-rate-interval---how-to-auto-change-from-min-to-max" /><item><title>RE: BLE advertising rate interval - how to auto change from min to max?</title><link>https://devzone.nordicsemi.com/thread/380650?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2022 14:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13d748e0-fac4-452e-a9a8-1b0babc8e635</guid><dc:creator>GerardB</dc:creator><description>&lt;p&gt;OK - thanks Einar.&lt;/p&gt;
&lt;p&gt;Let me see if I can change my adverting interval after 30 seconds.&lt;br /&gt;Will try:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;bt_le_adv_start(&amp;lt;using fast interval&amp;gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;.... 30 seconds later&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;bt_le_adv_stop(..);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;bt_le_adv_start(&amp;lt;using new slow interval&amp;gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I assume that will do it..!&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thanks again for&amp;nbsp;your fast response.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Gerard&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE advertising rate interval - how to auto change from min to max?</title><link>https://devzone.nordicsemi.com/thread/380504?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2022 06:40:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19436db5-7a54-4f26-876e-8052162eb8fc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Gerard,&lt;/p&gt;
&lt;p&gt;There is no need to start using the Common Application Framework (CAF) for this, I was more thinking about if you were already using it. The implementation of this feature in the CAF advertising module just does what I described in my previous post: use a delay (in form of a delayable work item in this case) and restart advertising with the new longer interval after a set amount of time. That is the simplest way to do this.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE advertising rate interval - how to auto change from min to max?</title><link>https://devzone.nordicsemi.com/thread/380469?ContentTypeID=1</link><pubDate>Sun, 07 Aug 2022 09:16:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2ca5e09-3f68-45b4-bb2c-2283543a5136</guid><dc:creator>GerardB</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks for your fast response. Can you tell me a little more about when/why one would use the &amp;quot;Common Application Framework&amp;quot;? What are the pros and cons of using that framework? Is it something new &amp;amp; recommended?&lt;/p&gt;
&lt;p&gt;I did read:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/nrf/libraries/caf/index.html#lib-caf"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/nrf/libraries/caf/index.html#lib-caf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But it would require us to totally re-architect our application, so any more insight would be appreciated.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Gerard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE advertising rate interval - how to auto change from min to max?</title><link>https://devzone.nordicsemi.com/thread/380379?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2022 12:37:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3794b056-8061-4db9-96d9-4420974fa103</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The Zephyr Bluetooth API does not have a way of automatically adjusting the advertising interval. You could use a timer (or a&amp;nbsp;delayed work item in a work queue) to schedule an update of the interval at a later point, and then stop and re-start advertising with a new interval.&lt;/p&gt;
&lt;p&gt;Alternatively, if you are using the&amp;nbsp;Common Application Framework with the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/nrf/libraries/caf/ble_adv.html"&gt;Bluetooth LE advertising module&lt;/a&gt;, this has support for starting with a short interval, and then switching to a longer interval after a defined timeout. See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/nrf/libraries/caf/ble_adv.html#changing-advertising-interval"&gt;Changing advertising interval&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>