<?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>nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23793/nrf52832-ble-stk-error</link><description>Hi everyone, 
 I am using nRF52832 chip and trying to use BLE on that. I flashed SoftDevice. When I flash the &amp;quot;ble_app_uart&amp;quot; example, error code 0x3001 occurs. the function &amp;quot;sd_ble_cfg_set&amp;quot; call return the error. I attached the header and the source</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Jul 2017 08:50:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23793/nrf52832-ble-stk-error" /><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93588?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 08:50:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2f9b1a5-41bc-47c6-9b7d-a382f9c3750b</guid><dc:creator>huaminhtuan</dc:creator><description>&lt;p&gt;Hi endnode, my problem is solved :D all I need to do is changing &lt;code&gt;CFLAGS += -Wall -Werror -O0 -g3&lt;/code&gt;to &lt;code&gt;CFLAGS += -Wall -Werror -O3 -g3&lt;/code&gt;. I don&amp;#39;t know why :)))) anyway, thanks for your help, you are my savior :&amp;#39;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93592?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 08:23:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39aea34d-d792-46d2-af06-21ca4ea1a6ca</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Oh you are mixing different API and SD versions? That will most probably fail terribly;) Why you don&amp;#39;t stick with the SD which is recommended with (delivered in) SDK version you use (especially if you don&amp;#39;t know how to migrate to different one yourself)? Basically you need SD HEX file version on the chip in sync with ROM/RAM regions&amp;#39; setting in your project (typically LD script for GCC or project settings in Keil/IAR) and SD API headers which match the version. There is hardly any different solution to this basic set-up;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93596?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 03:41:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2b9fb5e-8164-4af1-9523-3b223f1210e9</guid><dc:creator>huaminhtuan</dc:creator><description>&lt;p&gt;When I define &lt;code&gt;BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT&lt;/code&gt; in my code, I get an error that it is redefined, because &lt;code&gt;BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT&lt;/code&gt; is defined in &lt;code&gt;ble_gap.h&lt;/code&gt;, which is in the following sequence: BLE_Drv.h -&amp;gt; ble_advertising.h -&amp;gt; ble.h -&amp;gt; ble_gap.h .This is the reason why I can compile my code without error and flash the hex file to the chip. But unfortunately, the error 0x3001 is still there :(((( after searching, I get an information that wrong Softdevice version can cause that error. In the example in the Software_development_kit, it uses the version 4.0.2 and I am using the version 5.0.0-1.alpha. But when I try to flash the version 4.0.2 into the nRF52832 chip, nothing works :(((( I am searching for another solution&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93595?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 11:08:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e2703fb-8281-475b-a4b4-919cdda23578</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Sorry, also my mistake. &lt;code&gt;BLE_GAP_CFG_ROLE_COUNT&lt;/code&gt; is constant to distinguish which variant of &lt;code&gt;sd_ble_cfg_set&lt;/code&gt; you are calling, that&amp;#39;s defined in SD API. However you need to define &lt;code&gt;BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT&lt;/code&gt; and you certainly have it in your project unless you couldn&amp;#39;t compile it (and hence couldn&amp;#39;t load it to chip and observe 0x3001 error code). If you don&amp;#39;t know how many GAP Peripheral connection links you need to support in your FW then I cannot help you, that&amp;#39;s something you need to decide;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93594?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 11:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38e02436-b3d2-4d6d-a8f3-0aa33df845de</guid><dc:creator>huaminhtuan</dc:creator><description>&lt;p&gt;My mistake!! I forgot defining &lt;code&gt;BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT&lt;/code&gt; and &lt;code&gt;BLE_GAP_CFG_ROLE_COUNT&lt;/code&gt; :(( which value should them be?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93597?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 09:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22262488-f655-4e27-955b-126a5e4faca9</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Looking to your code and there seems to be no obvious mistake. If you say the error code is thrown at &lt;code&gt;err_code = sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &amp;amp;ble_cfg, ram_start);&lt;/code&gt; then I don&amp;#39;t see two crucial values: how are &lt;code&gt;BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT&lt;/code&gt; and &lt;code&gt;BLE_GAP_CFG_ROLE_COUNT&lt;/code&gt; defined?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93593?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 02:01:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4303a70-5513-46ca-8a2f-38d9304c5ac8</guid><dc:creator>huaminhtuan</dc:creator><description>&lt;p&gt;Hi endnode, I updated the question and attached the C source and the header file. Thanks for helping me :D&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93591?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 11:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ced27089-d357-40fc-b817-6e07b033cfe2</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I&amp;#39;m afraid it will need larger code sample. Have you used some working SDK example as baseline? And I&amp;#39;d prefer to update the question to see all the things at one place so others can answer easily...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93590?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 08:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a2c7613-6b96-4250-a127-3a47b6e182e5</guid><dc:creator>huaminhtuan</dc:creator><description>&lt;p&gt;memset(&amp;amp;ble_cfg, 0, sizeof(ble_cfg));
ble_cfg.gap_cfg.role_count_cfg.periph_role_count  = BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT;
ble_cfg.gap_cfg.role_count_cfg.central_role_count = 0;
ble_cfg.gap_cfg.role_count_cfg.central_sec_count  = 0;
err_code = sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &amp;amp;ble_cfg, ram_start);
APP_ERROR_CHECK(err_code);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93587?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 08:52:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e28a505a-d860-479c-9857-1a3364ad8c66</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;And what parameters you supply there?:) It looks strange because 0x3001 means &lt;code&gt;BLE_ERROR_NOT_ENABLED&lt;/code&gt; and that should not be returned by &lt;code&gt;sd_ble_cfg_set&lt;/code&gt;, unless you use some variant which must be called after SD is enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93589?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 08:47:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c542a23e-0afe-4ddb-8f9f-e6976a00fb2c</guid><dc:creator>huaminhtuan</dc:creator><description>&lt;p&gt;Hi endnode, the function is &amp;quot;sd_ble_cfg_set&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE STK error</title><link>https://devzone.nordicsemi.com/thread/93586?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 08:36:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1f2a5a5-2f81-46fd-96fb-3ce40c6430a7</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Which &lt;code&gt;sd_&lt;/code&gt; function call returns this error? If you look its header then you should get some basic hints what went wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>