Question
Connect to a device BLE STM32WB55
Hello guys,
I want connect to a bluetooth device from STM32WB.
I've used this function inspiered to setup the connection with the device found when scanning but it won't connect to it it always print out Connection To Slave Failed with reason 0x46 which means connection, not allowed, am i missing something here?
for info : the connection works fine when using p2p_client example
static void vConnectionRequest(eAppBleConnectionStatus __e_NewStatus)
{
uint8_t __au8_MacAddressP2PSrv[6U]={0xE5,0xD7,0x25,0xE1,0x80,0x00};
tBleStatus result;
if (_t_BleApplicationContext.e_DeviceConnectionStatus != APP_BLE_CONNECTED_CLIENT)
{
result = aci_gap_create_connection ( 0x320,
0x320,
0x00,
__au8_MacAddressP2PSrv,
0x00,
40U,
80U,
0U,
0x1F4,
16U,
16U );
if (result == BLE_STATUS_SUCCESS)
{
_t_BleApplicationContext.e_DeviceConnectionStatus = APP_BLE_LP_CONNECTING;
vCNSLCTRL_SendDataToOuput(true,"[BLE] Successfully Connected to Slave\r\n");
}
else
{
vCNSLCTRL_SendDataToOuput(true,"[BLE] Connection To Slave Failed , result: %d \r\n", result);
_t_BleApplicationContext.e_DeviceConnectionStatus = APP_BLE_IDLE;
}
}
return;
}
