<?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>sd_ble_gap_device_name_set() returns 0x3001 (sdk 11)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21912/sd_ble_gap_device_name_set-returns-0x3001-sdk-11</link><description>I am porting our sdk 8 based firmware for the sdk 11. Now the code crashes at the code below: 
 err_code = sd_ble_gap_device_name_set(&amp;amp;sec_mode,
 (const uint8_t *)name,
 strlen(name));
debuglnf(&amp;quot;err_code=%08x&amp;quot;, err_code);
 
 The error code is 0x3001</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 May 2017 07:02:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21912/sd_ble_gap_device_name_set-returns-0x3001-sdk-11" /><item><title>RE: sd_ble_gap_device_name_set() returns 0x3001 (sdk 11)</title><link>https://devzone.nordicsemi.com/thread/86040?ContentTypeID=1</link><pubDate>Fri, 12 May 2017 07:02:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b94d181e-8fc5-4a3f-9aed-f4e7bec4c310</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;Yep, I haven&amp;#39;t changed any of the SDK files. The problem might be caused because I did not initialize logger with NRF_LOG_INIT(). In the another case with sdk12, that caused soft device enabling to block executing. See the thread &lt;a href="https://devzone.nordicsemi.com/question/135341/softdevice_enable-does-not-return-on-nrf52-sdk1200/?comment=135473#comment-135473"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_device_name_set() returns 0x3001 (sdk 11)</title><link>https://devzone.nordicsemi.com/thread/86041?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 15:49:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fd227a2-b22e-4206-82b4-1b85dfbd3994</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Unless he has changed the softdevice_handler files in the SDK, &lt;code&gt;softdevice_enable()&lt;/code&gt; calls &lt;code&gt;sd_ble_enable()&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_device_name_set() returns 0x3001 (sdk 11)</title><link>https://devzone.nordicsemi.com/thread/86039?ContentTypeID=1</link><pubDate>Wed, 10 May 2017 21:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fe05c15-5b01-4aec-b6dc-98336167290d</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;and where in that code do you call sd_ble_enable(), which is what the error message you&amp;#39;re getting says you haven&amp;#39;t called.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define BLE_ERROR_NOT_ENABLED            (NRF_ERROR_STK_BASE_NUM+0x001) 
/**&amp;lt; @ref sd_ble_enable has not been called. */
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_device_name_set() returns 0x3001 (sdk 11)</title><link>https://devzone.nordicsemi.com/thread/86035?ContentTypeID=1</link><pubDate>Wed, 10 May 2017 14:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d570d481-edf2-4201-b06c-232e1156e30f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Are you sure you get the error code 0x3001? If the softdevice is not enabled, you should get &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/group__nrf__error.html#ga9a2af1a322a5dfb3bdb69e2aacd3bc27"&gt;&lt;code&gt;NRF_ERROR_SOFTDEVICE_NOT_ENABLED&lt;/code&gt;&lt;/a&gt; (NRF_ERROR_BASE_NUM + 2 = 0x02)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_device_name_set() returns 0x3001 (sdk 11)</title><link>https://devzone.nordicsemi.com/thread/86038?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 10:34:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd490bfc-0c80-4cd1-b843-009b7cd45b07</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;What softdevice should I use? I am trying with nRF5_SDK_11.0.0/components/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_device_name_set() returns 0x3001 (sdk 11)</title><link>https://devzone.nordicsemi.com/thread/86037?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 10:21:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1b0226e-64f9-499f-810c-90188642a17c</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;I am calling this function before that:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void ble_stack_init(void)
{
    uint32_t err_code;
    
    nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
    
    // Initialize the SoftDevice handler module.	
    SOFTDEVICE_HANDLER_INIT(&amp;amp;clock_lf_cfg, NULL);

    ble_enable_params_t ble_enable_params;
    err_code = softdevice_enable_get_default_config(CENTRAL_LINK_COUNT,
                                                    PERIPHERAL_LINK_COUNT,
                                                    &amp;amp;ble_enable_params);
    APP_ERROR_CHECK(err_code);

#ifdef BLE_DFU_APP_SUPPORT
    ble_enable_params.gatts_enable_params.service_changed = 1;
#endif // BLE_DFU_APP_SUPPORT
    //Check the ram settings against the used number of links
    CHECK_RAM_START_ADDR(CENTRAL_LINK_COUNT,PERIPHERAL_LINK_COUNT);

    // Enable BLE stack.
    err_code = softdevice_enable(&amp;amp;ble_enable_params);
    APP_ERROR_CHECK(err_code);

    // Register with the SoftDevice handler module for BLE events.
    err_code = softdevice_ble_evt_handler_set(dispatchEvent);
    APP_ERROR_CHECK(err_code);

    // Register with the SoftDevice handler module for BLE events.
    err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
    APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, it should be enabled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_device_name_set() returns 0x3001 (sdk 11)</title><link>https://devzone.nordicsemi.com/thread/86036?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 09:37:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93d6ad35-01a7-4b4f-ac4c-83ebcd6eb4c3</guid><dc:creator>RK</dc:creator><description>&lt;pre&gt;&lt;code&gt;#define BLE_ERROR_NOT_ENABLED            (NRF_ERROR_STK_BASE_NUM+0x001) /**&amp;lt; @ref sd_ble_enable has not been called. */

#define NRF_ERROR_STK_BASE_NUM  (0x3000)    ///&amp;lt; STK error base
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;that says you haven&amp;#39;t enabled ble.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>