Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp32686pxv; Wed, 14 Jul 2021 18:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLZEWarbDRDuET/Boqxa6p0MKT/FG6FHGSSUPLTsQPOOT7agJzDlFcXVBWUqXk5NCILDSX X-Received: by 2002:a05:6402:51c9:: with SMTP id r9mr2015581edd.326.1626313077235; Wed, 14 Jul 2021 18:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626313077; cv=none; d=google.com; s=arc-20160816; b=NVaPN3062pjUnjwObHz4qKIKCRKcmP0uaHdLEOeNonYNsSgQ5vYLtEnUxjyYK44uW4 DVG5drE410kio0rLqwB+GX4CZbTwBJiZsR4/8DWE9C5fNuhiSAJh5jqOoGr5liqG+pEX FlRhiWurmgdB/mqO8drNPc9HGl7ky6vCxXLXIvQd5Pn1RErirOHulBzHr3s6qvxh5s89 PIgA7kNe/iOFD853dNg+obn2+ecYypVxL4Ylg41wEWf4ZRJA5YUtkfLvhaMz4AJVY/QK moITh7P9Ws06p2n58aBjpIierCEqkxr+4i74NQtINigRf4kxjPzKEQCmA4KrPInDAnDo 8JYA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IhrSu4wh8n4znVOwGnNvlUkfc0zLP1DS+0LDkx5VFDw=; b=KigQwrhn2GVWmPWguzjMca4bIYKI1RjA0UNFscwPieeZorpjUj4FRHAZSThF9O0Yrh DQT+9HonFNy3MKBiQVbN91V6ZU7hFxY0diUOpXXavVo+3BeMr01/L+gFGf140lu2Wf4x fnXdBybI5vW62yiotdHPaupSNlbJq8aGupWMdygGI3i2WUZZy1pmmuVXVaWYGnF6dLT0 A8UrkC0a+GfKAp/PYqBLRrFAqg640McaQ76v/4ELmFbJEnWtLVfpbmNmD5xBPYspjCEI CR45IdP+pDt69yLj0fFTlmECA59ScHbCuYj6O85xjf9eX+EK22q0RLSyHXQEH9tlvbv7 c//g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=J8BLPkR0; 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 w15si4514633edv.312.2021.07.14.18.37.16; Wed, 14 Jul 2021 18:37:57 -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=J8BLPkR0; 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 S229909AbhGOBPB (ORCPT + 99 others); Wed, 14 Jul 2021 21:15:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231374AbhGOBO5 (ORCPT ); Wed, 14 Jul 2021 21:14:57 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A43BC06175F for ; Wed, 14 Jul 2021 18:12:05 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id me13-20020a17090b17cdb0290173bac8b9c9so5011104pjb.3 for ; Wed, 14 Jul 2021 18:12:05 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=IhrSu4wh8n4znVOwGnNvlUkfc0zLP1DS+0LDkx5VFDw=; b=J8BLPkR0X6erW673XeQK0gOwGhUrvf8P3FwTeiDErmcNrJaqMBdwKkx3hSDanDnp9Y Jy0bNJvH68NuBXFTWyuh9lrfyCZOceNd64tZZYcIIc76JCURNlItZ3nUJrLOxAPvFqw3 mFuZMD/LtA86P4U2cnEnW5HVzSUswdJ9xZVhM= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=IhrSu4wh8n4znVOwGnNvlUkfc0zLP1DS+0LDkx5VFDw=; b=kyAbQAEGz//qzFd8jskmC/UJBZmKokcq7WTYP77sPGXwkiuDO1MqR7ud+417vufhpz 2bfq89HNeki0T3PhdQCzRWCQn74gGso0S0IKqUFDy5two3pNzRicVO3VOPligNF1Zcmq rfp82kPzivWXsDihNvF1Fw0GKbfBBKPT7Hwjvg/hOlwUoXy/ZTdsFRMrWyd8u79aZ7wX DbWMPXSO0t+Tp9ECWSMwDQRgy8o1zBM/oXiTb52Hw34BjKYh6Syqu7z6B5Q8vZuLY4MK PvUppxGSLhXDLUkQrmSsDHjHEk7LqRfJhQhxL+0CQRkUNGcqAa5DT9x7R2H8wruP3tk4 2QLA== X-Gm-Message-State: AOAM533QoA5KtoBtEO9xdTo8WFjH1rGJFrG6E6MZiz9hTujMJtalD/oN b06ZcjPXbkXB/6KV1DvyHDZX55UIMuQfmA== X-Received: by 2002:a17:90a:6482:: with SMTP id h2mr6255457pjj.24.1626311524579; Wed, 14 Jul 2021 18:12:04 -0700 (PDT) Received: from localhost ([2620:15c:202:201:20b7:5dcc:d530:a8df]) by smtp.gmail.com with UTF8SMTPSA id t11sm4653972pgm.36.2021.07.14.18.12.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jul 2021 18:12:04 -0700 (PDT) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Luiz Augusto von Dentz , Marcel Holtmann , Alain Michaud , Howard Chung , Miao-chen Chou Subject: [BlueZ PATCH v3 4/4] client: Print error code for connect methods Date: Wed, 14 Jul 2021 18:09:56 -0700 Message-Id: <20210714180917.BlueZ.v3.4.I226fdcdd12b13e4875c8cd03b42fc52283920cc4@changeid> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog In-Reply-To: <20210715010951.963176-1-mcchou@chromium.org> References: <20210715010951.963176-1-mcchou@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The following steps were performed. - Issuing repeated commands to connect the same BLE device. - Verifying the print in bluetoothctl console Reviewed-by: Alain Michaud Reviewed-by: Howard Chung --- Changes in v3: - Correct error-codes.txt. Changes in v2: - Add documentation for error codes client/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index da877b546..488a24bf6 100644 --- a/client/main.c +++ b/client/main.c @@ -1949,7 +1949,8 @@ static void connect_reply(DBusMessage *message, void *user_data) dbus_error_init(&error); if (dbus_set_error_from_message(&error, message) == TRUE) { - bt_shell_printf("Failed to connect: %s\n", error.name); + bt_shell_printf("Failed to connect: %s %s\n", error.name, + error.message); dbus_error_free(&error); return bt_shell_noninteractive_quit(EXIT_FAILURE); } -- 2.32.0.93.g670b81a890-goog