<?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>s130 Cental peripheral error 3002 : NRF_ERROR_SOFTDEVICE_NOT_ENABLED</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14318/s130-cental-peripheral-error-3002-nrf_error_softdevice_not_enabled</link><description>Hi
I&amp;#39;m trying to send adc value from peripheral to central. I&amp;#39;m using nrf51822 with softdevice s130_1.0.0 and SDK v10.0.0 . 
 I&amp;#39;m getting error 3002 which I figured out, it is STK+NRF_ERROR_SOFTDEVICE_NOT_ENABLED. I also call softdevice_handler_isEnabled</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Jun 2016 08:19:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14318/s130-cental-peripheral-error-3002-nrf_error_softdevice_not_enabled" /><item><title>RE: s130 Cental peripheral error 3002 : NRF_ERROR_SOFTDEVICE_NOT_ENABLED</title><link>https://devzone.nordicsemi.com/thread/54651?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2016 08:19:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b43bfd8b-a9cd-4ebd-87d4-3356dc159d5f</guid><dc:creator>Kapil Rawat</dc:creator><description>&lt;p&gt;Thanks Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: s130 Cental peripheral error 3002 : NRF_ERROR_SOFTDEVICE_NOT_ENABLED</title><link>https://devzone.nordicsemi.com/thread/54650?ContentTypeID=1</link><pubDate>Mon, 06 Jun 2016 14:12:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:337b096e-a8e3-4495-bc64-9821094b632a</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Error 0x3002 is BLE_ERROR_INVALID_CONN_HANDLE. It is defined in ble_err.h as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define BLE_ERROR_INVALID_CONN_HANDLE    (NRF_ERROR_STK_BASE_NUM+0x002) /**&amp;lt; Invalid connection handle. */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where NRF_ERROR_STK_BASE_NUM is defined as 0x3000 in nrf_error.h.&lt;/p&gt;
&lt;p&gt;You are probably getting this error because you are calling ble_adc_on_adc_change() and sd_ble_gatts_hvx() without being in a connection. If you look in the SDK examples you will see that we always check for a valid connection before we call sd_ble_gatts_hvx() like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (p_hrs-&amp;gt;conn_handle != BLE_CONN_HANDLE_INVALID)
{
    ....
    err_code = sd_ble_gatts_hvx()
    ....
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: s130 Cental peripheral error 3002 : NRF_ERROR_SOFTDEVICE_NOT_ENABLED</title><link>https://devzone.nordicsemi.com/thread/54649?ContentTypeID=1</link><pubDate>Mon, 06 Jun 2016 13:33:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa7ac9e6-c953-4477-90b8-e7eeff08469d</guid><dc:creator>Kapil Rawat</dc:creator><description>&lt;p&gt;Yes that why I wrote NRF_ERROR_SOFTDEVICE_NOT_ENABLED&lt;/p&gt;
&lt;p&gt;here is the nrf_error.h file code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define NRF_ERROR_BASE_NUM      (0x0)       ///&amp;lt; Global error base
#define NRF_ERROR_SDM_BASE_NUM  (0x1000)    ///&amp;lt; SDM error base
#define NRF_ERROR_SOC_BASE_NUM  (0x2000)    ///&amp;lt; SoC error base
#define NRF_ERROR_STK_BASE_NUM  (0x3000)    ///&amp;lt; STK error base
/** @} */

#define NRF_SUCCESS                           (NRF_ERROR_BASE_NUM + 0)  ///&amp;lt; Successful command
#define NRF_ERROR_SVC_HANDLER_MISSING         (NRF_ERROR_BASE_NUM + 1)  ///&amp;lt; SVC handler is missing
#define NRF_ERROR_SOFTDEVICE_NOT_ENABLED      (NRF_ERROR_BASE_NUM + 2)  ///&amp;lt; SoftDevice has not been enabled
#define NRF_ERROR_INTERNAL                    (NRF_ERROR_BASE_NUM + 3)  ///&amp;lt; Internal Error
#define NRF_ERROR_NO_MEM                      (NRF_ERROR_BASE_NUM + 4)  ///&amp;lt; No Memory for operation
#define NRF_ERROR_NOT_FOUND                   (NRF_ERROR_BASE_NUM + 5)  ///&amp;lt; Not found
#define NRF_ERROR_NOT_SUPPORTED               (NRF_ERROR_BASE_NUM + 6)  ///&amp;lt; Not supported
#define NRF_ERROR_INVALID_PARAM               (NRF_ERROR_BASE_NUM + 7)  ///&amp;lt; Invalid Parameter
#define NRF_ERROR_INVALID_STATE               (NRF_ERROR_BASE_NUM + 8)  ///&amp;lt; Invalid state, operation disallowed in this state
#define NRF_ERROR_INVALID_LENGTH              (NRF_ERROR_BASE_NUM + 9)  ///&amp;lt; Invalid Length
#define NRF_ERROR_INVALID_FLAGS               (NRF_ERROR_BASE_NUM + 10) ///&amp;lt; Invalid Flags
#define NRF_ERROR_INVALID_DATA                (NRF_ERROR_BASE_NUM + 11) ///&amp;lt; Invalid Data
#define NRF_ERROR_DATA_SIZE                   (NRF_ERROR_BASE_NUM + 12) ///&amp;lt; Data size exceeds limit
#define NRF_ERROR_TIMEOUT                     (NRF_ERROR_BASE_NUM + 13) ///&amp;lt; Operation timed out
#define NRF_ERROR_NULL                        (NRF_ERROR_BASE_NUM + 14) ///&amp;lt; Null Pointer
#define NRF_ERROR_FORBIDDEN                   (NRF_ERROR_BASE_NUM + 15) ///&amp;lt; Forbidden Operation
#define NRF_ERROR_INVALID_ADDR                (NRF_ERROR_BASE_NUM + 16) ///&amp;lt; Bad Memory Address
#define NRF_ERROR_BUSY                        (NRF_ERROR_BASE_NUM + 17) ///&amp;lt; Busy
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: s130 Cental peripheral error 3002 : NRF_ERROR_SOFTDEVICE_NOT_ENABLED</title><link>https://devzone.nordicsemi.com/thread/54648?ContentTypeID=1</link><pubDate>Mon, 06 Jun 2016 10:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cd16d80-d717-4c47-8e5c-a3317968adf9</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;No it&amp;#39;s not &lt;code&gt;STK+NRF_ERROR_SOFTDEVICE_NOT_ENABLED&lt;/code&gt;. If you look at the documentation for the function it tells you the return codes it can return and their derivation, and you can click on them to break them down more.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define BLE_ERROR_INVALID_CONN_HANDLE   (NRF_ERROR_STK_BASE_NUM+0x002)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;that&amp;#39;s 0x3002&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>