Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp659512ybl; Wed, 8 Jan 2020 03:49:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwxioI51p+DPuVNAtDwNrkEjflTEeBDY9/NszFFkWKCSeWjvoOiGO8hZJSHM9UdFcPdoBDP X-Received: by 2002:a9d:7e8a:: with SMTP id m10mr3579427otp.27.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=ySKDdXoIX6iBnXeEnxt5aYwIkLlrTNZCwNQoWJv1WEYtAueMbDxVEC07ySODcVpQ1A jZWaIEA66LrjiN2DFbWCnroYJtIY0WHBLRSGh0Riu9a3U0xtYY54a/iK9lWMA0ecmENR 0pZxnSHBKGQw1BiP864ttCpFCOc996N/XTHh4YRHja/uP18NbUfaeDN+0ut/1JutnEAe 4d8e1gyf5ZEN2nSO+lLiwMYdJyskEsx8/dOMuHB5P2YjJ8fMOyogE5a29J9480qU0AHy K+KfiC3Dhs7QSd26cO1s6bNBfTMy1/Si7NbWbCyoUso0e1jfTFydg6b43CYB2JwPnlW6 7QGA== 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=UdqyouaOjE7Zju3IK+QZuvXswBq3t65LtLPxvilN7ak=; b=NH5+XxYCnNd0HI5a5TrCFaBbYogg5RPDLex21Vn1B5lQ9UeQvzXCWX/DDDTM3A37ak 8RSTyCRsGbHkr5usOrAhnUiDUgX6C9VnYvknQiIxR6Acm1CoZ1ZxM7tCI6GQmoHgbGhh cqEFZRXRPi2xSCu0D12OcUGmaKZ+HOBRwEy3C9E1Ry8aQTmyL1YTff2tvCrUEkArIu6B 9SfFGRL0rONgN+9/dT7BZgrlvyecIgwRmWUNykUDhXdOVVJkAlusWkFoqind/1hFyr97 LaA3VfXbpGxk7xuACkh0RdyrC4Reckdr3KeGbT6TfgQoHlW/1AzuCw/St61dfCLnqiNq Z08Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codecoup-pl.20150623.gappssmtp.com header.s=20150623 header.b=xjK8LfAp; 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 z18si1685809otq.121.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=xjK8LfAp; 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 S1727434AbgAHLsE (ORCPT + 99 others); Wed, 8 Jan 2020 06:48:04 -0500 Received: from mail-lf1-f51.google.com ([209.85.167.51]:44090 "EHLO mail-lf1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727380AbgAHLsE (ORCPT ); Wed, 8 Jan 2020 06:48:04 -0500 Received: by mail-lf1-f51.google.com with SMTP id v201so2186023lfa.11 for ; Wed, 08 Jan 2020 03:48:02 -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=UdqyouaOjE7Zju3IK+QZuvXswBq3t65LtLPxvilN7ak=; b=xjK8LfApqn0XIO1BFce0pumgu7QAzp4m9W5clxMrGM9SsBXUhdpJ/cqeiO7GTt80S2 7qHUZvWuRYug4tlbySogs2Pftr/ZYqVV95Zm5SK1HtKp08UVc8ImGEWtHPsHU6vW4Ced RWBkUQ5kB0Cx1QIyX7CdSEfkjzEc3/VWl+7tX8vOu1xUtSqIficlW7aEVgKQN7XPbE/+ TDZVLMb4uOOlTMevp33Vfg8QHHv8uFiIXdZrmCxIJA6VbF54nQoOERWOoLnk4UbFQFxA 4quCIgrhPDh84WsJohvzJVq9JbXMTap1XFf/CO7Rfssyw/s814te0Y/envYLa2eAOKlK PhWA== 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=UdqyouaOjE7Zju3IK+QZuvXswBq3t65LtLPxvilN7ak=; b=AIyxRPpEnLja1yjzZ1IYcoVpuu8CVGLjkkrNUU/0ojKBeMkLS5LzpM0P+WYtXl7FsF OSCU09Hbeu6PPBN9KHBtRHH6We9Wfwkz/nt9GHA3e4KJqaHphBbUG2cnDLjth8pWsxJQ 5xyDYKqrssYfAXEeXDQP4cm+bFJSG184Ed1AZJHqoRgPxf3IWLINhoU2EXyiV4kV+J5k 7s34YMiZpHhMs7F0OtQrszHwJAXXIZkXXVujkWx9vVunlw3pXVUMYJSkWr7juC/608Y6 LilgxCFpX99kwWuoLIe3qGnn5aqATIHcuZFKsrVFpQUa4HpLxo8BePr7iim4VSXJ6kOJ wF2w== X-Gm-Message-State: APjAAAWtvnrlFOYHowcpRaUNfeRUk0IntbmuUOXuhTyDN5SQsc/DUD33 cZlP8/LC6gKwbYCRpgNsL7bIAAenHZw= X-Received: by 2002:a19:ae18:: with SMTP id f24mr2660095lfc.155.1578484081602; Wed, 08 Jan 2020 03:48:01 -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.48.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 03:48:01 -0800 (PST) From: Szymon Czapracki To: linux-bluetooth@vger.kernel.org Cc: Szymon Czapracki Subject: [PATCH v2 5/8] monitor: Decode LE Periodic Advertising Set Info Transfer command Date: Wed, 8 Jan 2020 12:47:49 +0100 Message-Id: <20200108114752.133076-5-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 Set Info Transfer (0x08|0x005b) plen 5 Connection handle: 1 Service data: 0x0000 Advertising handle: 0 > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Set Info Transfer (0x08|0x005b) ncmd 1 Status: Unknown HCI Command (0x01) --- monitor/bt.h | 7 +++++++ monitor/packet.c | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/monitor/bt.h b/monitor/bt.h index efaf80f55..f8422ccc9 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -2474,6 +2474,13 @@ struct bt_hci_cmd_periodic_sync_trans { uint16_t sync_handle; } __attribute__ ((packed)); +#define BT_HCI_CMD_PERIODIC_ADV_SET_INFO_TRANS 0x205b +struct bt_hci_cmd_periodic_adv_set_info_trans { + uint16_t handle; + uint16_t service_data; + uint16_t adv_handle; +} __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 23eb48374..34b3d1895 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -7609,6 +7609,15 @@ static void le_periodic_adv_sync_trans(const void *data, uint8_t size) print_field("Sync handle: %d", cmd->sync_handle); } +static void le_periodic_adv_set_info_trans(const void *data, uint8_t size) +{ + const struct bt_hci_cmd_periodic_adv_set_info_trans *cmd = data; + + print_field("Connection handle: %d", cmd->handle); + print_field("Service data: 0x%4.4x", cmd->service_data); + print_field("Advertising handle: %d", cmd->adv_handle); +} + struct opcode_data { uint16_t opcode; int bit; @@ -8408,6 +8417,9 @@ static const struct opcode_data opcode_table[] = { { 0x205a, 326, "LE Periodic Advertising Sync Transfer", le_periodic_adv_sync_trans, 6, true, status_handle_rsp, 3, true }, + { 0x205b, 327, "LE Periodic Advertising Set Info Transfer", + le_periodic_adv_set_info_trans, 5, true, + status_handle_rsp, 3, true }, { } }; -- 2.24.1