Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp659513ybl; Wed, 8 Jan 2020 03:49:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwFjQ1wVTEoc4JI3E/pdzu9Wg7gRcmiXb238w8UXloLxBYrhEaSiCxLIoN2S2g+4uLA/DPz X-Received: by 2002:a05:6830:1653:: with SMTP id h19mr3495054otr.305.1578484146162; Wed, 08 Jan 2020 03:49:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578484146; cv=none; d=google.com; s=arc-20160816; b=AjTMSIrcmacj3B3vEUNvpnjriRxmmxrgN7yecUvY6l3FMLi4As/q/MJhieBE77ouPp Su2+T8/R8lEv1O33JfnwjPx7oRHvojFcXsVBqYo1mkZDi4AKPspz/cc9F4euFORWQdgW caZC8k3A2NA6I0zB0wrA45kM3N0j1I4vU7lGwqF3Tt3ip45zlz6/ovrXW/ddB6ldSEzW tlg2WgiCgi3uN3C/Lm1syZ0snlbj/0sgHRvAP5nbDDi+6iYmOAcSmThlvYCrUpbSHYYD PhjgC5bNkzm1Fl/UedFDCmEAhXqhCdvpBCZiPrGTi+NBjyRboaf6q0tzYkZD4BbEVNbW 8QMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eHTrZ0QELKPawLm9od83NxjHR6BBZ+SXNdRLMQ7KZHQ=; b=z+HuWBqoTA108QZn786ZhSr2Pul3r/gL1kORSQ4YvpOkJQczDvsDENy1D467tCXTOa SwqlCExEge47N95+9IGymcKuwUlzPn4uV0HW34H34GsHdJMBY6uZ8QhNtY4Nf/Cf/WOB 1uOU0/kOBJzF88vwQOsaC/Qkj0bBAY23MfOlLw7UzK05dPH4L7ywnFp6A9bJ6RZgtzOI 3rO6JM40myUFkNLKmdujUMP8Eqwv9W0TIWh3NilqHYGr67yfq0bWN0YBxjDi4lquD4kh BjTiqzaSlamM/iRSg1Z/Gh6vOFVgGRxpkeiMulSdeHJaxkJtcHS3jW7w44ysEnMCw92G TfxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codecoup-pl.20150623.gappssmtp.com header.s=20150623 header.b=zQjc+9PX; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si1620383otj.148.2020.01.08.03.48.54; Wed, 08 Jan 2020 03:49:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codecoup-pl.20150623.gappssmtp.com header.s=20150623 header.b=zQjc+9PX; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbgAHLsB (ORCPT + 99 others); Wed, 8 Jan 2020 06:48:01 -0500 Received: from mail-lf1-f47.google.com ([209.85.167.47]:35779 "EHLO mail-lf1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727319AbgAHLsB (ORCPT ); Wed, 8 Jan 2020 06:48:01 -0500 Received: by mail-lf1-f47.google.com with SMTP id 15so2227488lfr.2 for ; Wed, 08 Jan 2020 03:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codecoup-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eHTrZ0QELKPawLm9od83NxjHR6BBZ+SXNdRLMQ7KZHQ=; b=zQjc+9PXWza/zCEThwk9gbouYpY3BKI7+XgUs0aUWb7/TgHqar/wTkNoPHLVeb+DiO pXc+GvpT4l8Wq2unstzm+p5+LKoBSJzDWMnTbypCWkFpngmJb23T1GgPWeY4gmq7qVSI Ly8ubPnoVbB04PjHc+6636fre3pWbz117M3Z21BDA462vz8iMXOo5BXFcY4TaUEYYgnK YKEOzbUYq4St9O7w8DwDnxU0ik/yDXluptPa/P6bQB0LmDWDEHiiOZSFPg6w0YO92lfs xy/bCyllK8IwhgdkE5bFb4BG0luW3Wj03p5mZKQplhYiqSgqQkansw5EJqXQnC3HRntP cNhA== 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=eHTrZ0QELKPawLm9od83NxjHR6BBZ+SXNdRLMQ7KZHQ=; b=bcjmJXe48KP0U9hUdLZAQsyLiVDxqWsLmf0fpzyhzPwlgB4HDFSyzIjhMR3wGhNX10 Ny6OA1mMUNqV1uUNL3tkYL+XaIdaQsh9pXfNZiZj5ClsXDNoEDm1FGOJ3eYKJrF1ZFCq hI/7wOI1RBXZHdEtxlsSOiPJXXav7wR2S9pqxockO/EbOuLdrfMFEo44t1IeA58EON8/ Y7xotaKkxxgDlohkXIwmmJYAJtlQKh1vgFWT9cNVcRg3Quy1mJB2OHMVlIIQ/QX4MOo5 G9X2ZvY3tQXq+V+ENcUZzu4zCo93aO2xJNWmor80d180hdqo4HZ2zBC6pL7QCZUznLL7 MyYQ== X-Gm-Message-State: APjAAAU8nL8h3A0kAYZHHhav7o+hZDGd62hTfQPVJFL86eaECs4HeYlP BURPzVIa9apb59p06ULE86jQWrwwEFc= X-Received: by 2002:a19:2213:: with SMTP id i19mr2573656lfi.83.1578484078857; Wed, 08 Jan 2020 03:47:58 -0800 (PST) Received: from tp480.int.codecoup.pl ([95.143.243.62]) by smtp.gmail.com with ESMTPSA id e17sm1130645ljg.101.2020.01.08.03.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 03:47:58 -0800 (PST) From: Szymon Czapracki To: linux-bluetooth@vger.kernel.org Cc: Szymon Czapracki Subject: [PATCH v2 3/8] monitor: Decode LE Set Periodic Advertising Receive Enable command Date: Wed, 8 Jan 2020 12:47:47 +0100 Message-Id: <20200108114752.133076-3-szymon.czapracki@codecoup.pl> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200108114752.133076-1-szymon.czapracki@codecoup.pl> References: <20200108114752.133076-1-szymon.czapracki@codecoup.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org < HCI Command: LE Periodic Advertising Receive Enable (0x08|0x0059) plen 3 Sync handle: 0 Reporting: Enabled (0x01) > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Receive Enable (0x08|0x0059) ncmd 1 Status: Unknown HCI Command (0x01) --- monitor/bt.h | 6 ++++++ monitor/packet.c | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/monitor/bt.h b/monitor/bt.h index e14c1771f..bb373b528 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -2461,6 +2461,12 @@ struct bt_hci_cmd_le_tx_test_v3 { uint8_t antenna_ids[0]; } __attribute__ ((packed)); +#define BT_HCI_CMD_SET_PERIODIC_ADV_REC_ENABLE 0x2059 +struct bt_hci_cmd_set_periodic_adv_rec_enable { + uint16_t sync_handle; + uint8_t enable; +} __attribute__ ((packed)); + #define BT_HCI_EVT_INQUIRY_COMPLETE 0x01 struct bt_hci_evt_inquiry_complete { uint8_t status; diff --git a/monitor/packet.c b/monitor/packet.c index 8e5219bef..e5681b5ff 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -7584,6 +7584,14 @@ static void le_tx_test_cmd_v3(const void *data, uint8_t size) print_field(" Antenna ID: %u", cmd->antenna_ids[i]); } +static void le_periodic_adv_rec_enable(const void *data, uint8_t size) +{ + const struct bt_hci_cmd_le_set_periodic_adv_enable *cmd = data; + + print_field("Sync handle: %d", cmd->handle); + print_enable("Reporting", cmd->enable); +} + struct opcode_data { uint16_t opcode; int bit; @@ -8377,6 +8385,9 @@ static const struct opcode_data opcode_table[] = { { 0x2050, 316, "LE Transmitter Test command [v3]", le_tx_test_cmd_v3, 9, false, status_rsp, 1, true }, + { 0x2059, 325, "LE Periodic Advertising Receive Enable", + le_periodic_adv_rec_enable, 3, true, + status_rsp, 1, true }, { } }; -- 2.24.1