Bug in STM32_WPAN of STM32CubeWB Firmware Package V1.12.1
Hello
In function "SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification( void *pckt )" of generated file "app_ble.c":
In "switch/case HCI_DISCONNECTION_COMPLETE_EVT_CODE:", the variable "BleApplicationContext.BleApplicationContext_legacy.connectionHandle" is cleared ( "=0") before used to call "Custom_APP_Notification(&handleNotification);".
You should initialize
handleNotification.ConnectionHandle = disconnection_complete_event->Connection_Handle;
instead of
handleNotification.ConnectionHandle = BleApplicationContext.BleApplicationContext_legacy.connectionHandle;
If not, the customer application will never know which connection has finished and cannot associate disconnection events to connection events...
Best regards
Paul
