<?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>Unstable advertising startup time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108782/unstable-advertising-startup-time</link><description>Hello, 
 I have an application that needs to advertise only once then sleep for a long period in BLE 1 Mbps. From time to time it needs also to advertise in CODED_PHY (ext advertisement) instead of the standard 1 Mbps BLE. I am using the SD140 on nRF52811</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 10 Mar 2024 15:03:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108782/unstable-advertising-startup-time" /><item><title>RE: Unstable advertising startup time</title><link>https://devzone.nordicsemi.com/thread/473066?ContentTypeID=1</link><pubDate>Sun, 10 Mar 2024 15:03:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:807d5595-8eea-410a-9a87-d48ec19a7f50</guid><dc:creator>Yves Oesch</dc:creator><description>&lt;p&gt;Thanks for the clarifications Vidar. After some rework on my timer code it now works fine. Thanks for the efficient support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unstable advertising startup time</title><link>https://devzone.nordicsemi.com/thread/471491?ContentTypeID=1</link><pubDate>Thu, 29 Feb 2024 10:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9db224cb-afe6-4ed8-93fd-45903191290a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The Bluetooth specification requires a random 0 ms to 10 ms delay to be added prior to every advertising event. This is to prevent scenarios where your advertising may become synchronized with advertisement events from other nearby advertisers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1709202288368v1.png" /&gt;&lt;/p&gt;
[quote user=""]- Configure the stack to advertise only once then stop advertising. This would allow going to sleep mode quicker. As I have understood, there is a parameter m_adv_params.duration that could be set to 1 to advertise only once, but I get a crash if I use it. (BLE_GAP_EVT_ADV_SET_TERMINATED) So currently it is kept set to 0. Any pointer to working code using this feature?[/quote]
&lt;p&gt;This is what I would have done. Then you can start the advertiser from the timer callback and immediately return to sleep to reduce power consumption. But I&amp;#39;m not sure why this lead to a crash in your application. Do you have logging enabled in your application, and have you checked the return code from the advertising start function?&lt;/p&gt;
&lt;p&gt;Also, you may want to consider sending more than one advertisement to increase the probability of it being received by the Observer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>