-
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 direct advertising on Cordio #13060
BLE: fix direct advertising on Cordio #13060
Conversation
@paul-szczepanek-arm, thank you for your changes. |
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.
Would it be worth describing what is this fixing (adding) in the commit message? I don't see the needed context for example.
if (enable) { | ||
uint16_t *durations_ms = new uint16_t[number_of_sets]; | ||
advertising_handle_t handles[DM_NUM_ADV_SETS];; |
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.
Could you remove the extra ;
?
@paul-szczepanek-arm, thank you for your changes. |
fd77f4f
to
ddcf73b
Compare
To start direct connectable advertising on the cordio stack, the programmer should call the function DmConnAccept instead of the function DmAdvStart . This functions expect the target address and address type as parameter, which are passed to the controller when the programmer sets the advertising parameters and not known when advertising_enable is called. Therefore, this information should be kept in memory when advertising parameters are set and retrieved when advertising is enable to choose the right call to start (or stop) advertising. Timeout of direct advertising is also handled in an uncommon way, a connection timeout is received. Similarly, DmConnClose should be called to stop connectable direct advertising. The state is kept in an array of direct_adv_cb_t. Each items contains a peer address, the peer address type, the connection handle and the advertising handle as well as a state which indicate if the advertising is running, pending or not used. When advertising parameters are set, the state is updated to match the target address or disable direct advertising management for the advertising set being configured. When advertising is enabled, the pal dispatch the operation to the right calls (DmAdvStart/DmConnAccept or DmAdvStop/DmConnClose). When an advertising timeout happen or a connection is made, the pal cleans any direct advertising state of this advertising set
ddcf73b
to
dd615f7
Compare
CI started |
Also restarted Travis to report the status |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
All green but the incorrect status reported from mergify makes it red. I'll merge as it can't be overwritten. |
Summary of changes
Fix support for direct advertising on Cordio.
Impact of changes
Migration actions required
Documentation
none
Pull request type
Test results
Reviewers
@pan-