cancel
Showing results for 
Search instead for 
Did you mean: 

What do the error codes returned by BlueNRG_Stack_Initialization mean?

Keith Folske
Associate II
Posted on March 03, 2017 at 01:17

I am getting an error when calling the stack initialization function but can not find an explanation of the return code in any of the ST documentation.

The value I see is 0x0c.

Thanks,

Keith

#bluenrg-1 #ble
7 REPLIES 7
Posted on March 03, 2017 at 05:17

BLE_ERROR_INTERNAL_STACK_FAILURE = 12, /**< The platform-specific stack failed */

https://community.st.com/external-link.jspa?url=http%3A%2F%2Fcodb.coocox.org%2Fcomponent%2Fdoc%2Fcoocox-master%2FX_NUCLEO_IDB04A1%2F35fae5b30a33cf64f5169aaffd3075df591a68b5%2Fgroup__ble_%E2%80%A6

#define ERR_COMMAND_DISALLOWED (0x0C)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 03, 2017 at 10:19

Hi,

you may be getting that errorbecause either you are using wrong parameters oryou're trying to configure the stack after you have initialized it.

With regards to the second problem,please take a look at this thread for more information:

https://community.st.com/0D50X00009Xkek8SAB

Hope that helps,

Antonio

Keith Folske
Associate II
Posted on March 03, 2017 at 18:09

I realize that a parameters is probably wrong.  My issue is that I can't find any documentation on how to interpret the return values.  The doxygen documentation doesn't explain what a given value means.  

Posted on March 03, 2017 at 18:11

Clive,  thanks for showing me the definition of my return value.  However, were is the full documentation for this function?  The doxygen documentation that comes with the DK only says this is an error value and doesn't give any detail about the different values that can be returned and what they may mean.

Posted on March 03, 2017 at 18:17

Not something I'm using, just had to dig very hard to find, Google seems to be doing an increasingly crappy job of cataloguing web content...

The documentation is pretty poor.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 06, 2017 at 11:44

Hi Keith,

what commands did you use? In which sequence? If you can share it, maybe I can help.

Keith Folske
Associate II
Posted on March 07, 2017 at 01:32

The only command I had issued was: BlueNRG_Stack_Initialization().  For some strange reason, it is now working but I did not change any of the parameters.  I only rebuilt my code.

However, now aci_gap_init() and RC_DeviceInit() are both failing with 0x4a.

Unfortunately, I still can't find the definition of what these values mean.  This is what a developer really needs in order to understand where they need to focus their debugging efforts.  A huge part of publishing an API, if you are not going to release source code to the library, is to document the return values from the library.....especially if they are error codes.  If you are not going to document the return values, you might as well make the return value a boolean and return false if something is wrong.