<?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 update advertising data dynamically (Zephyr)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110832/how-to-update-advertising-data-dynamically-zephyr</link><description>Hi support team 
 If I want to implement update advertising data dynamically function, which method is recommended? 
 1. bt_le_adv_stop (); and bt_le_adv_start (adv, ad, ad_len, sd, sd_len ); 
 2. bt_le_ext_adv_set_data (adv, ad, ad_len, sd, sd_len) or</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Aug 2024 14:16:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110832/how-to-update-advertising-data-dynamically-zephyr" /><item><title>RE: How to update advertising data dynamically (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/499235?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2024 14:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ed453ad-a6dd-423f-8483-3b38618a31af</guid><dc:creator>toni95</dc:creator><description>&lt;p&gt;Hi Ovrebekk,&lt;/p&gt;
&lt;p&gt;would it be possible to update the advertising data on every advertising interval. I read about a radio interrupt that triggers everytime the radio turns on for advertising but it seems to be outdated.&lt;/p&gt;
&lt;p&gt;Is there any other method? If yes, how would it be implemented?&lt;/p&gt;
&lt;p&gt;Best, Toni&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to update advertising data dynamically (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/481744?ContentTypeID=1</link><pubDate>Fri, 03 May 2024 10:23:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59411310-258c-4006-b214-7c73ca4da304</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The recommended method to update advertising data dynamically is to use &lt;em&gt;bt_le_ext_adv_set_data(adv, ad, ad_len, sd, sd_len)&lt;/em&gt;&amp;nbsp;or &lt;em&gt;bt_le_adv_update_data(ad, ad_len, sd, sd_len)&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The function &lt;em&gt;bt_le_ext_adv_set_data()&amp;nbsp;&lt;/em&gt;is used to set an advertising set’s advertising or scan response data. If the advertising set is currently advertising, then the advertising data will be updated in subsequent advertising events. When both BT_LE_ADV_OPT_EXT_ADV and BT_LE_ADV_OPT_SCANNABLE are enabled then advertising data is ignored. When BT_LE_ADV_OPT_SCANNABLE is not enabled then scan response data is ignored.&lt;/p&gt;
&lt;p&gt;On the other hand, &lt;em&gt;bt_le_adv_update_data()&lt;/em&gt; is used to update advertisement and scan response data. The parameters include data to be used in advertisement packets and scan response packets, and the number of elements in each.&lt;/p&gt;
&lt;p&gt;The difference between &lt;em&gt;bt_le_ext_adv_set_data()&lt;/em&gt; and &lt;em&gt;bt_le_adv_update_data()&lt;/em&gt; is that the former is used to set the advertising data for an advertising set, while the latter is used to update the advertising data. Both functions can be used to dynamically update advertising data, but the choice between them depends on whether you want to set new data or update existing data.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>