<?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 receive an event after advertising timeout in SDK 15.0.0 S132v6.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36922/how-to-receive-an-event-after-advertising-timeout-in-sdk-15-0-0-s132v6-0</link><description>Hi everyone, 
 
 I&amp;#39;m using SDK 15.0.0 S132v6.0 and looking for a way to get an event when the advertising times out. I discovered the softdevice_ble_evt_handler_set() in this post but was not able to find it in the SDK 15.0.0 documentation. 
 
 Do you</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 04 Oct 2020 22:34:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36922/how-to-receive-an-event-after-advertising-timeout-in-sdk-15-0-0-s132v6-0" /><item><title>RE: How to receive an event after advertising timeout in SDK 15.0.0 S132v6.0</title><link>https://devzone.nordicsemi.com/thread/272849?ContentTypeID=1</link><pubDate>Sun, 04 Oct 2020 22:34:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b861d51d-a998-4870-8772-465928059f30</guid><dc:creator>Olfox</dc:creator><description>&lt;p&gt;Hi Joakim, i add it in the main.c&amp;nbsp; in&amp;nbsp;&lt;span&gt;ble_evt_handler() as you advise but it never jump into it. But i clearly jump into&amp;nbsp;ble_advertising_on_ble_evt in&amp;nbsp;ble_advertising.c file. Is there an option somewhere to enable to also have this handler in main pop up ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you !&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to receive an event after advertising timeout in SDK 15.0.0 S132v6.0</title><link>https://devzone.nordicsemi.com/thread/142779?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 10:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2953109-7011-41bc-acc7-77b7319c11f5</guid><dc:creator>lhochstetter</dc:creator><description>&lt;p&gt;Hi Joakim,&lt;/p&gt;
&lt;p&gt;thanks for your input, it worked like a charm!&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;lhochstetter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to receive an event after advertising timeout in SDK 15.0.0 S132v6.0</title><link>https://devzone.nordicsemi.com/thread/142407?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 12:52:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73a86aaf-e4e7-49cd-b13f-09988ac4285d</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;If we take a look at the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/structble__gap__adv__params__t.html#a5a6e038d3c55004da3ac23e353f42517" target="_blank" rel="noopener noreferrer"&gt;GAP advertising parameters - Duration&lt;/a&gt;&lt;br /&gt;&lt;em&gt;&amp;quot;Advertising duration in 10 ms units. When timeout is reached, an event of type BLE_GAP_EVT_ADV_SET_TERMINATED is raised.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It might be easier for you to look at how this is handled in one of the examples in the SDK;&lt;br /&gt;If we look at the ble_app_uart:&lt;/p&gt;
&lt;p&gt;The advertisement duration is defined at the top of main. c (#define APP_ADV_DURATION 18000).&lt;/p&gt;
&lt;p&gt;When the timeout is reached after 180s, the BLE_GAP_EVT_ADV_SET_TERMINATED event is raised. &lt;br /&gt;This event is handled in ble_advertising_on_ble_evt() in the ble_advertising.c file.&lt;br /&gt;However, you could also add this event to the to the ble_evt_handler() in main.c.&lt;/p&gt;
&lt;p&gt;If something is unclear, or you have further questions, please let me know.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br /&gt;Joakim.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>