mbox series

[BlueZ,v1,0/3] Detailed error code

Message ID 20210618001559.1284204-1-mcchou@chromium.org (mailing list archive)
Headers show
Series Detailed error code | expand

Message

Miao-chen Chou June 18, 2021, 12:15 a.m. UTC
Hi BlueZ maintainers,

Chromium OS has been working closely with Linux Bluetooth community to
improve BlueZ stack, and there are increasing needs from applications
building their features around Bluetooth. One of the major feedback
from these application is the lack of the detailed failure reasons as
return for D-Bus method call, and these failure reasons can be used in
metrics, optimizing retry mechanism, hinting the reproduce scenario to
improve BlueZ stack. The current org.bluez.Error.* are serving the
generic errors well. However,g given org.bluez.Error.* errors are used
across different interface context which does not serve the detailed
failure reasons well. (See https://github.com/bluez/bluez/issues/131)


Miao-chen Chou (3):
  BR/EDR and LE connection failure reasons
  Include BtdError code in Connect() return
  Print error code for connect methods

 client/main.c |   3 +-
 src/device.c  |  52 +++++++++------
 src/error.c   | 124 ++++++++++++++++++++++++++++++++++++
 src/error.h   | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 331 insertions(+), 19 deletions(-)

Comments

Luiz Augusto von Dentz June 18, 2021, 6:40 p.m. UTC | #1
Hi Miao,

On Thu, Jun 17, 2021 at 8:08 PM Miao-chen Chou <mcchou@chromium.org> wrote:
>
> Hi BlueZ maintainers,
>
> Chromium OS has been working closely with Linux Bluetooth community to
> improve BlueZ stack, and there are increasing needs from applications
> building their features around Bluetooth. One of the major feedback
> from these application is the lack of the detailed failure reasons as
> return for D-Bus method call, and these failure reasons can be used in
> metrics, optimizing retry mechanism, hinting the reproduce scenario to
> improve BlueZ stack. The current org.bluez.Error.* are serving the
> generic errors well. However,g given org.bluez.Error.* errors are used
> across different interface context which does not serve the detailed
> failure reasons well. (See https://github.com/bluez/bluez/issues/131)

I would suggest adding some documentation on the errors e.g.
doc/error-code.txt, so we can document what are the errors and how
they are included on the reply (encoded within the error message as
string using hexadecimal values as in 0x04X, etc.), also we we want to
be crystal clear it would probably be a good idea to inform what
errors codes can appear on each Method like we do for the error
interface.

>
>
> Miao-chen Chou (3):
>   BR/EDR and LE connection failure reasons
>   Include BtdError code in Connect() return
>   Print error code for connect methods
>
>  client/main.c |   3 +-
>  src/device.c  |  52 +++++++++------
>  src/error.c   | 124 ++++++++++++++++++++++++++++++++++++
>  src/error.h   | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 331 insertions(+), 19 deletions(-)
>
> --
> 2.32.0.288.g62a8d224e6-goog
>