-
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
Resolve advertising reports and connection complete #13630
Resolve advertising reports and connection complete #13630
Conversation
@paul-szczepanek-arm, thank you for your changes. |
82d2126
to
2bcc372
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 I left a few comments for improvements.
private: | ||
/** Last in First Out list*/ | ||
template<typename T> | ||
class EventList { |
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.
Side note: we would really benefit from a true list available to all Mbed OS.
event.setLocalResolvablePrivateAddress(_address_registry.get_resolvable_private_address()); | ||
|
||
event.setPeerAddress(*identity_address); | ||
event.setPeerAddressType((peer_address_type_t&)identity_address_type); |
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.
peer_address_type_t
and target_peer_address_type_t
are not exact match.
peer_address_type_t
has values that represents public identity address and random static identity address.
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, replaced with translation
#if BLE_ROLE_PERIPHERAL | ||
if (!identity_address) { | ||
if (_peripheral_privacy_configuration.resolution_strategy == | ||
peripheral_privacy_configuration_t::REJECT_NON_RESOLVED_ADDRESS) { |
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.
According to the documentation we are supposed to disconnect if a bond is not present in the security db.
I'm not certain of what we should do if there's no bond though.
if (pending_event && pending_event->event) { | ||
allocation_successful = _reports_pending_address_resolution.push(pending_event); | ||
} | ||
if (allocation_successful) { |
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.
Please cleanup memory if allocation_successful
is false.
@@ -56,6 +56,7 @@ struct AdvertisingReportEvent { | |||
* @param advertisingData Advertising payload. | |||
*/ | |||
AdvertisingReportEvent( | |||
ble_error_t status, |
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 change the semantic of AdvertisingReportEvent
. I don't think we need to report allocation failures to the user in the AdvertisingReportEvent
as advertising reports are not reliable. The cordio stack will silent drop events if it doesn't have memory capacity, same for the 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.
dropped
Now I can copy events I'll make events part of the entries so that should deal with all the memory comments |
5cf3b08
to
1b9b050
Compare
cab0b0c
to
de531fd
Compare
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
1904139
to
c17c006
Compare
a5a25f4
to
aeb2e34
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, I merge this into the feature branch.
Next stop, next PR.
Summary of changes
Add host resolution of RPAs for advertising and connecting.
Impact of changes
Migration actions required
Documentation
none
Pull request type
Test results
Reviewers
@pan-