HCI_DISCONNECTION_COMPLETE_EVT_CODE always returning reason 0x13
Hi! I have a peripheral that calls
aci_gap_terminate(BleApplicationContext.BleApplicationContext_legacy.connectionHandle, HCI_AUTHENTICATION_FAILURE_ERR_CODE)
aci_gap_terminate(BleApplicationContext.BleApplicationContext_legacy.connectionHandle, HCI_AUTHENTICATION_FAILURE_ERR_CODE)itself it receives the HCI_CONNECTION_TERMINATED_BY_LOCAL_HOST_ERR_CODE reason in disconnect which I guess makes sense.
But the central that it disconnects from will always receive the
HCI_REMOTE_USER_TERMINATED_CONNECTION_ERR_CODE 0x13
case HCI_DISCONNECTION_COMPLETE_EVT_CODE:
{
/* USER CODE BEGIN EVT_DISCONN_COMPLETE */
cc = (hci_disconnection_complete_event_rp0 *) event_pckt->data;
/* USER CODE END EVT_DISCONN_COMPLETE */
handleNotification.Reason = cc->Reason;
APP_DBG_MSG("\r\n\r** DISCONNECTION EVENT WITH SERVER reason: %x status: %x \n\r", cc->Reason, cc->Status);
}Reason will always be 0x13 and status 0x00
The devices are flashed with the latest ble binaries
stm32wb1x_BLE_Stack_full_fw.bin
And are using the libs
STM32Cube_FW_WB_V1.14.0
Best regards Wallentin
