Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1689569pxj; Fri, 18 Jun 2021 12:44:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiN1HqGKyIEYeiSSKTaJUlVXkC6EgWmTyBAfuTA75Yr2fID+7vbG7iIFDtQcWCH+e2MoCm X-Received: by 2002:a17:907:1c20:: with SMTP id nc32mr12451713ejc.21.1624045473914; Fri, 18 Jun 2021 12:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624045473; cv=none; d=google.com; s=arc-20160816; b=vTzOoiauXmzhATucWwbQGl/El7zfYkHl1mLrxA1f5zLWp0T/+Xb/RmqU39XsvLBuGI g/cN8oMsXEOmSlnz/tRBYVc6nJCYhe8aloJawVq1RYzldi61IMO1SmnyUKVEWAmTrLrV Pt2/rXwCur54pfgzrfbyBe/oZJ22OXiJFSK6Dd/+qKOm8WDYWHaaF+MyKlZaE/EG5+vC 4A5uea3ni42aqTk/4ChGyTIMStFMj1NFeB+tlKUykDsZCfenqDMYFnd19zweQq36D5oM DxqSFd2jE3hmUdLN7qx/ZmAjlRPYSOTqbYeK2NnEmROXyzJeK6+jGTkFllNxhAJn8fho nlqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cEIKKRhdoFvI/es7R9MCzlBB8oI4L698p4c9wTlFK+o=; b=MmpiPKtqYVTyNvMyvEuTPhWznI4d+LagW9JFOwYY64CC3J0oifd4R6vj2+UjhxVqFF q8/LDoag5u4pQA9egCVwe39+3gHuhEJCQdNEICFL8B4YonIkTLkBk0XGhmlKEc8j7vPI lyLG8VuAHozebX9+dU2kwegMp6AoGLhqKWbcWvEYJB5x8JNgvOj0nKaVangy3d91FO7b ADPYh7Jzv4am3WcW3cBEJyDw4JemToL7FWGnQg3kctRZeimHac5fXDL+/9vhwF9GWiNh sTMiUTJX0T3pe0o9//i86qqi8ObDpXznaH2ZADW9lvEejm3Va2Pp/GdN76qHhX6gESLv ahdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e0AGSRLi; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de14si3183641ejc.521.2021.06.18.12.44.09; Fri, 18 Jun 2021 12:44:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e0AGSRLi; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbhFRSmz (ORCPT + 99 others); Fri, 18 Jun 2021 14:42:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231756AbhFRSmy (ORCPT ); Fri, 18 Jun 2021 14:42:54 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46603C061574 for ; Fri, 18 Jun 2021 11:40:44 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id g4so12006365qkl.1 for ; Fri, 18 Jun 2021 11:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cEIKKRhdoFvI/es7R9MCzlBB8oI4L698p4c9wTlFK+o=; b=e0AGSRLinX/lXmgdS5DPfC4BlXuP54VOIJkaGs7ejKtGLIaPM6D6cmUnowflF4Tcia 9duYkpVcZ1J97ncOJ0+tTDFD4QZmnB3ecQSLlnZyN1rdzfM3iJbuZvwOg1We96QUJTFF Nbgk/UNllpbQ9GdFc2pIoVySzNGS83KzDFZoxiDFhb8sCuOgPqLuviHSqti/qSxctd2x OYzzwE5wlfJ24YyiqYJ4mlyXFZzasmRuAdW4XFEf0R+eEIx7aksi5OyX9HuqB6NPImnT mIUPNdwdK4DotGPGnFZW3kuyn/CboI8pDvEA6j6ujnWhJrXBy/WfEIbtHJPk6V8A7oOY Klyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cEIKKRhdoFvI/es7R9MCzlBB8oI4L698p4c9wTlFK+o=; b=sY3S9FyuBAB1nlxyE+f9ZJ4/lK25r75hWRcF7U87q2q3+F4tY2+gwom9KlpjUfh0WM qkHgnjKtVShdtDuw8tRIyaaQAMJDWKifjEF2m1mty2b9Wa/U6bB2NohkuHDF12PzM3nC HqKumrLZE5xkwtf91EAiNhpzHBBH2C708M1B5/0h8NES12U0OyabeOqzj1QONUzhYylt wuADpO5mbgZazWfs8wMt8kH16SfYCOdY98nlmubYunbgEhRcMCBYuekyC2wrMBDdSngT B/FCxwkdvtNPX7lGLVgMPiTfRNLEicbwdMsMSPpgZAnVPTlhMfVUdqBS9oK/21a5XE6v HECA== X-Gm-Message-State: AOAM533I+NkOVbb9UR6C+YJzyzJYQMG48xNQAIJVNL15O49tdpt6vVga pj8twia8ShpeMOv7M3cOvO6TIk5Dr0QYlNKLDn8= X-Received: by 2002:a05:6902:102d:: with SMTP id x13mr16641143ybt.408.1624041643452; Fri, 18 Jun 2021 11:40:43 -0700 (PDT) MIME-Version: 1.0 References: <20210618001559.1284204-1-mcchou@chromium.org> In-Reply-To: <20210618001559.1284204-1-mcchou@chromium.org> From: Luiz Augusto von Dentz Date: Fri, 18 Jun 2021 11:40:32 -0700 Message-ID: Subject: Re: [BlueZ PATCH v1 0/3] Detailed error code To: Miao-chen Chou Cc: Bluetooth Kernel Mailing List , Marcel Holtmann , Alain Michaud , Luiz Augusto von Dentz , Howard Chung Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Miao, On Thu, Jun 17, 2021 at 8:08 PM Miao-chen Chou 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 > -- Luiz Augusto von Dentz