From patchwork Wed May 4 21:09:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhengping Jiang X-Patchwork-Id: 570008 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 840B7C433F5 for ; Wed, 4 May 2022 21:10:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378506AbiEDVNg (ORCPT ); Wed, 4 May 2022 17:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378505AbiEDVNg (ORCPT ); Wed, 4 May 2022 17:13:36 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4390B515B1 for ; Wed, 4 May 2022 14:09:59 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id o8-20020a17090a9f8800b001dc9f554c7fso984076pjp.4 for ; Wed, 04 May 2022 14:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=7PU1gWqW2ulTh1HEHniSNAgI0gD5Fj7dKsltxYqKlnY=; b=YFLnYQiMiij9eGvoO2gmBtRH/HmM0g+3jDZVTLgH8H5BCaJ1rz7++9eZ10unMlfngN fFhU7SV20qKx066870QFDIJ/Ylse/TkccHhixT7SLBQQJF93ozkAcMdRdkGOLj82hh39 J+JQRGSLkPIyA8NYdMD9ruwjpqc43RWPDGx/MPPkOU5XZLUS/0SWTxBVDmLdJUp4oMxJ KD/pkwTLyyJ4UB91eY7FHi6RvuosKHxfIpHmHY0RFt3mjY29IBfxBeOGBAEy6fV+dMLo RLg9uMyvTKGqhVrCg7D7MZJ8gEFLHDcwVvmIfIHVAomrMeLhDQqTExv+2MMd62COMEjd 2xdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=7PU1gWqW2ulTh1HEHniSNAgI0gD5Fj7dKsltxYqKlnY=; b=t0OdZdQO7y88g4EGF+Hphr5jGSdJVlrKczSbd9wpEHKX0+t2aj5OnYabcbgvKACZtB 4RKYGiOMlSJQziidkpsXUapQI5rpvKD6UWMeUAFNdmtmzh+NM+BBD5A/H16mi9Kk6c71 i8wmFwcL7Ht70T7nKZPRCQvxCSd55627510EnlhB3RHY5lJZiUUBetnZNWC9wY0PAFk1 xilPcXQ7X1sGxt6smBcGIzSE4cd19eysoMxSJ5uCZDwivFSrCrAow/MTyQleqWtygXB/ pjEQRE95PjW3PxwLi2nZbTEzaXeg8wI1casYIxj6x0q77Zt66WtCgkx9QlO334yz4oo0 eJ1Q== X-Gm-Message-State: AOAM532FiXJ+mGcYkEHrJF8MTLPnpEvDpYu+bl5twIpbDwiU36wBtaRy UQ3U/j1R55PPLDcMge5Wa3bZdeB8e8YWKsOBV3ObLMljLOIzWfFWz39yqsUonceEJwceLvkyyu2 J1MpQYRMotN9F1yX5JurJJo7maXmn1Zq5P3XfQ7Z2VC8ziy0hCI0c3khNGA4HBrQ/1X3F2eJAM2 A7 X-Google-Smtp-Source: ABdhPJxEO43DHxak0caUrAVL/CIc2YI4szlbZWpF8BdFKNV7EtDed5aBWmI8hKm5U5gVjVlViI07+/uGAx2w X-Received: from jiangzp-glinux-dev.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:4c52]) (user=jiangzp job=sendgmr) by 2002:a05:6a00:10cc:b0:505:ada6:e03e with SMTP id d12-20020a056a0010cc00b00505ada6e03emr22873341pfu.45.1651698598549; Wed, 04 May 2022 14:09:58 -0700 (PDT) Date: Wed, 4 May 2022 14:09:46 -0700 In-Reply-To: <20220504210948.2968827-1-jiangzp@google.com> Message-Id: <20220504140940.Bluez.v3.1.I6ab300fa4999c9310f4cb6fc09b1290edb6b2c2b@changeid> Mime-Version: 1.0 References: <20220504210948.2968827-1-jiangzp@google.com> X-Mailer: git-send-email 2.36.0.464.gb9c8b46e94-goog Subject: [Bluez PATCH v3 1/3] device: Add "Bonded" flag to dbus property From: Zhengping Jiang To: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com Cc: chromeos-bluetooth-upstreaming@chromium.org, Zhengping Jiang , Sonny Sasaka , Yun-Hao Chung Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Add "Bonded" to dbus device property table. When setting the "Bonded flag, check the status of the Bonded property first. If the Bonded property is changed, send property changed signal. Reviewed-by: Sonny Sasaka Reviewed-by: Yun-Hao Chung Signed-off-by: Zhengping Jiang --- (no changes since v2) Changes in v2: - Move one variable declaration to the top following C90 standard Changes in v1: - Add "Bonded" to D-Bus interface - Send property changed signal if the bonded flag is changed src/device.c | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/device.c b/src/device.c index a62564b14f49..72804713b25b 100644 --- a/src/device.c +++ b/src/device.c @@ -1143,6 +1143,22 @@ static gboolean dev_property_get_paired(const GDBusPropertyTable *property, return TRUE; } +static gboolean dev_property_get_bonded(const GDBusPropertyTable *property, + DBusMessageIter *iter, void *data) +{ + struct btd_device *dev = data; + dbus_bool_t val; + + if (dev->bredr_state.bonded || dev->le_state.bonded) + val = TRUE; + else + val = FALSE; + + dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &val); + + return TRUE; +} + static gboolean dev_property_get_legacy(const GDBusPropertyTable *property, DBusMessageIter *iter, void *data) { @@ -4033,6 +4049,7 @@ static const GDBusPropertyTable device_properties[] = { { "Icon", "s", dev_property_get_icon, NULL, dev_property_exists_icon }, { "Paired", "b", dev_property_get_paired }, + { "Bonded", "b", dev_property_get_bonded }, { "Trusted", "b", dev_property_get_trusted, dev_property_set_trusted }, { "Blocked", "b", dev_property_get_blocked, dev_property_set_blocked }, { "LegacyPairing", "b", dev_property_get_legacy }, @@ -7065,14 +7082,25 @@ void device_set_bonded(struct btd_device *device, uint8_t bdaddr_type) if (!device) return; - DBG(""); + struct bearer_state *state = get_state(device, bdaddr_type); - if (bdaddr_type == BDADDR_BREDR) - device->bredr_state.bonded = true; - else - device->le_state.bonded = true; + if (state->bonded) + return; + + DBG("setting bonded for device to true"); + + state->bonded = true; btd_device_set_temporary(device, false); + + /* If the other bearer state was already true we don't need to + * send any property signals. + */ + if (device->bredr_state.bonded == device->le_state.bonded) + return; + + g_dbus_emit_property_changed(dbus_conn, device->path, + DEVICE_INTERFACE, "Bonded"); } void device_set_legacy(struct btd_device *device, bool legacy) From patchwork Wed May 4 21:09:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhengping Jiang X-Patchwork-Id: 569326 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9513EC433EF for ; Wed, 4 May 2022 21:10:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378510AbiEDVNn (ORCPT ); Wed, 4 May 2022 17:13:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378505AbiEDVNl (ORCPT ); Wed, 4 May 2022 17:13:41 -0400 Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D8651E47 for ; Wed, 4 May 2022 14:10:03 -0700 (PDT) Received: by mail-pf1-x449.google.com with SMTP id cw22-20020a056a00451600b0050e09a0c53aso803779pfb.2 for ; Wed, 04 May 2022 14:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=b7WsrvbnTgwzAHR5EeEDX6HG+quOXPNtvadvNCGL1M4=; b=Vdme2JIRo1IaQfIdB1wxmyDU9rYtEB/+Uq7pJE+Nr2QDO+PCd882/vZ5PWVl2QpPw0 c5W9ze6swmLRmlB3DPe5H+AKxAGb6mBWULP1NKvb2cq8BAe3MXDI2hOVYirnt9yrOVZr zz3KURqwx2zLgBfjYyTp4lMUXMKI3Yr7PqRPE1HI0UWLqdHO1mbqMSRAUpRbqQaoneq4 wz/3Ly4qSTOow4Cb89Mpac9in3CnODNhvhKYjfiUzJ1y8yTbTx8utvH5AZcdP+bSXab+ l2IqbvUVMC4VsDGXeRbgKPogaWfTCx7/zwVJaWC3k3vI4hLreJORGJuzK/WM5LUvXOSH ACYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=b7WsrvbnTgwzAHR5EeEDX6HG+quOXPNtvadvNCGL1M4=; b=2rDbAB/0GWoeAo9qA/BX8Pbu6Kvrr5KiYGEESVoUknxt7wGpYTwYTh2Ot243jYahIP U9FnSZe00HzjM36h/2jUqHafRErEYlSoESN66L3m/VZKuQfxOvMgkzs6aJwi3P5riyyE WGseJ2g9fHThIb/geZKSJVyLXh4aAGhguA1yCJCBo5fdkGAwblEsXL860Mm6tDTmTh32 xQz2EjesbPzRShqSsXleF/Bjivxa8SEoPH6A3oxeG98AkBlKCEW5gcwA8/mIY6WE2NPx /oeoFhyFXi6vAStbCeq0fbBEVWzfjIEGn1hfq2QAYBjqpE6zAIhlLalFnw9OVdXhakUg 4U7g== X-Gm-Message-State: AOAM5316Tkp9UkJMIk8Myrt7vBljSdx/IQ8V9qxOVWmjmLvTKeMwjxrp KSVUSQTHNjkmEk8gqAlP0DL4te4LcrXN2KiUqiG1A2PtBAZ82xNMxlXxcBP6lPvTYl3YbERVg6C FCosksjGmRGJj5CGJtxWlK80/fPh5MceNue9zjrqksbsCnz/xV1vXryE/DF4iOazqLaGee6EZUK vK X-Google-Smtp-Source: ABdhPJzc9c7oomeKgqVfkCZs42g1vfTcNp5HeO48OFn9auFCGgF8C5ABLeubEVCOISsbOSsyU+3gXAAC8J23 X-Received: from jiangzp-glinux-dev.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:4c52]) (user=jiangzp job=sendgmr) by 2002:a17:90a:c986:b0:1d9:56e7:4e83 with SMTP id w6-20020a17090ac98600b001d956e74e83mr108697pjt.1.1651698602842; Wed, 04 May 2022 14:10:02 -0700 (PDT) Date: Wed, 4 May 2022 14:09:47 -0700 In-Reply-To: <20220504210948.2968827-1-jiangzp@google.com> Message-Id: <20220504140940.Bluez.v3.2.I52f3efc7576fd0048437f1419dd2e1e687f7ac65@changeid> Mime-Version: 1.0 References: <20220504210948.2968827-1-jiangzp@google.com> X-Mailer: git-send-email 2.36.0.464.gb9c8b46e94-goog Subject: [Bluez PATCH v3 2/3] doc: add "Bonded" flag to dbus property From: Zhengping Jiang To: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com Cc: chromeos-bluetooth-upstreaming@chromium.org, Zhengping Jiang , Sonny Sasaka , Yun-Hao Chung Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Bonded flag is used to indicate the link key or ltk of the remote device has been stored. Reviewed-by: Sonny Sasaka Reviewed-by: Yun-Hao Chung Signed-off-by: Zhengping Jiang --- Changes in v3: - Move documentation update to a separate patch - Add description to bonded and paired doc/device-api.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/device-api.txt b/doc/device-api.txt index 1e8590b27d58..c7e217c07526 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -246,7 +246,17 @@ Properties string Address [readonly] boolean Paired [readonly] - Indicates if the remote device is paired. + Indicates if the remote device is paired. Pairing is + the process where devices exchange the information to + establish an encrypted connection. + + boolean Bonded [readonly] + + Indicates if the remote device is bonded. Bonded means + the link key or the ltk from the pairing process has + been stored. + A PropertiesChanged signal indicate changes to this + status. boolean Connected [readonly] From patchwork Wed May 4 21:09:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhengping Jiang X-Patchwork-Id: 570007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11E86C433FE for ; Wed, 4 May 2022 21:10:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378512AbiEDVNo (ORCPT ); Wed, 4 May 2022 17:13:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378505AbiEDVNn (ORCPT ); Wed, 4 May 2022 17:13:43 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0B29515B1 for ; Wed, 4 May 2022 14:10:06 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id o7-20020a17090a0a0700b001d93c491131so3457174pjo.6 for ; Wed, 04 May 2022 14:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=MWNKAKX9vwd2owSFK0FSrCSLpumWwv3K0/Q5OZyz5qk=; b=sGs59LiIiKOLTxv/kTkmJ3bKYKBofcYxA2I20ZtZn5abQ8flboigOUii7He9W8ck6n THC3oXmfTFRNcrUoH2ynXZ8KpgC8a9pr/N2ovo72B5L/Ys6ACLr4z2ORQlj4nn8SOpgv vHdUI2NOL4vnyLsy5qt2Ur6G2qoc2wX3vfREZGMbV9u5TUo6/hsMmngsHQtmpBeCPoXD wCW7RaJBu13RXoa9Hh09p9tndI/RqwU6l1sT0to5D1AGQn6iBCULM6z33lsR0U8lUeZt RPJzHmyLPj42flEqCcmxtp6nD9bjAw+clqtpTj/AYu5FpRWVzxnt4jXg1SgJuYEbPj9X DmUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=MWNKAKX9vwd2owSFK0FSrCSLpumWwv3K0/Q5OZyz5qk=; b=CqHfAt9ZoIB8cFig/tw0FgX2XFys06vDA92Oowge63yePmi404ewZeNHLQc3j5pRqP aKGRXiGTqqFXfrblBCDmxW0G3ixqyk2J0NKTlhzjDG26A4Q0Fkvyc5SKOcrtc/dLcWjx LcXaFtjp0UM6RznYjQZqGUmeyCHseEogZT4x2ZWJWvM8JaayCsbOD/8AMkZd+7/zxdnb NU5jUsS/xBwVAIOSSqQHaBCK6NM/cP4yTeutAcllV45fTjn9ZFRPxcEUovf3UbOXOVS+ hH3lcImcoGIuNfNbQaSja001CTks6Ty4/1OnXLNIX+iE1eqJyiWhvH3tGY+o6L9vO+hU Zf7w== X-Gm-Message-State: AOAM5306z1noIsDkn5m+f+GmhMIeU30ru5DkWXUqYfgYfcfuB5xVUtXY f/FixxEApKj2cBmJRa9sujHlSZXbqUpPFDTajXkpvJ0wh00I7KdR0h7CVOmwqXKprEkac3QY/sv jy4FbboLdSCrJUCyjwmUILhhNm+DZQkUSTSnygp38rzQfgmHzKiGi9DqD6uFUdSDlH7ihNk2PtW lT X-Google-Smtp-Source: ABdhPJwNEzvFWDM4r4fpycu+8VUef2LDNxccpBTFfOuzuPF804NxInBNPYcJkNffLqd0hW9IsTVMV+NBe54E X-Received: from jiangzp-glinux-dev.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:4c52]) (user=jiangzp job=sendgmr) by 2002:a62:d415:0:b0:50d:baaf:4156 with SMTP id a21-20020a62d415000000b0050dbaaf4156mr22663081pfh.28.1651698606298; Wed, 04 May 2022 14:10:06 -0700 (PDT) Date: Wed, 4 May 2022 14:09:48 -0700 In-Reply-To: <20220504210948.2968827-1-jiangzp@google.com> Message-Id: <20220504140941.Bluez.v3.3.I29a0e38364a8d5854342019b607fa049c74248a3@changeid> Mime-Version: 1.0 References: <20220504210948.2968827-1-jiangzp@google.com> X-Mailer: git-send-email 2.36.0.464.gb9c8b46e94-goog Subject: [Bluez PATCH v3 3/3] client: Add filter to devices and show Bonded in info From: Zhengping Jiang To: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com Cc: chromeos-bluetooth-upstreaming@chromium.org, Zhengping Jiang , Sonny Sasaka , Yun-Hao Chung Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Use the property name as optional filters to the command "devices" and show the "Bonded" property for the command "info". Reviewed-by: Sonny Sasaka Reviewed-by: Yun-Hao Chung Signed-off-by: Zhengping Jiang --- Changes in v3: - Add an optional argument to the devices command to filter device list - Remove paired-devices command Changes in v1: - Show the status of the "Bonded" flag in bluetoothctl - Add option to show list of bonded devices client/main.c | 72 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 25 deletions(-) diff --git a/client/main.c b/client/main.c index 29a2f882e5c8..58678224f93f 100644 --- a/client/main.c +++ b/client/main.c @@ -95,6 +95,14 @@ static const char *ad_arguments[] = { NULL }; +static const char * const device_arguments[] = { + "Paired", + "Bonded", + "Trusted", + "Connected", + NULL +}; + static void proxy_leak(gpointer data) { printf("Leaking proxy %p\n", data); @@ -929,6 +937,28 @@ static gboolean check_default_ctrl(void) return TRUE; } +static gboolean parse_argument_devices(int argc, char *argv[], + const char * const *arg_table, + const char **option) +{ + const char * const *opt; + + if (argc < 2) { + *option = NULL; + return TRUE; + } + + for (opt = arg_table; opt && *opt; opt++) { + if (strcmp(argv[1], *opt) == 0) { + *option = *opt; + return TRUE; + } + } + + bt_shell_printf("Invalid argument %s\n", argv[1]); + return FALSE; +} + static gboolean parse_argument(int argc, char *argv[], const char **arg_table, const char *msg, dbus_bool_t *value, const char **option) @@ -1068,22 +1098,11 @@ static void cmd_select(int argc, char *argv[]) static void cmd_devices(int argc, char *argv[]) { GList *ll; + const char *property; - if (check_default_ctrl() == FALSE) - return bt_shell_noninteractive_quit(EXIT_SUCCESS); - - for (ll = g_list_first(default_ctrl->devices); - ll; ll = g_list_next(ll)) { - GDBusProxy *proxy = ll->data; - print_device(proxy, NULL); - } - - return bt_shell_noninteractive_quit(EXIT_SUCCESS); -} - -static void cmd_paired_devices(int argc, char *argv[]) -{ - GList *ll; + if (!parse_argument_devices(argc, argv, device_arguments, + &property)) + return bt_shell_noninteractive_quit(EXIT_FAILURE); if (check_default_ctrl() == FALSE) return bt_shell_noninteractive_quit(EXIT_SUCCESS); @@ -1092,15 +1111,17 @@ static void cmd_paired_devices(int argc, char *argv[]) ll; ll = g_list_next(ll)) { GDBusProxy *proxy = ll->data; DBusMessageIter iter; - dbus_bool_t paired; + dbus_bool_t status; - if (g_dbus_proxy_get_property(proxy, "Paired", &iter) == FALSE) - continue; - - dbus_message_iter_get_basic(&iter, &paired); - if (!paired) - continue; + if (property) { + if (g_dbus_proxy_get_property(proxy, + property, &iter) == FALSE) + continue; + dbus_message_iter_get_basic(&iter, &status); + if (!status) + continue; + } print_device(proxy, NULL); } @@ -1787,6 +1808,7 @@ static void cmd_info(int argc, char *argv[]) print_property(proxy, "Appearance"); print_property(proxy, "Icon"); print_property(proxy, "Paired"); + print_property(proxy, "Bonded"); print_property(proxy, "Trusted"); print_property(proxy, "Blocked"); print_property(proxy, "Connected"); @@ -3170,9 +3192,9 @@ static const struct bt_shell_menu main_menu = { ctrl_generator }, { "select", "", cmd_select, "Select default controller", ctrl_generator }, - { "devices", NULL, cmd_devices, "List available devices" }, - { "paired-devices", NULL, cmd_paired_devices, - "List paired devices"}, + { "devices", "[Paired/Bonded/Trusted/Connected]", cmd_devices, + "List available devices, with an " + "optional property as the filter" }, { "system-alias", "", cmd_system_alias, "Set controller alias" }, { "reset-alias", NULL, cmd_reset_alias,