Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp900111pxt; Fri, 6 Aug 2021 17:25:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIzXPS9gjHNoEOll04jQtCZl6Sut6diTHDenSjaPT19EfkY/gbOY/TvEPPlB6pLwOQ6oTz X-Received: by 2002:a5d:928c:: with SMTP id s12mr125951iom.151.1628295903397; Fri, 06 Aug 2021 17:25:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628295903; cv=none; d=google.com; s=arc-20160816; b=K9DFsKseOmZP9ohNcYftpYez4xQ/encQVNRXQp+Mz3O1+rcRg36UTDXunHbX0KXmAs rgnEV7toaOTaSHCi7eqBNEHK6KlASVODFK/ZLiWxUrcdOvO5MfTS832sM0QnAdgdWFh2 K0aNTMkgH/n475fUCRrhPstIH18IU8Wm5d5i51UtvJE4lQXqCSZB1FwHIleXyR3BsKJs 96ej+lwhnS/g83yp7emVClQO+DNs5wn3jsk03hLGrAqvjsVyoQt/7/pW7Npip62izySe gy5sD387l2k9K388pH3dX+xDz6L+EDhJF04TXXGDDcsSEif95n9CeZteTO+6qhwS3tf0 3keg== 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=PCXTgNGM1kZekZvv1Tlao0nSFb8xcy7vfhwjIjHyYKA=; b=LO/qYazJyCpbiQtDMBimZXGBat9NeWhRq5lT8qcw6EOLcwGrqmtX2OlecK94FINPS7 BVQua/sVH3Cg3X0h7ErI1yvujEM+Gd8M22lllFNPnE23TyXMTGPCItx77w9eyCHjjlY6 ybRb9rRUNsLSnPADqIoWiEoKlqaewRQ1EaPM5hRkoXVyml0nTuuaTdkjS0sCXqq0TXOq 40aCFhKVCqFR2SpBKnGzk/QLSxEIkAQUWw2ITUMDG2knq7Lm4gpK2yRcCRVl9QpkFHa6 YJN4D5siJrcWWPjIfsWkxM6Ia+aKOnXu71yR/DRoEmo9c2BeiVKsOa3OWwAxonI7AAaX 6NSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="L/ku4Q0p"; 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 j6si12519172jat.30.2021.08.06.17.24.52; Fri, 06 Aug 2021 17:25:03 -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="L/ku4Q0p"; 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 S234217AbhHFXuH (ORCPT + 99 others); Fri, 6 Aug 2021 19:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231531AbhHFXuH (ORCPT ); Fri, 6 Aug 2021 19:50:07 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEE8FC0613CF for ; Fri, 6 Aug 2021 16:49:49 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id c16so9184473plh.7 for ; Fri, 06 Aug 2021 16:49:49 -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=PCXTgNGM1kZekZvv1Tlao0nSFb8xcy7vfhwjIjHyYKA=; b=L/ku4Q0plePQyFY6Xp+5fvx7bk4mXQZWay7VmyP2glzqODyev6u5VkaMRUmcOhJACF WhQwV9583TUMoVdA/eK3OhQ0myU5YKaRrYL1g0wT1H5bmg+yLblBBrxzKZYrVg9UxE0Z 5Ey9VwfbFjYSPInHrZpe22nmBgXEi0UaXPZDs= 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=PCXTgNGM1kZekZvv1Tlao0nSFb8xcy7vfhwjIjHyYKA=; b=fYXEuiVf3eb5pE6AGB+AHRLR0ljVmmapl/HAXFqo6H7Vzyy8xKUZaaS+7/5Azz7UWp HJz4Tr+RkrE9E9jBVmAiSWvPwlQTUkjOKTtnIUzV9zMzfzdeoDuPxcwM4UxyPnIlRiVq BLbVZysRP2Ecsj39WlwIVNn8+CdrPLeBc9mrdUKFa1RTCHy8LHWoC3Or+QlcRoXc5wAx Lob9atu5JkN3nhaARz/cH6bJ4YMDkdcnOp8CuIsH7D1SKQk/pWs96+dMzh1ogv77KCiQ hEwCVhg2cxdCe+WqbuWslMCAUuCGNxZzrPXsAwWDaX3T33yjWgfB8MVCV+drVYkK5SCu xIrQ== X-Gm-Message-State: AOAM533JZXAoveqbXnoCIsX9BiWTJzbKuWiwPcVTP99g1xR7wOt+e30g I0nc8WzC/TyNpKzXbnxaNS3lVikjg70zzA== X-Received: by 2002:a17:902:b40b:b029:12b:997f:5677 with SMTP id x11-20020a170902b40bb029012b997f5677mr10636512plr.11.1628293789110; Fri, 06 Aug 2021 16:49:49 -0700 (PDT) Received: from localhost ([2620:15c:202:201:48a2:9887:4da1:32a4]) by smtp.gmail.com with UTF8SMTPSA id c15sm9542255pjr.22.2021.08.06.16.49.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Aug 2021 16:49:48 -0700 (PDT) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Marcel Holtmann , Howard Chung , Luiz Augusto von Dentz , Alain Michaud , Miao-chen Chou Subject: [BlueZ PATCH v5 4/4] client: Print error code for connect methods Date: Fri, 6 Aug 2021 16:47:26 -0700 Message-Id: <20210806164624.BlueZ.v5.4.I226fdcdd12b13e4875c8cd03b42fc52283920cc4@changeid> X-Mailer: git-send-email 2.32.0.605.g8dce9f2422-goog In-Reply-To: <20210806234720.286157-1-mcchou@chromium.org> References: <20210806234720.286157-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 v5: - Replace error code with error string Changes in v4: - Address make errors. 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.605.g8dce9f2422-goog