-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE: Fix scan state and host resolution of RPAs #13779
Conversation
@paul-szczepanek-arm, thank you for your changes. |
78b3b8a
to
b29b886
Compare
Tested with ble testsuite. |
b29b886
to
934e111
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @paul-szczepanek-arm LGTM.
); | ||
#if BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION | ||
if (_connect_to_host_resolved_address_state == ConnectionToHostResolvedAddressState::scan) { | ||
ret = startScan(scan_duration_t::forever(), duplicates_filter_t::ENABLE, scan_period_t(0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you want to have host based resolution on a target that supports extended advertising ?
Could you report a warning to the user with MBED_WARNING
? If extended advertising is supported, in practice controller resolution is supported and the configuration probably needs to be amended.
The warning can be conditional of the resolution in controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be made in another PR when we advice users of the best configuration for their controller depending on the features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I will make such a PR
if (!_central_privacy_configuration.use_non_resolvable_random_address == connectable) { | ||
/* if we're scanning we need to stop */ | ||
if (_scan_state == ScanState::scan) { | ||
/* but we can only stop if we're scanning forever */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments, that makes it clear.
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
The scanning status of the device did not distinguish between all the states. I have removed the bools the combination of which was interpreted to divine the status and replaced it with an enum. The remaining bool is a toggle that shows the intention of whether we want scan active or not. The rest is handled by each event by looking at it and the current state.
Related to there was a mistake in the scan behaviour missing early termination in host resolution which was also was missing in one of the code paths. This PR includes a fix for that.
Impact of changes
Migration actions required
Documentation
none
Pull request type
Test results
Reviewers
pan-