Skip to main content
Keith Folske
Associate II
March 3, 2017
Question

What do the error codes returned by BlueNRG_Stack_Initialization mean?

  • March 3, 2017
  • 3 replies
  • 1326 views
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
This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
March 3, 2017
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 VenmoUp vote any posts that you find helpful, it shows what's working..
Antonio Vilei
ST Employee
March 3, 2017
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
March 3, 2017
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.  

Antonio Vilei
ST Employee
March 6, 2017
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
March 7, 2017
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.