<?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>Advertising callback in zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96771/advertising-callback-in-zephyr</link><description>Hi, 
 is there a way to trigger a callback in zephyr at each advertsing event? 
 I need to perform some computation when the core is waken by advertising, offloading work in a workqueue. 
 
 Thank you, 
 Alessandro</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Feb 2024 13:14:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96771/advertising-callback-in-zephyr" /><item><title>RE: Advertising callback in zephyr</title><link>https://devzone.nordicsemi.com/thread/467749?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 13:14:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d8c0da0-1c02-465c-8b46-de98a5f945ed</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Cal,&lt;br /&gt;&lt;br /&gt;Please open a new ticket for this.&amp;nbsp;&lt;/span&gt;&lt;a id="i1" href="https://devzone.nordicsemi.com/support/add"&gt;https://devzone.nordicsemi.com/support/add&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;And describe your use-case in details the new ticket.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising callback in zephyr</title><link>https://devzone.nordicsemi.com/thread/466630?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 21:25:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bb57df3-4c83-487d-b73b-66608d153907</guid><dc:creator>cal.rubbo</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;&amp;nbsp; I&amp;nbsp;have an additional question about the link you posted here. I have a slightly different task than the OP.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I see the &amp;quot;bt_le_ext_adv_cb&amp;quot; struct you linked to allows the application to get a callback when advertising STOPS, either by timeout or when N number of advertisements have been sent. I can get that to work, but the problem is advertising must be totally stopped to receive this callback.&lt;/p&gt;
&lt;p&gt;The problem for me is&amp;nbsp;I need to perform computations after EACH advertisement is sent, but not necessarily disable advertising along the way. Using the struct you sent above, I&amp;#39;d need to:&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Set up advertising so that it will stop after sending a single advertisement (via bt_le_ext_adv_start_param)&lt;/p&gt;
&lt;p&gt;2. Start advertising&lt;/p&gt;
&lt;p&gt;2. Wait for the .sent callback defined by bt_le_ext_adv_cb&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp;Start advertising&lt;/p&gt;
&lt;p&gt;... etc.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It seems like there has to be a better way than that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising callback in zephyr</title><link>https://devzone.nordicsemi.com/thread/411566?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 09:04:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3e324ef-a2b4-467e-8200-83196f704d3f</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tested this myself yet, but I think the&amp;nbsp;advertising set can be either extended or legacy.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising callback in zephyr</title><link>https://devzone.nordicsemi.com/thread/411541?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 07:54:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2e04e1e-b998-4908-8033-f6ad80359112</guid><dc:creator>longo92</dc:creator><description>&lt;p&gt;Thank you&amp;nbsp; &lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;&amp;nbsp;.&lt;/p&gt;
&lt;p&gt;Is available only in extended advertising ?&lt;/p&gt;
&lt;p&gt;If want to use legacy advertising is there a way?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising callback in zephyr</title><link>https://devzone.nordicsemi.com/thread/410672?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 14:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fceeb03-b8b0-45b5-85d0-06afd26a7ad7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You have this one for extended adverting:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/zephyr/connectivity/bluetooth/api/gap.html#c.bt_le_ext_adv_cb.sent"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/zephyr/connectivity/bluetooth/api/gap.html#c.bt_le_ext_adv_cb.sent&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>