Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1012037pxj; Thu, 17 Jun 2021 20:08:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzc1Nk0cSzZ24OuQfVGDzkYyfacoKaLo6soRgF76AmPxHz9pGbfavktQ7osNPhd7bMUR5Am X-Received: by 2002:a17:907:7b9e:: with SMTP id ne30mr8683036ejc.389.1623985701144; Thu, 17 Jun 2021 20:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623985701; cv=none; d=google.com; s=arc-20160816; b=mY2jj/kliVh7FsGqoovdsceWgrYvOW5tgJiwAA5M5Sq/z9XrKkuuZRAmqWg79lQ8Oh LGwcTbARV6L5WWB/eqCoRgrPKtOXiD+rVGP02MNCXkZy5+zB7CxDG8e4epC0yp7XmjaH P20xhwSTbsWX1vuj6kdSjK+f6tVLam3BbubuJ/vjPSb0QWrLCDNT3oaO+UqZMuJOcqgs BqIrId8YCQU86u2OWE2acIKnde5hxGaZrVkvthxnDXyQCuWiWLttBPc355wDgYcT5Yha dr5Jlm2JcFKWTFw1WVTplGUuK+hxTZTd5vQqWOR+obVtdPmqpoqRFiZOA1al2U4D89af OpPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7Aa4KUJmDkE8M9Wn8OQjAAa5iU1uLtL0Mu1wLeH3puU=; b=PaA3TFc2isuC9GeDgVuEdP/A3K5aF0DpQd8ILD2wqH+NdPUHf6jL3q2ttzm3ROOcBu m6EqJLNdGZ6MW3HZt0VSIVjeFq/tdQ9QHsBy878cVHZI2YRf5vUXDjMNnuIUJaIVug88 cEViXScpQNunREINBR9C/bGPTi8dpgeMAynz7Exmpt7qZBCJBR+SB1HiGNaYDkzZZH8/ EPsc+/KnGP6Zeu/JyqxN/o8FRD7l+vk95rSCoTEZL6Y9fDEMDjCZh/qbaRsKUm+ivjN1 I1AvY3WyJ5y0TRbLGKOS8JMxzFAosqxqh9c0lebeVMEKo3zksCkXulIATXM/JvJEcZM3 D5XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DHiDm6xl; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zh8si1232718ejb.317.2021.06.17.20.07.41; Thu, 17 Jun 2021 20:08:21 -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=@chromium.org header.s=google header.b=DHiDm6xl; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233160AbhFRASh (ORCPT + 99 others); Thu, 17 Jun 2021 20:18:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231927AbhFRASh (ORCPT ); Thu, 17 Jun 2021 20:18:37 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D268C061574 for ; Thu, 17 Jun 2021 17:16:28 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id x10so3792310plg.3 for ; Thu, 17 Jun 2021 17:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7Aa4KUJmDkE8M9Wn8OQjAAa5iU1uLtL0Mu1wLeH3puU=; b=DHiDm6xlh4cxQDv8TRkyB5P8OQI34CKGdv92JzVjy0CMFZslh5P70syjDppQGJj3Kf 4rOp+lip/kfFTllQVyHZDBAPwLJEZAa4XhVyDKBDtsOq7xVzPgSGTKcIau4K5YdG3q/x zfKy7kw8bW2XTNXThO1SeWfEUNeXs5BNoVoEE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7Aa4KUJmDkE8M9Wn8OQjAAa5iU1uLtL0Mu1wLeH3puU=; b=Lr7TQ/v+kUe8u/o6zmEkbufqSPvPvR++aMzZ7uZeBEkWldU05M2KmHCOxfetc1QTT5 3d7nvncbqzqme1FKRRQ9665oRlspp5zL+2MmcjdQZmwNa/59wu6Jbj9z2CV4CEYNofbQ PKukKTf8eDgfl2htO8tUk5rVrrdHBdrFoyqJz2wb2pmEn7TnaRwHbpxjqzNG9Ygv+/T4 3JLAK7vehHZgalOkQOzwbCXaK+NASQAAr1dQKoXcat6REnYPEaqoCf5mIGfSofk4RHKH vfUM/8g3ykzowHa3LW69plKovQeFonSDrYm3MdTx0TRroFQURtmZ0BdHjnSQFeiu22kA XI+w== X-Gm-Message-State: AOAM532IPAguMyOasLnOQmdhAcVMnm8ZMCtUsKcI+zWMyPQLsy2yroQz vy4ZJiARhs1HFkgOy+SYSQSpMMASztfUDw== X-Received: by 2002:a17:90a:558c:: with SMTP id c12mr3745225pji.166.1623975387292; Thu, 17 Jun 2021 17:16:27 -0700 (PDT) Received: from localhost ([2620:15c:202:201:d75:da94:7930:935d]) by smtp.gmail.com with UTF8SMTPSA id w21sm6170016pfq.143.2021.06.17.17.16.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 17:16:26 -0700 (PDT) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Marcel Holtmann , Alain Michaud , Luiz Augusto von Dentz , Howard Chung , Miao-chen Chou Subject: [BlueZ PATCH v1 0/3] Detailed error code Date: Thu, 17 Jun 2021 17:15:56 -0700 Message-Id: <20210618001559.1284204-1-mcchou@chromium.org> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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(-) -- 2.32.0.288.g62a8d224e6-goog