2022-11-19 01:30 AM
2022-11-19 01:35 AM
I want to add details:
As I said in the question, they work well when the central is mobile and the peripheral is stm32wb board. However, when central is another stm32wb board they do not communicate.
When I try the p2p_server & p2p_client examples on different boards I could run and even modify the code without problem, they communicated well.
What might be the problem? In which file, should I make configurations, app_ble.c, custom_app.c ... etc.?
I think problem is here:
case ACI_GAP_PROC_COMPLETE_VSEVT_CODE:
{
aci_gap_proc_complete_event_rp0 *gap_evt_proc_complete = (void*) blecore_evt->data;
/* CHECK GAP GENERAL DISCOVERY PROCEDURE COMPLETED & SUCCEED */
if (gap_evt_proc_complete->Procedure_Code == GAP_GENERAL_DISCOVERY_PROC
&& gap_evt_proc_complete->Status == 0x00)
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, RESET);
APP_DBG_MSG("-- GAP GENERAL DISCOVERY PROCEDURE_COMPLETED\n\r");
/*if a device found, connect to it, device 1 being chosen first if both found*/
if (BleApplicationContext.DeviceServerFound == 0x01 && BleApplicationContext.Device_Connection_Status != APP_BLE_CONNECTED_CLIENT)
{
APP_DBG_MSG("-- Device Found\n\r");
UTIL_SEQ_SetTask(1 << CFG_TASK_CONN_DEV_1_ID, CFG_SCH_PRIO_0);
}
else {
APP_DBG_MSG("-- Device not Found\n\r");
}
}
} break;
This is the Debug LOG:Finally, I want to add a block diagram of the example, you can refer to the blocks for convenience.
2022-11-21 01:11 AM
Hello,
Did you try with the latest STM32CubeWB package (v1.14.1) with reference binaries for BLE_p2pServer and BLE_p2pClient? Ensure that BLE_p2pServer is in advertising mode before start scanning phase.
Best Regards
2022-11-24 10:03 PM
Yes, I did and this is not actually the case, let me simplify: While My custom server on STM32 and the client on a mobile phone are connecting, my custom server and client on STM32WB do not connect.
2022-11-30 12:45 AM
Hello,
Did you change the advertising packet?
Best Regards
2022-12-01 03:26 AM
hi, I am sorry, I could not understand what should I do. What do you mean by changing advertising packet?