-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add support for LE Extended Advertising #334
Conversation
Need to figure out what's the interops between legacy and extended adv. |
80eb4a1
to
9f4c186
Compare
d1d100c
to
ce67ce7
Compare
|
||
# Set the advertising data if present | ||
if advertising_data is not None: | ||
await self.send_command( |
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.
If this command is rejected (invalid parameter, if for example the data is too big, or if there are not enough advertising sets allowed in the controller), this will leak the handle.
The same issue may happen with the following two commands (they could fail, and in that case not only would the handle leak, but also a partial state may be set in the controller)
It would be good to have a way to clean up any intermediate state if any command fails here, before raising an error to the caller.
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.
Nice catch. It also reminds me that we have to remove the advertising set on stop.
Note here: According to Core Spec Vol.4 Part E, Section 3.1.1 - Legacy and extended advertising, Host should not issue Legacy Advertising commands when the Controller supports Extended Advertising, so there is no interops issue. |
Regarding the follow-up refactor, what will be changed exactly? |
No description provided.