<?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>Advertising doesn&amp;#39;t start immediately after calling sd_ble_gap_adv_start</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54839/advertising-doesn-t-start-immediately-after-calling-sd_ble_gap_adv_start</link><description>Hi everybody, 
 I&amp;#39;m having a problem with the advertising function of the SoftDevice. 
 
 When the application starts advertising the function &amp;quot;sd_ble_gap_adv_start()&amp;quot; returns without an error. 
 But it takes up to 10 seconds until I can see the advertising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Dec 2019 13:47:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54839/advertising-doesn-t-start-immediately-after-calling-sd_ble_gap_adv_start" /><item><title>RE: Advertising doesn't start immediately after calling sd_ble_gap_adv_start</title><link>https://devzone.nordicsemi.com/thread/224474?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2019 13:47:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:127cff34-6de2-403c-8769-66f8b7dbb90f</guid><dc:creator>Fabian Hauschild</dc:creator><description>&lt;p&gt;I tried starting the Advertising with 100ms 50ms and 20ms interval but that doesn&amp;#39;t change anything.&lt;/p&gt;
&lt;p&gt;It still takes up to 10s until I can see the Advertising with the nrf Connect App&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising doesn't start immediately after calling sd_ble_gap_adv_start</title><link>https://devzone.nordicsemi.com/thread/222653?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 15:58:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:236a562b-0b51-45f6-829a-1837b4c14113</guid><dc:creator>Fabian Hauschild</dc:creator><description>&lt;p&gt;Thanks for the answer.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After the Disconnect I start the Advertsing with an interval of 500ms and a timeout of 30s.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the same function to start advertising after a reset / power on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t use fast or slow advertising I&amp;#39;ve written my own advertising functions to init, start and stop advertising via the SoftDevice API.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This code is part of my function to init and start advertising. It is called after disconnecgt and after reset.&lt;/p&gt;
&lt;p&gt;Advertising Data is the Devicename and Manufaturer Specific Data (Scan Response).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; // Those are the Parameters used for advertising
 
 // --- Set advertising Parameters ---------
 memset(&amp;amp;adv_params,0,sizeof(adv_params));
 
 adv_params.primary_phy     = BLE_GAP_PHY_1MBPS;
 adv_params.duration        = APP_ADV_TIMEOUT_IN_SECONDS;  // 30s
 adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;
 adv_params.p_peer_addr     = NULL;
 adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
 adv_params.interval        = 5 * 160;             // ca 500ms
 
 // --- Update Advertising data &amp;amp; parameter --------
err_code = 0;
err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle,&amp;amp;m_adv_data,&amp;amp;adv_params);    
err_code++;

// --- Start Advertiding
err_code = sd_ble_gap_adv_start(m_adv_handle, APP_BLE_CONN_CFG_TAG);
NRF_LOG_INFO(&amp;quot;Advertising started err_code: %d&amp;quot;, err_code);
    
    &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising doesn't start immediately after calling sd_ble_gap_adv_start</title><link>https://devzone.nordicsemi.com/thread/222614?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 12:44:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcdd92d8-0d8f-4074-8569-01e823e1d2de</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;We usually use the ble sniffer from ellisys if we do not use the nrfsniffer. There are other options, i.e. frontline, but this is not as intuitive as the ellisys sniffer, mainly because the gui is a bit dated.&lt;/p&gt;
&lt;p&gt;With 500ms adv interval it will take some time to establish the connection. After a disconnect the advertisement module would usually start fast advertising, then move to slow after some time. This could also be done on startup. i.e. configure the device to start fast advertising for a few secondes before changing to a slower more power conserving interval later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising doesn't start immediately after calling sd_ble_gap_adv_start</title><link>https://devzone.nordicsemi.com/thread/222292?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 10:22:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0777f91a-a2b9-4415-9cd8-fd4efb5f2569</guid><dc:creator>Fabian Hauschild</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve checked the advertising with a sniffer. After a disconnect the advertising starts immediatly.&lt;/p&gt;
&lt;p&gt;After a power up it takes up to 10 seconds until I can see advertising packets with the sniffer. (The application starts advertising&amp;nbsp; 3s after power on).&lt;/p&gt;
&lt;p&gt;Can you recommend a good Bluetooth / BLE sniffer ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising doesn't start immediately after calling sd_ble_gap_adv_start</title><link>https://devzone.nordicsemi.com/thread/222078?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 12:25:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfed1c36-bf71-45f8-ab01-d6dff29651d6</guid><dc:creator>Fabian Hauschild</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using a 500ms advertising interval.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have access to a BLE Sniffer (I could try using nRF Sniffer with a nRF52840 DK. But itwill take some time setting this up)&lt;/p&gt;
&lt;p&gt;We have been testing our BLE products with nrfConnect for Android and PC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising doesn't start immediately after calling sd_ble_gap_adv_start</title><link>https://devzone.nordicsemi.com/thread/222071?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 12:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15906069-bb6d-4000-8858-81d309f2493d</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What advertisement interval are you using? Could you check with a sniffer when the first advertisement package is sent on air?&lt;/p&gt;
&lt;p&gt;Note that in case the advertiser and scanner interval uses similar intervals, it could take some time until the scanner captures the advertisement packet.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-231a577f947240a881f6904051021a03/BLE-Advertising-2.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>