2021-10-13 07:40 PM
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.
2021-10-14 12:25 AM
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).
2021-10-14 02:23 AM
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();
}
2021-10-14 05:57 AM
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.