<?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 interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71435/advertising-interferes-with-advertising-in-non-whitelisted-mode</link><description>Hello, 
 
 We use the nRF52832 with SD 17.2.0, Bluetooth LE. 
 
 We observe an error when doing the following sequence: 
 - Build a bonded connection using the nRF Connect app. 
 - Trigger a disconnect. 
 - Trigger non-whitelisted advertising (via a button</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Feb 2021 08:08:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71435/advertising-interferes-with-advertising-in-non-whitelisted-mode" /><item><title>RE: Advertising interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/thread/293681?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 08:08:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aba92f4-5df8-461a-b23d-e6ff1de0a409</guid><dc:creator>emb_dev</dc:creator><description>&lt;p&gt;It is set in the init function - it is adapted from the examples and was not suggested. Disabling it prevents the problem from happening which is&amp;nbsp;a possible solution in our case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Out of interest: Shouldn&amp;#39;t it work with the directed advertising as well?&lt;/p&gt;
&lt;pre&gt;init.&lt;span&gt;config&lt;/span&gt;.&lt;span&gt;ble_adv_directed_enabled &lt;/span&gt;&lt;span&gt;= &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;;&lt;br /&gt;init.&lt;span&gt;config&lt;/span&gt;.&lt;span&gt;ble_adv_directed_interval &lt;/span&gt;&lt;span&gt;= &lt;/span&gt;&lt;span&gt;APP_ADV_DIRECTED_INTERVAL&lt;/span&gt;;&lt;br /&gt;init.&lt;span&gt;config&lt;/span&gt;.&lt;span&gt;ble_adv_directed_timeout &lt;/span&gt;&lt;span&gt;= &lt;/span&gt;&lt;span&gt;APP_ADV_DIRECTED_DURATION&lt;/span&gt;;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/thread/293640?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 20:54:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49911cb2-38ad-410f-bcd9-551e030ea523</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Try setting it to undirected (BLE_ADV_MODE_FAST)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How are you setting this in the first place, and where did you find the implementation to suggest it? I can&amp;#39;t see any of the examples that do this by default.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/thread/293576?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 13:57:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61b48535-8a18-42b7-8ae6-3201741ef814</guid><dc:creator>emb_dev</dc:creator><description>&lt;p&gt;I found out that calling the ble_advertising_restart_without_whitelist function is only problematic if the advertising mode is BLE_ADV_MODE_DIRECTED. Does that help any further?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/thread/293549?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 12:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a2f7628-2b85-41db-a4ad-66e32197e6e8</guid><dc:creator>emb_dev</dc:creator><description>&lt;p&gt;The call to flags_set:&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;static &lt;/span&gt;&lt;span&gt;ret_code_t &lt;/span&gt;&lt;span&gt;flags_set&lt;/span&gt;(&lt;span&gt;ble_advertising_t &lt;/span&gt;&lt;span&gt;* &lt;/span&gt;&lt;span&gt;const &lt;/span&gt;p_advertising, &lt;span&gt;uint8_t &lt;/span&gt;flags)&lt;br /&gt;&lt;br /&gt;So I have seen the description of the invalid param:&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt;* @retval ::NRF_ERROR_INVALID_PARAM                   Invalid parameter(s) supplied:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;*                                                      - Invalid advertising data configuration specified. See @ref ble_gap_adv_data_t.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;*                                                      - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;*                                                      - Use of whitelist requested but whitelist has not been set,&lt;br /&gt;&lt;/span&gt;&lt;span&gt;*                                                        see @ref sd_ble_gap_whitelist_set.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But the configuration is right because otherwise the advertising would not work at all if I get this right. And also the whitelist has been set when the error happens.&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/thread/293523?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 11:06:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b188fec0-5bad-4e13-8619-dac003947357</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What call inside ble_advertising_restart_without_whitelist() returns NRF_ERROR_INVALID_PARAM?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/thread/293382?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 15:17:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e27e9342-cb56-4cad-9c71-83c2e5a6e527</guid><dc:creator>emb_dev</dc:creator><description>&lt;p&gt;I need to correct myself, the debugger gave the error earlier. With debugging over logging, the error happens in the function&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;ret &lt;span&gt;= &lt;/span&gt;&lt;span&gt;flags_set&lt;/span&gt;(p_advertising, &lt;span&gt;BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE&lt;/span&gt;); &lt;br /&gt;&lt;br /&gt;inside &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt;uint32_t &lt;/span&gt;&lt;span&gt;ble_advertising_restart_without_whitelist&lt;/span&gt;(&lt;span&gt;ble_advertising_t &lt;/span&gt;&lt;span&gt;* &lt;/span&gt;&lt;span&gt;const &lt;/span&gt;p_advertising)&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/thread/293375?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 14:54:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf926668-2d65-445a-ac80-e8526e965e15</guid><dc:creator>emb_dev</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;yes, that is the problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Disabling the advertising on disconnects prevents the error from happening. But we actually need the functionality to advertise upon disconnect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When debugging, the problem arises in the function:&lt;/p&gt;
&lt;pre&gt;(&lt;span&gt;void&lt;/span&gt;) &lt;span&gt;sd_ble_gap_adv_stop&lt;/span&gt;(p_advertising&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;adv_handle&lt;/span&gt;);&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interferes with advertising in non-whitelisted mode</title><link>https://devzone.nordicsemi.com/thread/293369?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 14:39:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87d8b7c6-a0f8-4a44-9599-ff82b9c504df</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am not sure I understood correctly, but is the issue that you are starting your advertisements from two places at once? That typically triggers an NRF_ERROR_INVALID_STATE, and not the NRF_ERROR_INVALID_PARAM, but in case that is the issue, try adding the following option in your advertising_init() function:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;init.config.ble_adv_on_disconnect_disabled = true;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If that is not the issue, then there is something wrong with your advertising set.Try to debug ble_advertising_start() and ble_advertising_restart_without_whitelist() and see what function call that returns the value NRF_ERROR_INVALID_PARAM.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>