<?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>Change the advertise interval in runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11903/change-the-advertise-interval-in-runtime</link><description>I need change the interval in runtime, so I call a function with the interval as the parameter advertising_init (interval ) every time that I will change. This function define the structure and set the interval: 
 static void advertising_init(uint16_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Feb 2016 17:58:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11903/change-the-advertise-interval-in-runtime" /><item><title>RE: Change the advertise interval in runtime</title><link>https://devzone.nordicsemi.com/thread/45102?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2016 17:58:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09547ed6-ea39-4d91-b06d-0e0e7184966a</guid><dc:creator>Rodrigo</dc:creator><description>&lt;p&gt;Thank you, it is work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the advertise interval in runtime</title><link>https://devzone.nordicsemi.com/thread/45101?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2016 12:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89f44815-5653-4c0f-a1fd-cf486b824f91</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You need to stop and start the advertising when you do your updates. It should be possible with something similar to this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sd_ble_gap_adv_stop();

ble_gap_adv_params_t adv_params;
memset(&amp;amp;adv_params, 0, sizeof(adv_params));
adv_params.interval = interval;
adv_params.timeout = 0;

err_code = sd_ble_gap_adv_start(&amp;amp;adv_params);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>