Skip to content

Conversation

@pan-
Copy link
Member

@pan- pan- commented Oct 13, 2020

Summary of changes

This PR adds a workaround to a bug in the WB55 event controller. When a connection event is received, the RPA and peer address field are inverted if the peer connects with a resolvable private address.
It also force controller privacy to be used.

Impact of changes

None

Migration actions required

None

Documentation

Internal change, no documentation update required.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[x] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@paul-szczepanek-arm


pan- added 2 commits October 13, 2020 16:16
The connection event reported by the WB55 is incorrect if controller privacy is not enable and the peer connects with an unknown private resolvable address: The RPA field contains the connection address (it should be empty) and the peer address is all FF while it should be equal to the connection address.
const bdAddr_t *peer_rpa = &conn_evt->peerRpa;
const bdAddr_t *peer_address = &conn_evt->peerAddr;

#if defined(TARGET_MCU_STM32WB55xx)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a bug in the WB55 event controller, you should correct it instead of adding some dirty workaround in this cordio file ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @jeromecoutant . The bug is inside the BLE firmware which as far as I know is only proposed as binary. The workaround is not in the cordio sources but on top of it, in Mbed OS interfaces with the Cordio stack. The workaround does not affect devices producing correct enhanced connection events. It doesn't require modification if it is fixed in a new firmware by ST.

I truly believe it is the best place to put the workaround today as users doesn't always update to the latest version of the firmware.Even if ST was releasing a new firmware today, I'd keep the workaround in place to avoid issues with old firmwares.

@ciarmcom
Copy link
Member

@pan-, thank you for your changes.
@paul-szczepanek-arm @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested review from a team and paul-szczepanek-arm October 13, 2020 15:30
@pan- pan- merged commit 665e453 into ARMmbed:feature-ble-host-privacy Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants