Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp276053pxb; Wed, 15 Sep 2021 01:34:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwjtpnfcm30/dDnFWG1XykQ6wD3HmXa8qiyRawGHc7ShDfj/UMI0MyCHaSMxBK6ulxyD2B X-Received: by 2002:a92:d8cc:: with SMTP id l12mr5537523ilo.166.1631694896808; Wed, 15 Sep 2021 01:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631694896; cv=none; d=google.com; s=arc-20160816; b=Kmn7t6Nd6OK1PUeXgF6JxxDbBbbLc7PwXZBiUEK0ZskE1GtIx+IR3wxOL/sIoD7S0J qSLRTlCp0wvZmc5kt07HKQOfBxDUeo88G+Muj45riNaAILfvIUBoym7YRIAaND83jfgy HtN/+Hx+s0euR1wN1TekZUyNMmQxu6+gdIqWIrbiOCRhVw6eUgfFQPdFwXUw9YWdhBI6 eRk0a9YmgvPoUlmzf1zzaZyLLC2pJhI1rUUfY8qOwlTZFSsuFabuqKrIfuZT8pqt4x9v klqJFjss4XPOzq3h8l+IN4aPNFa7/0GX192bu4d43TP+da42L6Rma3XG8Lt8SxeWjYcp PCpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=ncXsIu1QmamRg6s0hXCJsyHRu3fTjFRSiCoJFPhGjFs=; b=UpxZJjbtDwF4pUKFhZGYNn7VsBhdRj4XyLq6wQ8nb6hzpgAJtGI3sNJCxFn9wcRAvs Y55VTZHZh6MhDuefveHDcY+5VTsnt0DGhfeSmCem/sl1Qs6Go5+AtzV/EpwjgwHq8hhA OIEnAy6qaldwDuvMXRWJXhrEZqu9oxuoTmks5vWkjq0H1Jas8T4FhJBi9Kmdag06jVgD o+pdBkA0lcSOeMhOFSQqOMABulDC7DLQyLBzH37HmZPUY/SJQbP/ceO/KWYKjUd26yGo 2thSnYIBJucCPqhSwmD8OP/bGnXh9RWXIcE5zVouh18yq0LycJYoumLYsvA/4P3IxcoE P/Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ozKXcm3b; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si14177861jam.60.2021.09.15.01.34.02; Wed, 15 Sep 2021 01:34:56 -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=@google.com header.s=20210112 header.b=ozKXcm3b; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231759AbhIOIeT (ORCPT + 99 others); Wed, 15 Sep 2021 04:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236894AbhIOIeN (ORCPT ); Wed, 15 Sep 2021 04:34:13 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07921C061764 for ; Wed, 15 Sep 2021 01:32:53 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id y134-20020a25dc8c000000b0059f0301df0fso2598483ybe.21 for ; Wed, 15 Sep 2021 01:32:52 -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=ncXsIu1QmamRg6s0hXCJsyHRu3fTjFRSiCoJFPhGjFs=; b=ozKXcm3bZBfKo1p6BfvFAMauhCuQsmDhAhanbWKT7wkeVtYhMZKvkwgWi0SnfoERNH H+fOY1qNAaLts6JG220wDRgmkGf8FFLNvxIxziMEa045a5VoBiEJXQ3eXL2CVggRhdHV 8Lr9Pl111kQEKrIFA4XYm30gk+h5LnfRvP0ymOMqytiNjoWT4o8lcu9vmiC7simHIil/ Bt/j2fhzz6vBxiP2luWFvY9fTXbRyb+Y7iDj2vwIj0JTUPy+kt7vhYI5uQw8Pcug7dvh ZGutCxlSEAIT9HBFq0K8tLDVrIywXctGzhFSbBD7Z2pt6yFuz5jccQtzTjTDuPcu7bfT Ia0A== 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=ncXsIu1QmamRg6s0hXCJsyHRu3fTjFRSiCoJFPhGjFs=; b=lvhJ9Itbu0bkHgPHDlNiQDoLqWLJ8Z9sVlb6iSzKrzfD32IriZwSRu/W0rWv/vSrqE zT8wJCAUmibXrT9gefFXDzK00MnKsJi+TOTUSQ8LaDHIpizZWaTwg4mFZElZtsNcQINx PlQS7FPtFHghG01qztmeFGsalRF7V/XVY3lQdSNtwBTEzjhSiVsQJhU2Vj37O/HZN7uC SEQLaibS+IWwI5rHtJapLpNLfNOT6i43vukOxkJvTcISbek77HHaNEO70Q/Xmc7rIQfO nuU49ZLGxlkee0QhlyW03uCuhcoftCW+2CbLd48knGnZgBAE1aOc1VJAZVjU9fbBh60J SfCw== X-Gm-Message-State: AOAM532FG63YiPD6tEh97jbR2zhhAzOY1JVy3xGEm4eQluZxuEMv2VBc XnkLpLyrdciGsRBXcDCE2vvgd8q0oyReokAMmz+H1heeBMw75KYz8xHgBlgwXTMeYGsuyAOxXV/ f2RxTlHm+qdEtu/CIzPQ0AdCMRb2qg94hPicJBqJ10ZXYPPX7lVFauYJvvveGwOs+oJsR2mcHh/ MP X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:3c6b:8053:7e45:276b]) (user=apusaka job=sendgmr) by 2002:a25:9a09:: with SMTP id x9mr4836847ybn.157.1631694772247; Wed, 15 Sep 2021 01:32:52 -0700 (PDT) Date: Wed, 15 Sep 2021 16:31:59 +0800 In-Reply-To: <20210915083207.243957-1-apusaka@google.com> Message-Id: <20210915162843.Bluez.v5.5.I700d72f935b48346f2e74088152eeef41dc5b938@changeid> Mime-Version: 1.0 References: <20210915083207.243957-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.464.g1972c5931b-goog Subject: [Bluez PATCH v5 05/13] tools: Inclusive language changes From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka BT core spec 5.3 promotes the usage of inclusive languages. This CL replaces some terms with the more appropriate counterparts, such as "central", "peripheral", "accept list", "reject list", and "temporary link key". Note that some suggestions come from https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf --- Changes in v5: * Support the original term as input parameter for tools * Split input parameters changes as a separate patch Changes in v4: * Aggresively fix line over 80 columns Changes in v2: * Merging several patches from the same directory into one tools/3dsp.c | 33 +++++---- tools/bdaddr.rst | 2 +- tools/btiotest.c | 20 ++--- tools/btpclientctl.c | 2 +- tools/hci-tester.c | 12 +-- tools/hciconfig.c | 148 ++++++++++++++++++++++++------------- tools/hciconfig.rst | 24 +++--- tools/hcitool.c | 16 ++-- tools/l2cap-tester.c | 24 +++--- tools/l2test.c | 10 +-- tools/mesh-cfgclient.c | 4 +- tools/mesh-gatt/mesh-net.h | 4 +- tools/mesh-gatt/net.c | 60 +++++++-------- tools/mesh/mesh-db.c | 17 ++--- tools/mesh/mesh-db.h | 4 +- tools/mesh/remote.c | 53 +++++++------ tools/mesh/remote.h | 5 +- tools/meshctl.c | 6 +- tools/mgmt-tester.c | 120 +++++++++++++++--------------- tools/oobtest.c | 8 +- tools/parser/avdtp.c | 11 ++- tools/parser/csr.c | 17 +++-- tools/parser/ericsson.c | 2 +- tools/parser/hci.c | 38 +++++----- tools/parser/lmp.c | 112 ++++++++++++++-------------- tools/parser/parser.h | 2 +- tools/parser/smp.c | 12 +-- tools/rctest.c | 13 ++-- tools/rctest.rst | 2 +- tools/rfcomm-tester.c | 14 ++-- tools/rfcomm.c | 9 ++- tools/rfcomm.rst | 2 +- tools/sco-tester.c | 10 +-- tools/smp-tester.c | 12 +-- 34 files changed, 439 insertions(+), 389 deletions(-) diff --git a/tools/3dsp.c b/tools/3dsp.c index 5227c30b63..267a39e904 100644 --- a/tools/3dsp.c +++ b/tools/3dsp.c @@ -112,10 +112,10 @@ static void start_inquiry(void) inquiry_started, NULL, NULL); } -static void set_slave_broadcast_receive(const void *data, uint8_t size, +static void set_peripheral_broadcast_receive(const void *data, uint8_t size, void *user_data) { - printf("Slave broadcast receiption enabled\n"); + printf("Peripheral broadcast reception enabled\n"); } static void sync_train_received(const void *data, uint8_t size, @@ -149,7 +149,7 @@ static void sync_train_received(const void *data, uint8_t size, bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE, &cmd, sizeof(cmd), - set_slave_broadcast_receive, NULL, NULL); + set_peripheral_broadcast_receive, NULL, NULL); } static void brcm_sync_train_received(const void *data, uint8_t size, @@ -183,7 +183,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size, bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE, &cmd, sizeof(cmd), - set_slave_broadcast_receive, NULL, NULL); + set_peripheral_broadcast_receive, NULL, NULL); } static void truncated_page_complete(const void *data, uint8_t size, @@ -209,7 +209,7 @@ static void truncated_page_complete(const void *data, uint8_t size, NULL, NULL, NULL); } -static void slave_broadcast_timeout(const void *data, uint8_t size, +static void peripheral_broadcast_timeout(const void *data, uint8_t size, void *user_data) { const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data; @@ -226,7 +226,7 @@ static void slave_broadcast_timeout(const void *data, uint8_t size, NULL, NULL, NULL); } -static void slave_broadcast_receive(const void *data, uint8_t size, +static void peripheral_broadcast_receive(const void *data, uint8_t size, void *user_data) { const struct bt_hci_evt_peripheral_broadcast_receive *evt = data; @@ -327,9 +327,9 @@ static void start_glasses(void) bt_hci_register(hci_dev, BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE, truncated_page_complete, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT, - slave_broadcast_timeout, NULL, NULL); + peripheral_broadcast_timeout, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE, - slave_broadcast_receive, NULL, NULL); + peripheral_broadcast_receive, NULL, NULL); start_inquiry(); } @@ -381,7 +381,7 @@ static void conn_request(const void *data, uint8_t size, void *user_data) start_sync_train(); } -static void slave_page_response_timeout(const void *data, uint8_t size, +static void peripheral_page_response_timeout(const void *data, uint8_t size, void *user_data) { printf("Incoming truncated page received\n"); @@ -389,8 +389,8 @@ static void slave_page_response_timeout(const void *data, uint8_t size, start_sync_train(); } -static void slave_broadcast_channel_map_change(const void *data, uint8_t size, - void *user_data) +static void peripheral_broadcast_channel_map_change(const void *data, + uint8_t size, void *user_data) { printf("Broadcast channel map changed\n"); @@ -447,13 +447,14 @@ static void read_clock(const void *data, uint8_t size, void *user_data) bcastdata, sizeof(bcastdata), NULL, NULL, NULL); } -static void set_slave_broadcast(const void *data, uint8_t size, void *user_data) +static void set_peripheral_broadcast(const void *data, uint8_t size, + void *user_data) { const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data; struct bt_hci_cmd_read_clock cmd; if (rsp->status) { - printf("Failed to set slave broadcast transmission\n"); + printf("Failed to set peripheral broadcast transmission\n"); shutdown_device(); return; } @@ -493,10 +494,10 @@ static void start_display(void) conn_request, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT, - slave_page_response_timeout, NULL, NULL); + peripheral_page_response_timeout, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE, - slave_broadcast_channel_map_change, NULL, NULL); + peripheral_broadcast_channel_map_change, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_SYNC_TRAIN_COMPLETE, sync_train_complete, NULL, NULL); @@ -512,7 +513,7 @@ static void start_display(void) cmd.timeout = cpu_to_le16(0xfffe); bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST, &cmd, - sizeof(cmd), set_slave_broadcast, NULL, NULL); + sizeof(cmd), set_peripheral_broadcast, NULL, NULL); } static void signal_callback(int signum, void *user_data) diff --git a/tools/bdaddr.rst b/tools/bdaddr.rst index 1d21e2ca39..a84950bc35 100644 --- a/tools/bdaddr.rst +++ b/tools/bdaddr.rst @@ -61,7 +61,7 @@ FILES ===== /usr/share/misc/oui.txt - IEEE Organizationally Unique Identifier master file. + IEEE Organizationally Unique Identifier consolidated file. Manually update from: http://standards.ieee.org/regauth/oui/oui.txt diff --git a/tools/btiotest.c b/tools/btiotest.c index 3f4900a5a5..4bbe088bc3 100644 --- a/tools/btiotest.c +++ b/tools/btiotest.c @@ -310,7 +310,7 @@ static void l2cap_connect(const char *src, const char *dst, uint8_t addr_type, static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm, uint16_t cid, int defer, int reject, int disconn, int accept, int sec, - gboolean master) + gboolean central) { struct io_data *data; BtIOConnect conn; @@ -343,7 +343,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm, BT_IO_OPT_PSM, psm, BT_IO_OPT_CID, cid, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_INVALID); else l2_srv = bt_io_listen(conn, cfm, data, @@ -353,7 +353,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm, BT_IO_OPT_PSM, psm, BT_IO_OPT_CID, cid, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_INVALID); if (!l2_srv) { @@ -402,7 +402,7 @@ static void rfcomm_connect(const char *src, const char *dst, uint8_t ch, static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, int reject, int disconn, int accept, - int sec, gboolean master) + int sec, gboolean central) { struct io_data *data; BtIOConnect conn; @@ -427,7 +427,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, BT_IO_OPT_SOURCE, src, BT_IO_OPT_CHANNEL, ch, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_INVALID); else rc_srv = bt_io_listen(conn, cfm, @@ -435,7 +435,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, &err, BT_IO_OPT_CHANNEL, ch, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_INVALID); if (!rc_srv) { @@ -540,7 +540,7 @@ static int opt_reject = -1; static int opt_disconn = -1; static int opt_accept = DEFAULT_ACCEPT_TIMEOUT; static int opt_sec = 0; -static gboolean opt_master = FALSE; +static gboolean opt_central = FALSE; static int opt_priority = 0; static int opt_cid = 0; static guint8 opt_addr_type = 0; @@ -576,7 +576,7 @@ static GOptionEntry options[] = { "Disconnect connection after N seconds" }, { "accept", 'a', 0, G_OPTION_ARG_INT, &opt_accept, "Accept connection after N seconds" }, - { "master", 'm', 0, G_OPTION_ARG_NONE, &opt_master, + { "master", 'm', 0, G_OPTION_ARG_NONE, &opt_central, "Master role switch (incoming connections)" }, { "priority", 'P', 0, G_OPTION_ARG_INT, &opt_priority, "Transmission priority: Setting a priority " @@ -614,7 +614,7 @@ int main(int argc, char *argv[]) else l2cap_listen(opt_dev, opt_addr_type, opt_psm, opt_cid, opt_defer, opt_reject, opt_disconn, - opt_accept, opt_sec, opt_master); + opt_accept, opt_sec, opt_central); } if (opt_channel != -1) { @@ -624,7 +624,7 @@ int main(int argc, char *argv[]) else rfcomm_listen(opt_dev, opt_channel, opt_defer, opt_reject, opt_disconn, opt_accept, - opt_sec, opt_master); + opt_sec, opt_central); } if (opt_sco) { diff --git a/tools/btpclientctl.c b/tools/btpclientctl.c index 6553f2f3a7..c30d5bd4e7 100644 --- a/tools/btpclientctl.c +++ b/tools/btpclientctl.c @@ -676,7 +676,7 @@ const struct indexstr_data ad_type_table[] = { { 0x10, "BT_AD_DEVICE_ID" }, { 0x10, "BT_AD_SMP_TK" }, { 0x11, "BT_AD_SMP_OOB_FLAGS" }, - { 0x12, "BT_AD_SLAVE_CONN_INTERVAL" }, + { 0x12, "BT_AD_PERIPHERAL_CONN_INTERVAL" }, { 0x14, "BT_AD_SOLICIT16" }, { 0x15, "BT_AD_SOLICIT128" }, { 0x16, "BT_AD_SERVICE_DATA16" }, diff --git a/tools/hci-tester.c b/tools/hci-tester.c index 645d89e721..79193220fe 100644 --- a/tools/hci-tester.c +++ b/tools/hci-tester.c @@ -335,12 +335,12 @@ static void test_read_local_supported_codecs(const void *test_data) test_command(BT_HCI_CMD_READ_LOCAL_CODECS); } -static void test_le_read_white_list_size(const void *test_data) +static void test_le_read_accept_list_size(const void *test_data) { test_command(BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE); } -static void test_le_clear_white_list(const void *test_data) +static void test_le_clear_accept_list(const void *test_data) { test_command(BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST); } @@ -944,10 +944,10 @@ int main(int argc, char *argv[]) test_hci_local("Read Local Supported Codecs", NULL, NULL, test_read_local_supported_codecs); - test_hci_local("LE Read White List Size", NULL, NULL, - test_le_read_white_list_size); - test_hci_local("LE Clear White List", NULL, NULL, - test_le_clear_white_list); + test_hci_local("LE Read Accept List Size", NULL, NULL, + test_le_read_accept_list_size); + test_hci_local("LE Clear Accept List", NULL, NULL, + test_le_clear_accept_list); test_hci_local("LE Encrypt", NULL, NULL, test_le_encrypt); test_hci_local("LE Rand", NULL, NULL, diff --git a/tools/hciconfig.c b/tools/hciconfig.c index 491f216135..e4d5215833 100644 --- a/tools/hciconfig.c +++ b/tools/hciconfig.c @@ -116,8 +116,8 @@ static void print_le_states(uint64_t states) "Directed Advertising State", "Passive Scanning State", "Active Scanning State", - "Initiating State/Connection State in Master Role", - "Connection State in the Slave Role", + "Initiating State/Connection State in Central Role", + "Connection State in the Peripheral Role", "Non-connectable Advertising State and Passive Scanning State combination", "Scannable Advertising State and Passive Scanning State combination", "Connectable Advertising State and Passive Scanning State combination", @@ -128,17 +128,17 @@ static void print_le_states(uint64_t states) "Directed Advertising State and Active Scanning State combination", "Non-connectable Advertising State and Initiating State combination", "Scannable Advertising State and Initiating State combination", - "Non-connectable Advertising State and Master Role combination", - "Scannable Advertising State and Master Role combination", - "Non-connectable Advertising State and Slave Role combination", - "Scannable Advertising State and Slave Role combination", + "Non-connectable Advertising State and Central Role combination", + "Scannable Advertising State and Central Role combination", + "Non-connectable Advertising State and Peripheral Role combination", + "Scannable Advertising State and Peripheral Role combination", "Passive Scanning State and Initiating State combination", "Active Scanning State and Initiating State combination", - "Passive Scanning State and Master Role combination", - "Active Scanning State and Master Role combination", - "Passive Scanning State and Slave Role combination", - "Active Scanning State and Slave Role combination", - "Initiating State and Master Role combination/Master Role and Master Role combination", + "Passive Scanning State and Central Role combination", + "Active Scanning State and Central Role combination", + "Passive Scanning State and Peripheral Role combination", + "Active Scanning State and Peripheral Role combination", + "Initiating State and Central Role combination/Central Role and Central Role combination", NULL }; @@ -1886,50 +1886,92 @@ static struct { char *opt; char *doc; } command[] = { - { "up", cmd_up, 0, "Open and initialize HCI device" }, - { "down", cmd_down, 0, "Close HCI device" }, - { "reset", cmd_reset, 0, "Reset HCI device" }, - { "rstat", cmd_rstat, 0, "Reset statistic counters" }, - { "auth", cmd_auth, 0, "Enable Authentication" }, - { "noauth", cmd_auth, 0, "Disable Authentication" }, - { "encrypt", cmd_encrypt, 0, "Enable Encryption" }, - { "noencrypt", cmd_encrypt, 0, "Disable Encryption" }, - { "piscan", cmd_scan, 0, "Enable Page and Inquiry scan" }, - { "noscan", cmd_scan, 0, "Disable scan" }, - { "iscan", cmd_scan, 0, "Enable Inquiry scan" }, - { "pscan", cmd_scan, 0, "Enable Page scan" }, - { "ptype", cmd_ptype, "[type]", "Get/Set default packet type" }, - { "lm", cmd_lm, "[mode]", "Get/Set default link mode" }, - { "lp", cmd_lp, "[policy]", "Get/Set default link policy" }, - { "name", cmd_name, "[name]", "Get/Set local name" }, - { "class", cmd_class, "[class]", "Get/Set class of device" }, - { "voice", cmd_voice, "[voice]", "Get/Set voice setting" }, - { "iac", cmd_iac, "[iac]", "Get/Set inquiry access code" }, - { "inqtpl", cmd_inq_tpl, "[level]", "Get/Set inquiry transmit power level" }, - { "inqmode", cmd_inq_mode, "[mode]", "Get/Set inquiry mode" }, - { "inqdata", cmd_inq_data, "[data]", "Get/Set inquiry data" }, - { "inqtype", cmd_inq_type, "[type]", "Get/Set inquiry scan type" }, - { "inqparms", cmd_inq_parms, "[win:int]", "Get/Set inquiry scan window and interval" }, - { "pageparms", cmd_page_parms, "[win:int]", "Get/Set page scan window and interval" }, - { "pageto", cmd_page_to, "[to]", "Get/Set page timeout" }, - { "afhmode", cmd_afh_mode, "[mode]", "Get/Set AFH mode" }, - { "sspmode", cmd_ssp_mode, "[mode]", "Get/Set Simple Pairing Mode" }, - { "aclmtu", cmd_aclmtu, "", "Set ACL MTU and number of packets" }, - { "scomtu", cmd_scomtu, "", "Set SCO MTU and number of packets" }, - { "delkey", cmd_delkey, "", "Delete link key from the device" }, - { "oobdata", cmd_oob_data, 0, "Get local OOB data" }, - { "commands", cmd_commands, 0, "Display supported commands" }, - { "features", cmd_features, 0, "Display device features" }, - { "version", cmd_version, 0, "Display version information" }, - { "revision", cmd_revision, 0, "Display revision information" }, - { "block", cmd_block, "", "Add a device to the blacklist" }, - { "unblock", cmd_unblock, "", "Remove a device from the blacklist" }, - { "lerandaddr", cmd_le_addr, "", "Set LE Random Address" }, - { "leadv", cmd_le_adv, "[type]", "Enable LE advertising" + { "up", cmd_up, 0, + "Open and initialize HCI device" }, + { "down", cmd_down, 0, + "Close HCI device" }, + { "reset", cmd_reset, 0, + "Reset HCI device" }, + { "rstat", cmd_rstat, 0, + "Reset statistic counters" }, + { "auth", cmd_auth, 0, + "Enable Authentication" }, + { "noauth", cmd_auth, 0, + "Disable Authentication" }, + { "encrypt", cmd_encrypt, 0, + "Enable Encryption" }, + { "noencrypt", cmd_encrypt, 0, + "Disable Encryption" }, + { "piscan", cmd_scan, 0, + "Enable Page and Inquiry scan" }, + { "noscan", cmd_scan, 0, + "Disable scan" }, + { "iscan", cmd_scan, 0, + "Enable Inquiry scan" }, + { "pscan", cmd_scan, 0, + "Enable Page scan" }, + { "ptype", cmd_ptype, "[type]", + "Get/Set default packet type" }, + { "lm", cmd_lm, "[mode]", + "Get/Set default link mode" }, + { "lp", cmd_lp, "[policy]", + "Get/Set default link policy" }, + { "name", cmd_name, "[name]", + "Get/Set local name" }, + { "class", cmd_class, "[class]", + "Get/Set class of device" }, + { "voice", cmd_voice, "[voice]", + "Get/Set voice setting" }, + { "iac", cmd_iac, "[iac]", + "Get/Set inquiry access code" }, + { "inqtpl", cmd_inq_tpl, "[level]", + "Get/Set inquiry transmit power level" }, + { "inqmode", cmd_inq_mode, "[mode]", + "Get/Set inquiry mode" }, + { "inqdata", cmd_inq_data, "[data]", + "Get/Set inquiry data" }, + { "inqtype", cmd_inq_type, "[type]", + "Get/Set inquiry scan type" }, + { "inqparms", cmd_inq_parms, "[win:int]", + "Get/Set inquiry scan window and interval" }, + { "pageparms", cmd_page_parms, "[win:int]", + "Get/Set page scan window and interval" }, + { "pageto", cmd_page_to, "[to]", + "Get/Set page timeout" }, + { "afhmode", cmd_afh_mode, "[mode]", + "Get/Set AFH mode" }, + { "sspmode", cmd_ssp_mode, "[mode]", + "Get/Set Simple Pairing Mode" }, + { "aclmtu", cmd_aclmtu, "", + "Set ACL MTU and number of packets" }, + { "scomtu", cmd_scomtu, "", + "Set SCO MTU and number of packets" }, + { "delkey", cmd_delkey, "", + "Delete link key from the device" }, + { "oobdata", cmd_oob_data, 0, + "Get local OOB data" }, + { "commands", cmd_commands, 0, + "Display supported commands" }, + { "features", cmd_features, 0, + "Display device features" }, + { "version", cmd_version, 0, + "Display version information" }, + { "revision", cmd_revision, 0, + "Display revision information" }, + { "block", cmd_block, "", + "Add a device to the reject list" }, + { "unblock", cmd_unblock, "", + "Remove a device from the reject list" }, + { "lerandaddr", cmd_le_addr, "", + "Set LE Random Address" }, + { "leadv", cmd_le_adv, "[type]", + "Enable LE advertising" "\n\t\t\t0 - Connectable undirected advertising (default)" "\n\t\t\t3 - Non connectable undirected advertising"}, - { "noleadv", cmd_no_le_adv, 0, "Disable LE advertising" }, - { "lestates", cmd_le_states, 0, "Display the supported LE states" }, + { "noleadv", cmd_no_le_adv, 0, + "Disable LE advertising" }, + { "lestates", cmd_le_states, 0, + "Display the supported LE states" }, { NULL, NULL, 0 } }; diff --git a/tools/hciconfig.rst b/tools/hciconfig.rst index 7d59b4046e..2d56eeb413 100644 --- a/tools/hciconfig.rst +++ b/tools/hciconfig.rst @@ -216,24 +216,24 @@ revision Display revision information. lm [*mode*] - With no *mode*, prints link mode. **MASTER** or **SLAVE** mean, - respectively, to ask to become master or to remain slave when a connection - request comes in. The additional keyword **ACCEPT** means that baseband - connections will be accepted even if there are no listening *AF_BLUETOOTH* - sockets. *mode* is **NONE** or a comma-separated list of keywords, where - possible keywords are **MASTER** and **ACCEPT**. **NONE** sets link policy - to the default behaviour of remaining slave and not accepting baseband - connections when there are no listening *AF_BLUETOOTH* sockets. If - **MASTER** is present, the device will ask to become master if a - connection request comes in. If **ACCEPT** is present, the device will + With no *mode*, prints link mode. **CENTRAL** or **PERIPHERAL** mean, + respectively, to ask to become central or to remain peripheral when a + connection request comes in. The additional keyword **ACCEPT** means that + baseband connections will be accepted even if there are no listening + *AF_BLUETOOTH* sockets. *mode* is **NONE** or a comma-separated list of + keywords, where possible keywords are **CENTRAL** and **ACCEPT**. **NONE** + sets link policy to the default behaviour of remaining peripheral and not + accepting baseband connections when there are no listening *AF_BLUETOOTH* + sockets. If **CENTRAL** is present, the device will ask to become central + if a connection request comes in. If **ACCEPT** is present, the device will accept baseband connections even when there are no listening *AF_BLUETOOTH* sockets. block <*bdaddr*> - Add a device to the blacklist + Add a device to the reject list unblock <*bdaddr*> - Remove a device from the blacklist + Remove a device from the reject list lerandaddr <*bdaddr*> Set LE Random Address diff --git a/tools/hcitool.c b/tools/hcitool.c index c6a9093733..ab8246e13c 100644 --- a/tools/hcitool.c +++ b/tools/hcitool.c @@ -2512,7 +2512,7 @@ static void cmd_lescan(int dev_id, int argc, char **argv) scan_type = 0x00; /* Passive */ break; case 'w': - filter_policy = 0x01; /* Whitelist */ + filter_policy = 0x01; /* Accept list */ break; case 'd': filter_type = optarg[0]; @@ -2708,7 +2708,7 @@ static void cmd_lecc(int dev_id, int argc, char **argv) peer_bdaddr_type = LE_RANDOM_ADDRESS; break; case 'w': - initiator_filter = 0x01; /* Use white list */ + initiator_filter = 0x01; /* Use accept list */ break; default: printf("%s", lecc_help); @@ -2798,7 +2798,7 @@ static void cmd_lewladd(int dev_id, int argc, char **argv) if (err < 0) { err = -errno; - fprintf(stderr, "Can't add to white list: %s(%d)\n", + fprintf(stderr, "Can't add to accept list: %s(%d)\n", strerror(-err), -err); exit(1); } @@ -2844,7 +2844,7 @@ static void cmd_lewlrm(int dev_id, int argc, char **argv) if (err < 0) { err = errno; - fprintf(stderr, "Can't remove from white list: %s(%d)\n", + fprintf(stderr, "Can't remove from accept list: %s(%d)\n", strerror(err), err); exit(1); } @@ -2888,12 +2888,12 @@ static void cmd_lewlsz(int dev_id, int argc, char **argv) if (err < 0) { err = -errno; - fprintf(stderr, "Can't read white list size: %s(%d)\n", + fprintf(stderr, "Can't read accept list size: %s(%d)\n", strerror(-err), -err); exit(1); } - printf("White list size: %d\n", size); + printf("Accept list size: %d\n", size); } static struct option lewlclr_options[] = { @@ -2933,7 +2933,7 @@ static void cmd_lewlclr(int dev_id, int argc, char **argv) if (err < 0) { err = -errno; - fprintf(stderr, "Can't clear white list: %s(%d)\n", + fprintf(stderr, "Can't clear accept list: %s(%d)\n", strerror(-err), -err); exit(1); } @@ -3287,7 +3287,7 @@ static const char *lecup_help = "\t --handle=<0xXXXX> LE connection handle\n" "\t --min= Range: 0x0006 to 0x0C80\n" "\t --max= Range: 0x0006 to 0x0C80\n" - "\t --latency= Slave latency. Range: 0x0000 to 0x03E8\n" + "\t --latency= Peripheral latency. Range: 0x0000 to 0x03E8\n" "\t --timeout=