<?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>updating periodic advertising data after each advert</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94507/updating-periodic-advertising-data-after-each-advert</link><description>Hi, I use periodic advertising to send live data based on readings from an accelerometer. I want to change the advertising packet after every advert to the new values. 
 My advertising interval is currently set with 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 At the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Dec 2022 14:39:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94507/updating-periodic-advertising-data-after-each-advert" /><item><title>RE: updating periodic advertising data after each advert</title><link>https://devzone.nordicsemi.com/thread/399477?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 14:39:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1830e8c6-049b-4cc3-a6fb-aa79f29dd8ab</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;You welcome Jason. The best of luck with your project &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: updating periodic advertising data after each advert</title><link>https://devzone.nordicsemi.com/thread/399336?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 08:34:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b9ac79d-12df-4bcb-a5b0-577c9c291ec1</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;ah&amp;nbsp;yes of course you&amp;#39;re right. Otherwise&amp;nbsp;the receiver couldn&amp;#39;t stay in sync.&lt;span style="font-family:inherit;"&gt;Thank you!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: updating periodic advertising data after each advert</title><link>https://devzone.nordicsemi.com/thread/399329?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 08:21:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc180e99-8217-4130-8a5f-f58ccf98269b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jason&lt;/p&gt;
&lt;p&gt;Standard advertise packets are sent with random 0-10ms delay, that is correct, to avoid repeated collisions on the primary advertising channels, but I believe periodic advertising is not. Periodic advertising is sent on the secondary advertising channels and don&amp;#39;t need randomized timing since there are a lot more channels available.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Good to hear you found a good solution &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&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><item><title>RE: updating periodic advertising data after each advert</title><link>https://devzone.nordicsemi.com/thread/398957?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2022 12:13:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29f79f80-11e8-40d0-a96e-680a2adfa96a</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;I see, thanks for the explanation.&amp;nbsp;&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/94507/updating-periodic-advertising-data-after-each-advert/398953"]It&amp;#39;s a bit odd that the timer approach would be imprecise though. You mean to say that you don&amp;#39;t see the data change as expected?[/quote]
&lt;p&gt;I thought the periodic adverts are sent with a random delay of a few ms which meant that a fixed timer wouldn&amp;#39;t stay in sync.&amp;nbsp;I sometimes see a jump in the receiver so I assumed it was because the thread updating the data had gone out of sync with the advertisements. Perhaps it&amp;#39;s sometime packet loss and sometimes because the threads went out of sync.&lt;/p&gt;
&lt;p&gt;I think the simplest solution is to just send more adverts. I get better&amp;nbsp;signal at long range and it&amp;#39;s not much power compared to the LEDs I have to run all the time.&lt;/p&gt;
&lt;p&gt;THANKS for you help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: updating periodic advertising data after each advert</title><link>https://devzone.nordicsemi.com/thread/398953?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2022 11:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7bda48e-189d-4be0-8b70-3066a4b87e18</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jason&lt;/p&gt;
&lt;p&gt;There is no way to get a callback for every sent advertisement packet unfortunately. The radio notification feature is the closest you get, and as you say this one will not differentiate between the differents types of events.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a bit odd that the timer approach would be imprecise though. You mean to say that you don&amp;#39;t see the data change as expected?&lt;/p&gt;
&lt;p&gt;Possibly it would work better if you send the periodic advertisements at a faster rate than the data gets updated. Then you have a higher chance of picking up each accelerometer update, since there is always a risk that you don&amp;#39;t manage to receive 100% of the advertise packets on the receiving side.&amp;nbsp;&lt;/p&gt;
[quote user="JasonR"]I assume this is only for extended adverts, not periodic adverts.&amp;nbsp;[/quote]
&lt;p&gt;This one should work for periodic advertising as well.&lt;/p&gt;
&lt;p&gt;First off, periodic advertising is based on extended advertising, and uses a similar principle of having a small packet sent on the primary (legacy) advertising channels that points to more data being sent on the secondary channels.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Secondly, the&amp;nbsp;bt_le_ext API&amp;#39;s are not limited to extended advertising only. They are a replacement of the older bt_le_adv API that can do both legacy and extended advertising.&amp;nbsp;&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><item><title>RE: updating periodic advertising data after each advert</title><link>https://devzone.nordicsemi.com/thread/398880?ContentTypeID=1</link><pubDate>Sun, 04 Dec 2022 16:05:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:599fc3ca-4e23-4d21-a6c5-2be8dc81863f</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;&lt;span&gt;Is there a periodic advertisement equivalent of this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;bt_le_ext_adv_sent_info::num_sent&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I assume this is only for extended adverts, not periodic adverts.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>