<?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>NRF Connect SDK: How to set Advertising Timeout?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114699/nrf-connect-sdk-how-to-set-advertising-timeout</link><description>Hello, I&amp;#39;m using the nrf52DK for the chip nrf52832 with nrf connect SDK v2.6.1 
 I want to implement an advertising timeout say 5 minutes. How can I achieve that? any example code would be nice. Thanks for the help.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Feb 2025 21:46:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114699/nrf-connect-sdk-how-to-set-advertising-timeout" /><item><title>RE: NRF Connect SDK: How to set Advertising Timeout?</title><link>https://devzone.nordicsemi.com/thread/524167?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2025 21:46:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00acd371-898f-4e6a-9307-e81fc3fbec5a</guid><dc:creator>yorisimo</dc:creator><description>&lt;p&gt;&lt;span&gt;I am using CONFIG_BT_LIM_ADV_TIMEOUT = 60 with&amp;nbsp;BT_LE_AD_LIMITED, but it seems this only works prior to establishing a connection.&amp;nbsp; After disconnecting, it will advertise indefinitely (I&amp;#39;m still using nRF Connect SDK 2.4.0).&amp;nbsp; Is this the expected behavior?&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect SDK: How to set Advertising Timeout?</title><link>https://devzone.nordicsemi.com/thread/505763?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2024 14:39:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6706ea52-4927-49fd-8922-84d7d5ae62ed</guid><dc:creator>Gokulnath</dc:creator><description>&lt;p&gt;The default timer example which you had given at the above&amp;nbsp;link works. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect SDK: How to set Advertising Timeout?</title><link>https://devzone.nordicsemi.com/thread/503912?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2024 09:07:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16129590-3826-4300-8299-d46b4526e094</guid><dc:creator>Gokulnath</dc:creator><description>&lt;p&gt;Thanks for your response.&lt;br /&gt;your recommendation of&amp;nbsp;&lt;span&gt;CONFIG_BT_LIM_ADV_TIMEOUT with&amp;nbsp;BT_LE_AD_LIMITED works great if the timeout is within 3 minutes.&lt;br /&gt;&lt;br /&gt;But for my requirement of 5-minute timeout, I think the only option is to use the timer recommendation method. I shall do it &amp;amp; shall update the ticket later in the coming weeks.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect SDK: How to set Advertising Timeout?</title><link>https://devzone.nordicsemi.com/thread/503869?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2024 05:26:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f71b1c6-a2a2-4328-8530-7bc587980b13</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry for the late reply, you should be able to use&amp;nbsp;&lt;span&gt;BT_LE_AD_LIMITED in the advertising flag and have the&amp;nbsp;&lt;/span&gt;CONFIG_BT_LIM_ADV_TIMEOUT being set to timeout value in your prj.conf. This should work as reported by some of our customers but in case it did not, it should be quite simple to add a timer with a callback and a timeout. In the timeout callback handler just call bt_le_adv_stop to stop the advertisement.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect SDK: How to set Advertising Timeout?</title><link>https://devzone.nordicsemi.com/thread/502584?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2024 10:32:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d94ac09c-654c-406b-a61d-23f019863edd</guid><dc:creator>Gokulnath</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;Thanks for your reply.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m looking more towards the options of &amp;quot;BT_LE_AD_LIMITED&amp;quot; where we could define advertising timeout as a parameter. I&amp;#39;m currently migrating from &amp;quot;NRF5 SDK&amp;quot; hence, I am unsure if this above option is very efficient or if I should go towards the first option you suggested using timers!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;let me know.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect SDK: How to set Advertising Timeout?</title><link>https://devzone.nordicsemi.com/thread/502509?ContentTypeID=1</link><pubDate>Fri, 13 Sep 2024 14:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65481bf4-484e-420e-896e-56fde2157b94</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;You can stop the advertising with &lt;code&gt;bt_le_adv_stop() &lt;/code&gt;after 5 minutes has passed. To do that you can create a timer and stop the advertising when the timer finishes. See &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/zephyr/kernel/services/timing/timers.html"&gt;Timers&lt;/a&gt; for documenation and code examples.&lt;/p&gt;
&lt;p&gt;Does this cover your use-case? If not, please describe it in more detail and we can help you to find a solution.&lt;/p&gt;
&lt;p&gt;You can also refer to &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-2-bluetooth-le-advertising/"&gt;Bluetooth Low Energy Fundamentals Lesson 2&lt;/a&gt; to for a hands-on learning experience on Bluetooth LE advertising.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>