cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure STM32WB0 for HCI Controller Only mode

mringwal
Associate

Hi there.

I'm trying to use the STM32WB0 (NUCLEO-WB09KE) in HCI Controller mode with our Bluetooth Stack: https://github.com/bluekitchen/btstack/

I found the BLE_Transparent application in the STM32WB0 Firmware package which provides HCI over the virtual Serial Port of the ST-Link.

This works until a connection is established. Then, the ST BLE Stack initiates an ATT MTU Request and informs us via a custom HCI Extended Event.

How can I disable the included BLE stack in the BLE_Transparent example and use the STM32WB0 with an external Host Stack?

Thanks, 
 Matthias Ringwald, BlueKitchen GmbH

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mringwal
Associate

Thanks for your replies. I've already used the link to the ST Customer Support Portal for an issue with the STM32WBA55 LE Audio dev kit.

For this issue, I've managed to compile the example into a Controller-only mode by:

  • adding  `#define BLESTACK_CONTROLLER_ONLY 1` to the file `ble_conf.h`
  • replacing `:stm32wb0x_ble_stack.a` with `:stm32wb0x_ble_stack_controller_only.a` in the Linker settings. (Properties->C/C++ Build->Settings->Tool Settings->MCU GCC Linker->Libraries in STM32CubeIDE)

The code size is reduced to roughly half of the full stack build, which is quite reasonable and the STM32WB09 works as expected in a few quick tests.

Following up: Is there a way to suggest improvements to the example documentation, e.g. adding these steps and explaining that the UART is configured to 921600 without Hardware Flowcontrol and where to change that (for people not experienced with STM32 projects)?

View solution in original post

6 REPLIES 6
STTwo-32
ST Employee

Hello @mringwal and welcome to the ST Community 

To build the code without the included BLE stack and based on your own one you have to exclude the curent stack, integrate your own stack, update application code and then compile your code. 

For more assistant on your migration please contact one of our FAEs.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

mringwal
Associate

HI STTWo-32. Thanks for your reply.

The BLE_Transparent demo by ST is pretty much what I need, it just also include's ST's BLE Stack. As far as I can tell the Bluetooth Controller Firmware as well as the Host stack are provided by a binary library, I think it is this one:  `stm32wb0x_ble_stack.a`. I cannot modify this library as I don't have the source files for that. However, there's also a library with an addition '_controller_only". Do I need to link against that one?

Then, there's a suspicious define in the app source code called `BLESTACK_CONTROLLER_ONLY`.  Does this need to be set for HCI Controller only use? If yes, how?

How can I contact one of your FAEs? 

Best regards.

 Matthias

Hello @mringwal ,


@mringwal wrote:

How can I contact one of your FAEs? 


You can submit your case over this link: https://ols.st.com/

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

To understand more about that you should check on the AN5277. I think you are not able to add your personal stack to the STM32WB0.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

mringwal
Associate

Thanks for your replies. I've already used the link to the ST Customer Support Portal for an issue with the STM32WBA55 LE Audio dev kit.

For this issue, I've managed to compile the example into a Controller-only mode by:

  • adding  `#define BLESTACK_CONTROLLER_ONLY 1` to the file `ble_conf.h`
  • replacing `:stm32wb0x_ble_stack.a` with `:stm32wb0x_ble_stack_controller_only.a` in the Linker settings. (Properties->C/C++ Build->Settings->Tool Settings->MCU GCC Linker->Libraries in STM32CubeIDE)

The code size is reduced to roughly half of the full stack build, which is quite reasonable and the STM32WB09 works as expected in a few quick tests.

Following up: Is there a way to suggest improvements to the example documentation, e.g. adding these steps and explaining that the UART is configured to 921600 without Hardware Flowcontrol and where to change that (for people not experienced with STM32 projects)?

mringwal
Associate

I found the GitHub project and submitted an issue re: improving documentation:

https://github.com/STMicroelectronics/STM32CubeWB0/issues/3