<?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>nRF5340 - Getting started a new limited adv session</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98304/nrf5340---getting-started-a-new-limited-adv-session</link><description>Hi, 
 In our BLE peripheral application (NCS 2.2.0, Zephyr 3.2.99) the advertising window is limited to 30 sec (limited advertising with BT_LIM_ADV_TIMEOUT = 30). Now I want give user the chance to launch another 30 sec advertising window by pressing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Apr 2023 15:35:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98304/nrf5340---getting-started-a-new-limited-adv-session" /><item><title>RE: nRF5340 - Getting started a new limited adv session</title><link>https://devzone.nordicsemi.com/thread/419086?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 15:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:788bd321-49a8-4235-a7e1-8872146efa83</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve solved&amp;nbsp;by awaiting the pushbutton k_event outside the ble module.&amp;nbsp;The event detection calls an api for restarting the advertising if CONFIG_BT_AUTORESTART&amp;nbsp;_ADVERTISING is n. Otherwise the bluetooth disconnection&amp;nbsp;gets advertising restarted automatically. Thank you&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - Getting started a new limited adv session</title><link>https://devzone.nordicsemi.com/thread/418639?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 13:49:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73677845-5f1e-465e-ba8f-bf8b4ef8589e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriele,&amp;nbsp;&lt;br /&gt;I tried to look into the host stack but couldn&amp;#39;t find any callback to the application.&amp;nbsp;&lt;br /&gt;If you have a look in the adv.c you can find where the&amp;nbsp;k_work for adv_timeout is scheduled inside&amp;nbsp;bt_le_adv_start() with&amp;nbsp;BT_LIM_ADV_TIMEOUT. But there is no callback to the application when the&amp;nbsp;adv_timeout() is triggered.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;So I afraid you will have to start a timer in the application to keep track of that.&amp;nbsp;&lt;br /&gt;If you want to launch another 30 sec before the first 30sec advertising is timed out, you would need to stop advertising, then the k_work scheduling for &lt;span&gt;adv_timeout&amp;nbsp;()&amp;nbsp;&lt;/span&gt;will be cancelled.&amp;nbsp;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>