* [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e
@ 2021-04-29 18:15 Yu Liu
2021-04-29 18:48 ` [Bluez,v1] " bluez.test.bot
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Yu Liu @ 2021-04-29 18:15 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz, chromeos-bluetooth-upstreaming
Cc: Yu Liu, Abhishek Pandit-Subedi
We want to retry the pairing when HCI status 0x3e (Connection failed to
established/Synchronization timeout) is returned from the controller.
This is to add a new MGMT error code so that we can catch this 0x3e
failure and issue a retry in the user space.
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
---
Changes in v1:
- Initial change
doc/mgmt-api.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 5355fedb0..f7cbf7ab2 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -200,6 +200,7 @@ and Command Complete events:
0x12 RFKilled
0x13 Already Paired
0x14 Permission Denied
+0x15 Connection Not Established
As a general rule all commands generate the events as specified below,
however invalid lengths or unknown commands will always generate a
@@ -1112,6 +1113,7 @@ Pair Device Command
Not Powered
Invalid Index
Already Paired
+ Connection Not Established
Cancel Pair Device Command
--
2.31.1.527.g47e6f16901-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [Bluez,v1] doc/mgmt-api - Add a new error code for HCI status 0x3e
2021-04-29 18:15 [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e Yu Liu
@ 2021-04-29 18:48 ` bluez.test.bot
2021-05-05 16:06 ` [Bluez PATCH v1] " Yu Liu
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2021-04-29 18:48 UTC (permalink / raw)
To: linux-bluetooth, yudiliu
[-- Attachment #1: Type: text/plain, Size: 2769 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=475329
---Test result---
Test Summary:
CheckPatch PASS 0.23 seconds
GitLint PASS 0.10 seconds
Prep - Setup ELL PASS 39.85 seconds
Build - Prep PASS 0.09 seconds
Build - Configure PASS 6.93 seconds
Build - Make FAIL 36.64 seconds
Make Check FAIL 0.20 seconds
Make Dist PASS 9.88 seconds
Make Dist - Configure PASS 4.29 seconds
Make Dist - Make PASS 68.58 seconds
Build w/ext ELL - Configure PASS 6.93 seconds
Build w/ext ELL - Make PASS 160.00 seconds
Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint
##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL
##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build
##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree
##############################
Test: Build - Make - FAIL
Desc: Build the BlueZ source tree
Output:
ell/cert.c:38:10: fatal error: tls.h: No such file or directory
38 | #include "tls.h"
| ^~~~~~~
compilation terminated.
make[1]: *** [Makefile:6864: ell/cert.lo] Error 1
make: *** [Makefile:4060: all] Error 2
##############################
Test: Make Check - FAIL
Desc: Run 'make check'
Output:
ell/cert.c:38:10: fatal error: tls.h: No such file or directory
38 | #include "tls.h"
| ^~~~~~~
compilation terminated.
make[1]: *** [Makefile:6864: ell/cert.lo] Error 1
make: *** [Makefile:10315: check] Error 2
##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball
##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball
##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball
##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration
##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e
2021-04-29 18:15 [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e Yu Liu
2021-04-29 18:48 ` [Bluez,v1] " bluez.test.bot
@ 2021-05-05 16:06 ` Yu Liu
2021-05-05 22:15 ` Luiz Augusto von Dentz
2021-05-07 8:18 ` Marcel Holtmann
3 siblings, 0 replies; 6+ messages in thread
From: Yu Liu @ 2021-05-05 16:06 UTC (permalink / raw)
To: linux-bluetooth, Luiz Augusto von Dentz
ping for attention.
On Thu, Apr 29, 2021 at 11:15 AM Yu Liu <yudiliu@google.com> wrote:
>
> We want to retry the pairing when HCI status 0x3e (Connection failed to
> established/Synchronization timeout) is returned from the controller.
> This is to add a new MGMT error code so that we can catch this 0x3e
> failure and issue a retry in the user space.
>
> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
>
> Changes in v1:
> - Initial change
>
> doc/mgmt-api.txt | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> index 5355fedb0..f7cbf7ab2 100644
> --- a/doc/mgmt-api.txt
> +++ b/doc/mgmt-api.txt
> @@ -200,6 +200,7 @@ and Command Complete events:
> 0x12 RFKilled
> 0x13 Already Paired
> 0x14 Permission Denied
> +0x15 Connection Not Established
>
> As a general rule all commands generate the events as specified below,
> however invalid lengths or unknown commands will always generate a
> @@ -1112,6 +1113,7 @@ Pair Device Command
> Not Powered
> Invalid Index
> Already Paired
> + Connection Not Established
>
>
> Cancel Pair Device Command
> --
> 2.31.1.527.g47e6f16901-goog
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e
2021-04-29 18:15 [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e Yu Liu
2021-04-29 18:48 ` [Bluez,v1] " bluez.test.bot
2021-05-05 16:06 ` [Bluez PATCH v1] " Yu Liu
@ 2021-05-05 22:15 ` Luiz Augusto von Dentz
2021-05-07 8:18 ` Marcel Holtmann
3 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2021-05-05 22:15 UTC (permalink / raw)
To: Yu Liu
Cc: linux-bluetooth, ChromeOS Bluetooth Upstreaming, Abhishek Pandit-Subedi
Hi Yu,
On Thu, Apr 29, 2021 at 11:15 AM Yu Liu <yudiliu@google.com> wrote:
>
> We want to retry the pairing when HCI status 0x3e (Connection failed to
> established/Synchronization timeout) is returned from the controller.
> This is to add a new MGMT error code so that we can catch this 0x3e
> failure and issue a retry in the user space.
>
> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
>
> Changes in v1:
> - Initial change
>
> doc/mgmt-api.txt | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> index 5355fedb0..f7cbf7ab2 100644
> --- a/doc/mgmt-api.txt
> +++ b/doc/mgmt-api.txt
> @@ -200,6 +200,7 @@ and Command Complete events:
> 0x12 RFKilled
> 0x13 Already Paired
> 0x14 Permission Denied
> +0x15 Connection Not Established
>
> As a general rule all commands generate the events as specified below,
> however invalid lengths or unknown commands will always generate a
> @@ -1112,6 +1113,7 @@ Pair Device Command
> Not Powered
> Invalid Index
> Already Paired
> + Connection Not Established
>
>
> Cancel Pair Device Command
> --
> 2.31.1.527.g47e6f16901-goog
>
Applied, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e
2021-04-29 18:15 [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e Yu Liu
` (2 preceding siblings ...)
2021-05-05 22:15 ` Luiz Augusto von Dentz
@ 2021-05-07 8:18 ` Marcel Holtmann
2021-05-07 16:43 ` Yu Liu
3 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2021-05-07 8:18 UTC (permalink / raw)
To: Yu Liu
Cc: Bluetooth Kernel Mailing List, Luiz Augusto von Dentz,
chromeos-bluetooth-upstreaming, Abhishek Pandit-Subedi
Hi Yu,
> We want to retry the pairing when HCI status 0x3e (Connection failed to
> established/Synchronization timeout) is returned from the controller.
> This is to add a new MGMT error code so that we can catch this 0x3e
> failure and issue a retry in the user space.
>
> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
>
> Changes in v1:
> - Initial change
>
> doc/mgmt-api.txt | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> index 5355fedb0..f7cbf7ab2 100644
> --- a/doc/mgmt-api.txt
> +++ b/doc/mgmt-api.txt
> @@ -200,6 +200,7 @@ and Command Complete events:
> 0x12 RFKilled
> 0x13 Already Paired
> 0x14 Permission Denied
> +0x15 Connection Not Established
>
> As a general rule all commands generate the events as specified below,
> however invalid lengths or unknown commands will always generate a
> @@ -1112,6 +1113,7 @@ Pair Device Command
> Not Powered
> Invalid Index
> Already Paired
> + Connection Not Established
I really dislike the naming. And even more so, I request the motive here.
So looking at our code, we have 3 cases where we use the previous status:
MGMT_STATUS_CONNECT_FAILED, /* Page Timeout */
MGMT_STATUS_CONNECT_FAILED, /* Connection Establishment Failed */
MGMT_STATUS_CONNECT_FAILED, /* MAC Connection Failed */
And they do map to the 3 available transports, either via BR/EDR or LE or AMP. That means if you call Pair Device you already know well today when it fails to establish the link and can retry it.
My question, what are you trying to fix here.
Regards
Marcel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e
2021-05-07 8:18 ` Marcel Holtmann
@ 2021-05-07 16:43 ` Yu Liu
0 siblings, 0 replies; 6+ messages in thread
From: Yu Liu @ 2021-05-07 16:43 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Bluetooth Kernel Mailing List, Luiz Augusto von Dentz,
ChromeOS Bluetooth Upstreaming, Abhishek Pandit-Subedi
Hi Marcel,
We have a couple of bugs where the controller failed on the Read
Remote Feature command after initial connection with the 0x3E error,
guy.damary@intel made some suggestions after root caused the issues,
you can see his detailed suggestions here:
https://buganizer.corp.google.com/issues/174806913#comment98. To
summarize: he suggests us to retry up to 3 times if 0x3E is
encountered during LE pairing.
Regarding this change: I see MGMT_STATUS_CONNECT_FAILED could be
returned under 4 different scenarios, 3 in the mgmt_status_table table
and 1 in pair_device as a fallback error to cover all the other cases,
so I decided to introduce a new error code to make sure we don't retry
in the cases where we shouldn't. If you think this cae be avoided by
checking other flags at the same time, I can then drop the change from
the kernel and only change the user space.
Thanks
On Fri, May 7, 2021 at 1:19 AM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Yu,
>
> > We want to retry the pairing when HCI status 0x3e (Connection failed to
> > established/Synchronization timeout) is returned from the controller.
> > This is to add a new MGMT error code so that we can catch this 0x3e
> > failure and issue a retry in the user space.
> >
> > Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> > ---
> >
> > Changes in v1:
> > - Initial change
> >
> > doc/mgmt-api.txt | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
> > index 5355fedb0..f7cbf7ab2 100644
> > --- a/doc/mgmt-api.txt
> > +++ b/doc/mgmt-api.txt
> > @@ -200,6 +200,7 @@ and Command Complete events:
> > 0x12 RFKilled
> > 0x13 Already Paired
> > 0x14 Permission Denied
> > +0x15 Connection Not Established
> >
> > As a general rule all commands generate the events as specified below,
> > however invalid lengths or unknown commands will always generate a
> > @@ -1112,6 +1113,7 @@ Pair Device Command
> > Not Powered
> > Invalid Index
> > Already Paired
> > + Connection Not Established
>
> I really dislike the naming. And even more so, I request the motive here.
>
> So looking at our code, we have 3 cases where we use the previous status:
>
> MGMT_STATUS_CONNECT_FAILED, /* Page Timeout */
> MGMT_STATUS_CONNECT_FAILED, /* Connection Establishment Failed */
> MGMT_STATUS_CONNECT_FAILED, /* MAC Connection Failed */
>
> And they do map to the 3 available transports, either via BR/EDR or LE or AMP. That means if you call Pair Device you already know well today when it fails to establish the link and can retry it.
>
> My question, what are you trying to fix here.
>
> Regards
>
> Marcel
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-07 16:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 18:15 [Bluez PATCH v1] doc/mgmt-api - Add a new error code for HCI status 0x3e Yu Liu
2021-04-29 18:48 ` [Bluez,v1] " bluez.test.bot
2021-05-05 16:06 ` [Bluez PATCH v1] " Yu Liu
2021-05-05 22:15 ` Luiz Augusto von Dentz
2021-05-07 8:18 ` Marcel Holtmann
2021-05-07 16:43 ` Yu Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.