Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1735931pxv; Fri, 25 Jun 2021 22:23:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrbUEHvrBIaHXSl9b3musWNiEgFydILDC0rU3GdGkHuyneTx5dD22qlnKaf69nHRpZx4pV X-Received: by 2002:a92:7b0f:: with SMTP id w15mr10243394ilc.150.1624685038502; Fri, 25 Jun 2021 22:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624685038; cv=none; d=google.com; s=arc-20160816; b=Jy9j2Wjmx7jDWwQbHOF3tTE27AY21JJkUmAVUnFUhCFJGS0aFVhlhMFeCsgweSMqxS DwDTAqPMoCFFALoBKLuq04RYAzvo6XrJTD7vhtMur8+5hcOZN7OHYg/1gtXUakqmuWbN +nyR8MCr/3cNimHuwTvKPM97jOHGQOiholLkVg6dFn076hlCmm+QBVV28mvL0CaPvXpA X1J1WnbtQdHGLHD0l5rePU0OPSiDc2sxTUQpqJPoE2rq091wNyi97ckULGvKv0Frufwn x3xnksmB2sVpWRZFPZs3mqpqRchDcUjW+RerVcSTVMBIiRqA/QQ+NGDcuRnLz/oBWNaO DLEw== 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=bHXu6QpYhAF1bUg3eeLJ+I+qTJOic4krZqFaMCKTV0g=; b=VY3m3+ri1v/0uPbS70NB+tzMMVnbr2DtQNAxHOV0Cqi+YdogzYfudv8ByXpk/WK4Lb 66Dk0MatG9bxcHiWBaMUCMcS15uKCLtjTxhzbFk8WwFm5OCZiJHfANy6UK7aQz7MkpEy EP6jG83EAs5YMBFulp3MrsNQ0QKP7YGZEklmUwlvpC1MvfXxjVpRMCRkhSr/NFR3UaQC uLoYxaEJTtTiCjYivESbDobdRO/mcgYarUTEBza4SxjQzQL+AnfxZTSGh8eSSlU38Xsg 23bf45nzDrF++RFjOkq7HFHs6YXqABJDQJlMsU0nY5xeD3mhWehbzHthfx8M5K9GP346 OeNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=b8eKxOAm; 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 t17si8595959ilp.132.2021.06.25.22.23.36; Fri, 25 Jun 2021 22:23:58 -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=b8eKxOAm; 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 S229518AbhFZFZY (ORCPT + 99 others); Sat, 26 Jun 2021 01:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbhFZFZX (ORCPT ); Sat, 26 Jun 2021 01:25:23 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC842C061574 for ; Fri, 25 Jun 2021 22:23:00 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id 21so9176123pfp.3 for ; Fri, 25 Jun 2021 22:23:00 -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=bHXu6QpYhAF1bUg3eeLJ+I+qTJOic4krZqFaMCKTV0g=; b=b8eKxOAmGy4gBlERq8xINuj3/rC/lHju2Dqro4t69QW06NYdyxrw45n/nFpWmctu4W 3nlELuiDesQkdXzyakXZ7sJzFM/SwtyRQCCeOQBfkkMTvln+FL5q0hAYtYujSJUAue+G rL4yoG6XDqFS/EiZ40xvTVNMkJ5fZUkwfLMFs= 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=bHXu6QpYhAF1bUg3eeLJ+I+qTJOic4krZqFaMCKTV0g=; b=QaZhDGg3yJoz+nvQKFGLGyJZ4Z+abk0twW1UvL+HOHeexuDlZ2fPNe6J3aM38Eo/HA OTbM/OL3fd8PYTLvl+OSuGM0SfO+bwmbch6p1+KTE8wtYPEtneC5yJRCe62YWwE70yUE 26jQ6sj15y6RS2LuM0CqRik0yLXucYkkdpuRVX6hllVvdnnWWQkYnew5DBV64lZmPcW6 mSuuKKdR5jJ39qAiJrYuB7Ctk6ZDZsQnXg/tHoi0ghAAHrdCrjujAsFp+sQTEyGxCumx ufJmT5FU2KaVHLKfGG09kPcxTkE0p0yKSc7nRNuNefYtGE+dM6QNjyjKbAd0LE25/yH1 KqXw== X-Gm-Message-State: AOAM532C9EPTsDQRCMT6XvfLHJn/BW5e/XAdNpRZ0I6GDVM3Bpd4n1wE VBasaBZqQHrQpNm5jFwyElvwDmACPTU85w== X-Received: by 2002:a65:42c3:: with SMTP id l3mr12607058pgp.259.1624684980129; Fri, 25 Jun 2021 22:23:00 -0700 (PDT) Received: from localhost ([2620:15c:202:201:be2:cfe5:893:108f]) by smtp.gmail.com with UTF8SMTPSA id k25sm7297188pfa.213.2021.06.25.22.22.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Jun 2021 22:22:59 -0700 (PDT) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Luiz Augusto von Dentz , Alain Michaud , Marcel Holtmann , Howard Chung , Miao-chen Chou Subject: [BlueZ PATCH v2 3/3] client: Print error code for connect methods Date: Fri, 25 Jun 2021 22:21:55 -0700 Message-Id: <20210625222111.BlueZ.v2.3.I226fdcdd12b13e4875c8cd03b42fc52283920cc4@changeid> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog In-Reply-To: <20210626052152.2543526-1-mcchou@chromium.org> References: <20210626052152.2543526-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 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