-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Bluetooth: controller: Add support for initiator on secondary adv channels #34353
Bluetooth: controller: Add support for initiator on secondary adv channels #34353
Conversation
The only problem I noticed on qualification test cases is that 1st connection event is sometimes sent too early - usually several usecs. Initiator on legacy adv has the same problem so seems like some calculations are a bit off, but I was not able to figure it out yet. |
a7e83a8
to
5350019
Compare
9c27f15
to
829ffef
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.
Good work. Minor regression otherwise looks good to me.
829ffef
to
0f3c1e5
Compare
Bluetooth Test Results 1 files 1 suites 0s ⏱️ Results for commit 0f3c1e57. |
I have discovered during testing that there has always been a bug during connection establishment when it comes to stopping the initiating scan events, continuous scanning could use prepare pipeline and the pipeline is not flushed under this scenario. Now I remember, the previously used The correct fix will be:
Will think more on this. |
4e247e3
to
47e3ed7
Compare
a7e00ed
to
db843fd
Compare
db843fd
to
ca89762
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.
Have tested on target to satisfactory results. LGTM,
@andrzej-kaczmarek please rebase and push to trigger CI, I think the build failure is unrelated. |
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.
LGTM
We can use the same code to create both CONNECT_IND and AUX_CONNECT_REQ since they are basically that same PDUs. Signed-off-by: Andrzej Kaczmarek <[email protected]>
We will need the same checks for AdvA and TargetA/InitA in lll_scan_aux so let's make them public and use address explicitly instead of passed via pdu. Signed-off-by: Andrzej Kaczmarek <[email protected]>
On secondary advertising channel transmitWindowDelay depends on PHY used to create connection so we need to adjust it. Signed-off-by: Andrzej Kaczmarek <[email protected]>
We need to take RX chain delay and PHY used to send CONNECT_IND into account when calculating 1st connection event offset. Signed-off-by: Andrzej Kaczmarek <[email protected]>
When in initiating state we need to handle ADV_EXT_IND as in regular scan sice we always want to scan AUX_ADV_IND in order to be able to connect. Signed-off-by: Andrzej Kaczmarek <[email protected]>
This allows to initiate a connection on secondary advertising channels, i.e. when advertises uses advertising extensions. Signed-off-by: Andrzej Kaczmarek <[email protected]>
Reset the scanning context for the PHY not selected in the Extended Create Connection command. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Fixed incorrect LLL context used to generate done event for auxiliary channel scanning. Other minor comments and fixes. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Rename the use of params word with param. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Reserve an additional node rx buffer when Extended Initiator is supported as the received ADV_EXT_IND PDU is being buffered in the auxiliary channel scanning instance and is only released/flushed in the done event of the initiating auxiliary channel radio event. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
When connection is initiated in one of either 1M or Coded PHY initiating scan instance then the other scanning instance's scheduling and memory allocation needs to be cleaned up. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Ensure that the advertiser address type and address is setup in both 1M and Coded PHY scanning instance when extended create connection is enabled on both the PHYs. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Do not report auxiliary PDUs as advertising reports when in initiator state on auxiliary channels. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
This is the same as for legacy, but with ext adv flag. Signed-off-by: Andrzej Kaczmarek <[email protected]>
'disconnected' callback always unrefs conn object, but this is only valid if connection was created in scanx since app owns reference to that conn object. In case of advx, app does not own any reference so should not unref. Basically we do not really need to hold any reference to conn object in either scanx or advx so just drop reference immediately after conn is created in scanx, no need to worry about it later. Signed-off-by: Andrzej Kaczmarek <[email protected]>
If we want to test conn on legacy and ext adv, we need scanx to handle connection more than once. Change local flag to global and let it indicate whether we want scanx to initaite connection when device is scanned. Signed-off-by: Andrzej Kaczmarek <[email protected]>
advx will do connectable advertising using ext adv, scanx will try to connect. Signed-off-by: Andrzej Kaczmarek <[email protected]>
ca89762
to
b034081
Compare
This adds support to initiate connection on secondary adv channels. Should pass all LL/CON/INI/* test cases.
Fixes #3514