cancel
Showing results for 
Search instead for 
Did you mean: 

BLE multi-role functionality, run device as central and peripheral.

BNuke.1
Associate

Hi, I am new to stm32wb and I am using the stm32wb15. I want to implement the multi-role functionality on my device, that is, I want it to act as a central and also as a peripheral. However, I don't know how to do this. Are there any examples? Any advice will be much appreciated.

3 REPLIES 3
Remi QUINTIN
ST Employee

Please have a look at the BLE_p2pRouter project in the WB FW package.

The device is able to connect to up to 6 peripherals and 2 central devices (Cell phones).

BNuke.1
Associate

Hi @Remi QUINTIN​, thank you for your response. I have looked at the BLE_p2pRouter project however this is only for stm32wb55 I thought there would be an example for stmwb15. Nevertheless, I tried creating my own p2p_router project following the logic in the above mentioned project but I get an error. This is the same error I get when I try to create my own server project instead of using the p2pSever example. The program fails to start the BLE stack on CPU2 and calls the Error_handler() and ends up stuck in a while loop. Your assistance will be highly appreciated.

 /**

  * Starts the BLE Stack on CPU2 -- in app_ble.c

  */

 if (SHCI_C2_BLE_Init( &ble_init_cmd_packet ) != SHCI_Success)

 {

  Error_Handler();

 }

Remi QUINTIN
ST Employee

STM32WB15 is only having 320 KB (1M for WB55) of Flash memory and 48KB (96KB for WB55) of internal SRAM.

error return from the call to SHCI_C2_BLE_Init( &ble_init_cmd_packet ) function may result from this reduced memory configuration if parameters values were not changed.

You will have to step into the code to detect where the failure happens. Nothing obvious for us at that point.