<?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>Restart Advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9821/restart-advertising</link><description>I would like my device to advertise for 10s and then begin advertising again only on an external interrupt. 
 What steps are required to restart advertising without restarting the device after a timeout event has occurred?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Oct 2015 20:06:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9821/restart-advertising" /><item><title>RE: Restart Advertising</title><link>https://devzone.nordicsemi.com/thread/36394?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 20:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df9af9da-3f93-4b5a-8cb5-9235b6e5081a</guid><dc:creator>John</dc:creator><description>&lt;p&gt;No worries, just caught my eye.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Restart Advertising</title><link>https://devzone.nordicsemi.com/thread/36393?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 18:36:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:252ae1d9-ad62-4a27-b7de-7b51181369d3</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Oh yes - didn&amp;#39;t look at the Tags!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Restart Advertising</title><link>https://devzone.nordicsemi.com/thread/36392?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 16:26:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf319e22-e10a-4c67-8955-9ba4b1bda8af</guid><dc:creator>John</dc:creator><description>&lt;p&gt;This is going to appear sarcastic, but it isn&amp;#39;t meant to be: he tagged the question with nrf51822, so I think that is the chip he is using.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Restart Advertising</title><link>https://devzone.nordicsemi.com/thread/36395?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 16:25:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f92dee61-a26b-46d9-8449-98ab4d81731a</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Building a bit on what @Artucas answered: On the call to advertising_init during startup I would set the advertising timeout to 10 seconds. After advertising_start is called the device will only advertise for 10 seconds. Then in the button push handler (assuming it is done in an interrupt) I&amp;#39;d set a flag which I can check in the main loop. If the main loop sees the flag set I&amp;#39;d call advertising_init again if I needed to change the timeout to something longer/shorter and then call advertising_start again. Clear the button pushed flag when complete.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Restart Advertising</title><link>https://devzone.nordicsemi.com/thread/36391?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 11:22:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b08de1c1-1db6-4ed3-b6e1-675406b1d5e4</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;What Bluetooth chip(s) are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Restart Advertising</title><link>https://devzone.nordicsemi.com/thread/36396?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 09:05:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a14e73a-63a2-4ad0-989c-1c8a36b1f0cf</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;Hi polarstate, i can&amp;#39;t guarantee that this is 100% correct way to do this, but when i have to do tasks similiar to yours, i just call  advertising_start() function and it starts advertising. Usually, every time i want to advertise different data, so to update advertisement data i just call advertise_init() function and then start advertising by calling advertising_start();&lt;/p&gt;
&lt;p&gt;Hope This helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>