2021-09-12 09:03 AM
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
2021-09-14 07:51 AM
Being new to BLE and having just installed V1.12.1, what's the severity of this bug? Do you have to reboot the application every time you want to make a new connection, since the first isn't properly disconnected?
2021-09-14 07:57 AM
Scratch that. I just installed 1.2.0. I better go get some coffee...
2021-09-17 11:25 AM
Hi Buster
It is application dependent: if the application must free resources allocated to a specific connectionHandle during connect event, it needs the connectionHandle in disconnect event...
Did you install (old) version 1.12.0? I did not find 1.2.0 on st.com...
BR
Paul
2021-09-17 12:20 PM
Paul,
You're right. I'm still on 1.12.0 of the co-processor binary. It's the Firmware Upgrade Service that's at version 1.2.0.
So, would you recommend staying on 1.12.0 of the co-processor binary, or moving to 1.12.1? I guess for this particular bug it shouldn't matter, since the bug is at the application level, right? From what I can tell, since the changes listed in the 1.12.1 release notes are only in the coprocessor firmware, the generated application code is the same in versions 1.12.0 and 1.12.1
But I suppose it's usually better to be on the latest firmware?
Thanks!