<?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>Cannot restart advertising in Beacon example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21536/cannot-restart-advertising-in-beacon-example</link><description>Hey guys! 
 I face a problem that I have not been able to solve since several days... 
 I would like to send only one advertising frame every 4 seconds. I do not want to use connectable mode since I only need to send few values periodically, and I do</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Apr 2017 09:20:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21536/cannot-restart-advertising-in-beacon-example" /><item><title>RE: Cannot restart advertising in Beacon example</title><link>https://devzone.nordicsemi.com/thread/84543?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2017 09:20:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f829cb4f-a879-49e4-9091-aa40da94744a</guid><dc:creator>F0cks</dc:creator><description>&lt;p&gt;Hey! That is what I am planning to do: compare which mode consumes more power. To see if there is more or less average power used by spikes when I turn on BLE compared to let it always turn.
I have seen your solution in other posts, but I have not tried it because some people say that it has strange behavior. But you have convinced me and for the moment, I do not see any side effect and I do not have &amp;quot;Fatal error&amp;quot; or reset anymore. Thanks a lot for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot restart advertising in Beacon example</title><link>https://devzone.nordicsemi.com/thread/84545?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 18:13:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31d23144-b572-426f-8ce5-1314741f2eb6</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;Oh, I get it.
I&amp;#39;ve always used:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;							err_code = sd_ble_gap_adv_stop();
						APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;							err_code = sd_ble_gap_adv_start(&amp;amp;m_adv_params);
						APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, far it&amp;#39;s worked every time I have used it.  Though if you are on a newer SDK, then the API&amp;#39;s might have changed. But if they did, Nordic are pretty good at describing the API changes in the release notes.&lt;/p&gt;
&lt;p&gt;But from experience, I can tell you that the code executed to stop and start advertising is vastly more power hungry than a few beacons.  So you need to be turning it off for quite a while to make it worth it on power consumption.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot restart advertising in Beacon example</title><link>https://devzone.nordicsemi.com/thread/84542?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 16:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:819e892e-6d2b-441c-9a2a-c6695ff7c7af</guid><dc:creator>F0cks</dc:creator><description>&lt;p&gt;My problem is not how to send advertising signal every 4 sec but how to stop and restart it...
I have power management considerations and I need to stop it. I also know how to change data on the fly and how the non connectable mode is working. Thanks for your answer but it does not help me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot restart advertising in Beacon example</title><link>https://devzone.nordicsemi.com/thread/84544?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 15:36:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3d642a4-a647-4ac4-badd-a9ea5a00d14a</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;I don&amp;#39;t understand why you are stopping advertising.  Just don&amp;#39;t set the connectable flag in the advertisment, then it&amp;#39;s not connectable and start ble advertising in the softdevice for 4 sec duration. And just let it go. After that it is running as a beacon only with 4 sec between advertisement bursts.  No need to mess with it.
If you want to alter the advert data on the fly, just modify the struct values that the init routine looks at then run advertising_init and the values get passed over to the softdevice.  Again, no need to stop it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>