<?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>what is meaning of err_code:8,when i use the  ble_adverting_start(BLE_ADV_MODE_FAST);</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24666/what-is-meaning-of-err_code-8-when-i-use-the-ble_adverting_start-ble_adv_mode_fast</link><description>when i use the ble_adverting_start(BLE_ADV_MODE_FAST);
and then use the ble _advering_start(BLE_ADV_MODE_IDLE);
then ble_adverting_start(BLE_ADV_MODE_FAST); the return err_code is 8; then APP_ERROR_CHECK(err_code) it can system abnormal。</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Jan 2019 20:38:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24666/what-is-meaning-of-err_code-8-when-i-use-the-ble_adverting_start-ble_adv_mode_fast" /><item><title>RE: what is meaning of err_code:8,when i use the  ble_adverting_start(BLE_ADV_MODE_FAST);</title><link>https://devzone.nordicsemi.com/thread/165028?ContentTypeID=1</link><pubDate>Thu, 10 Jan 2019 20:38:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a57ef781-2267-40e7-ac94-b87f13173ea2</guid><dc:creator>Kraig</dc:creator><description>&lt;p&gt;Did you ever find a solution to this?&amp;nbsp; I am getting the same thing doing the same order of operations.&lt;/p&gt;
&lt;p&gt;Everything has been initialized properly and it works for the first advertising.&amp;nbsp; I get it failing inside the call&amp;nbsp;sd_ble_gap_adv_set_configure() inside ble_advertising_start() with the&amp;nbsp;NRF_ERROR_INVALID_STATE error code.&amp;nbsp; The documentation here,&amp;nbsp;&lt;a href="https://www.nordicsemi.com/DocLib/Content/SoftDevice_API_Doc/S132/v6-0-0/group_ble_gap_functions?650#ga9969047f4e7485c3f856c841978cc31a"&gt;https://www.nordicsemi.com/DocLib/Content/SoftDevice_API_Doc/S132/v6-0-0/group_ble_gap_functions?650#ga9969047f4e7485c3f856c841978cc31a,&lt;/a&gt;&amp;nbsp;says for that error code:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Invalid state to perform operation.&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is invalid to provide non-NULL advertising set parameters &lt;strong&gt;while advertising&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It is invalid to provide the same data buffers &lt;strong&gt;while advertising&lt;/strong&gt;. To update advertising data, provide new advertising buffers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since there isn&amp;#39;t a&amp;nbsp;ble_advertising_stop() function, I thought&amp;nbsp;ble_advertising_start() with the mode to BLE_ADV_MODE_IDLE would stop it so the &amp;quot;while advertising&amp;quot; condition for this error shouldn&amp;#39;t happen, but I guess I am wrong.&lt;/p&gt;
&lt;p&gt;I need my device to turn on and turn off based on certain conditions and I am wondering how the SDK for this softdevice (132 V6.0.0) was meant to be used to accomplish this.&amp;nbsp; I thought I would just turn advertising on for enabled (on) and disconnect and turn advertising to idle for disabled (off) but maybe I should be disabling and enabling the whole softdevice every time?&amp;nbsp; I had issues re-enabling the softdevice when I did try the latter.&lt;/p&gt;
&lt;p&gt;Any quick suggestions would be appreciated.&amp;nbsp; Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what is meaning of err_code:8,when i use the  ble_adverting_start(BLE_ADV_MODE_FAST);</title><link>https://devzone.nordicsemi.com/thread/97091?ContentTypeID=1</link><pubDate>Fri, 25 Aug 2017 10:57:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec1b313a-84a8-4dff-be88-a03bdfdaed72</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Error 8 is defined in nrf_error.h as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define NRF_ERROR_INVALID_STATE               (NRF_ERROR_BASE_NUM + 8)  ///&amp;lt; Invalid state, operation disallowed in this state
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you look at the declaration of the function ble_advertising_start() in ble_advertising.h you will see that it will return this error &amp;quot;if the module is not initialized&amp;quot;. So then the question is: have you initialized the ble_advertising module with ble_advertising_init()? If so, can you try to step through the advertising functions with your debugger and see exactly where the error comes from?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>