Skip to main content
PADAM.1
Associate III
Sep 12, 2021 4:03 PM UTC
Question

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

This topic has been closed for replies.

4 replies

Buster
Associate
Sep 14, 2021 2:51 PM UTC

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?

Buster
Associate
Sep 14, 2021 2:57 PM UTC

Scratch that. I just installed 1.2.0. I better go get some coffee...

PADAM.1
PADAM.1Author
Associate III
Sep 17, 2021 6:25 PM UTC

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

Buster
Associate
Sep 17, 2021 7:20 PM UTC

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!