Question
Connect to beacon from STM32WB
Hello guys,
I want connect to a bluetooth device/beacon from STM32WB.
I've used this function to setup the connection with the device found when scanning but it won't connect to it it always print out "[BLE] Successfully Connected to Slave" and then directly"[BLE] Connection To Slave Failed"
static void vConnectionRequest(eAppBleConnectionStatus __e_NewStatus)
{ tBleStatus result;
vCNSLCTRL_SendDataToOuput(true,"[BLE] Successfully Connected to Slave\r\n");
if (_t_BleApplicationContext.e_DeviceConnectionStatus != APP_BLE_CONNECTED_CLIENT)
{
result = aci_gap_create_connection(0x4000, 0x4000, PUBLIC_ADDR, _au8_ScannedMacAddress, PUBLIC_ADDR, 40, 40, 0, 60, 2000 , 2000);
if (result == BLE_STATUS_SUCCESS)
{
_t_BleApplicationContext.e_DeviceConnectionStatus = APP_BLE_LP_CONNECTING;
}
else
{
vCNSLCTRL_SendDataToOuput(true,"[BLE] Connection To Slave Failed \r\n");
}
}Did i do something wrong here?
