From: Roland Schober <rolandschober1968@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: luiz.dentz@gmail.com, Roland Schober <rolandschober1968@gmail.com>
Subject: [RFC PATCH BlueZ 5/9] monitor: Add PAwR HCI definitions
Date: Fri, 27 Nov 2026 09:55:21 +0100 [thread overview]
Message-ID: <20261127085525.264299-6-rolandschober1968@gmail.com> (raw)
In-Reply-To: <20261127085525.264299-1-rolandschober1968@gmail.com>
Add the commands and events of Periodic Advertising with Responses to
bt.h, for the emulator. They are those of "monitor: Decode Periodic
Advertising with Responses", which adds the decoding.
Assisted-by: Claude:claude-fable-5-2
---
monitor/bt.h | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 174 insertions(+)
diff --git a/monitor/bt.h b/monitor/bt.h
index 59bc90ccd..1231f3e84 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -3032,6 +3032,90 @@ struct bt_hci_rsp_le_read_iso_link_quality {
uint32_t duplicated_packets;
} __packed;
+#define BT_HCI_CMD_LE_SET_PA_SUBEVENT_DATA 0x2082
+#define BT_HCI_BIT_LE_SET_PA_SUBEVENT_DATA BT_HCI_CMD_BIT(46, 5)
+struct bt_hci_le_pa_subevent_data {
+ uint8_t subevent;
+ uint8_t response_slot_start;
+ uint8_t response_slot_count;
+ uint8_t data_len;
+ uint8_t data[];
+} __packed;
+
+struct bt_hci_cmd_le_set_pa_subevent_data {
+ uint8_t handle;
+ uint8_t num_subevents;
+ struct bt_hci_le_pa_subevent_data subevents[];
+} __packed;
+
+struct bt_hci_rsp_le_set_pa_subevent_data {
+ uint8_t status;
+ uint8_t handle;
+} __packed;
+
+#define BT_HCI_CMD_LE_SET_PA_RESPONSE_DATA 0x2083
+#define BT_HCI_BIT_LE_SET_PA_RESPONSE_DATA BT_HCI_CMD_BIT(46, 6)
+struct bt_hci_cmd_le_set_pa_response_data {
+ uint16_t sync_handle;
+ uint16_t request_event;
+ uint8_t request_subevent;
+ uint8_t response_subevent;
+ uint8_t response_slot;
+ uint8_t data_len;
+ uint8_t data[];
+} __packed;
+
+struct bt_hci_rsp_le_set_pa_response_data {
+ uint8_t status;
+ uint16_t sync_handle;
+} __packed;
+
+#define BT_HCI_CMD_LE_SET_PA_SYNC_SUBEVENT 0x2084
+#define BT_HCI_BIT_LE_SET_PA_SYNC_SUBEVENT BT_HCI_CMD_BIT(46, 7)
+struct bt_hci_cmd_le_set_pa_sync_subevent {
+ uint16_t sync_handle;
+ uint16_t properties;
+ uint8_t num_subevents;
+ uint8_t subevents[];
+} __packed;
+
+struct bt_hci_rsp_le_set_pa_sync_subevent {
+ uint8_t status;
+ uint16_t sync_handle;
+} __packed;
+
+#define BT_HCI_CMD_LE_EXT_CREATE_CONN_V2 0x2085
+#define BT_HCI_BIT_LE_EXT_CREATE_CONN_V2 BT_HCI_CMD_BIT(47, 0)
+struct bt_hci_cmd_le_ext_create_conn_v2 {
+ uint8_t adv_handle;
+ uint8_t subevent;
+ uint8_t filter_policy;
+ uint8_t own_addr_type;
+ uint8_t peer_addr_type;
+ uint8_t peer_addr[6];
+ uint8_t phys;
+ uint8_t data[];
+} __packed;
+
+#define BT_HCI_CMD_LE_SET_PA_PARAMS_V2 0x2086
+#define BT_HCI_BIT_LE_SET_PA_PARAMS_V2 BT_HCI_CMD_BIT(47, 1)
+struct bt_hci_cmd_le_set_pa_params_v2 {
+ uint8_t handle;
+ uint16_t min_interval;
+ uint16_t max_interval;
+ uint16_t properties;
+ uint8_t num_subevents;
+ uint8_t subevent_interval;
+ uint8_t response_slot_delay;
+ uint8_t response_slot_spacing;
+ uint8_t num_response_slots;
+} __packed;
+
+struct bt_hci_rsp_le_set_pa_params_v2 {
+ uint8_t status;
+ uint8_t handle;
+} __packed;
+
#define BT_HCI_CMD_LE_READ_ALL_LOCAL_FEATURES 0x2087
#define BT_HCI_BIT_LE_READ_ALL_LOCAL_FEATURES BT_HCI_CMD_BIT(47, 2)
struct bt_hci_rsp_le_read_all_local_features {
@@ -4373,6 +4457,96 @@ struct bt_hci_evt_le_big_info_adv_report {
uint8_t encryption;
} __packed;
+#define BT_HCI_EVT_LE_PA_SYNC_ESTABLISHED_V2 0x24
+struct bt_hci_evt_le_per_sync_established_v2 {
+ uint8_t status;
+ uint16_t handle;
+ uint8_t sid;
+ uint8_t addr_type;
+ uint8_t addr[6];
+ uint8_t phy;
+ uint16_t interval;
+ uint8_t clock_accuracy;
+ uint8_t num_subevents;
+ uint8_t subevent_interval;
+ uint8_t response_slot_delay;
+ uint8_t response_slot_spacing;
+} __packed;
+
+#define BT_HCI_EVT_LE_PA_REPORT_V2 0x25
+struct bt_hci_le_pa_report_v2 {
+ uint16_t handle;
+ uint8_t tx_power;
+ int8_t rssi;
+ uint8_t cte_type;
+ uint16_t event_counter;
+ uint8_t subevent;
+ uint8_t data_status;
+ uint8_t data_len;
+ uint8_t data[];
+} __packed;
+
+#define BT_HCI_EVT_LE_PAST_RECEIVED_V2 0x26
+struct bt_hci_evt_le_past_recv_v2 {
+ uint8_t status;
+ uint16_t handle;
+ uint16_t service_data;
+ uint16_t sync_handle;
+ uint8_t sid;
+ uint8_t addr_type;
+ uint8_t addr[6];
+ uint8_t phy;
+ uint16_t interval;
+ uint8_t clock_accuracy;
+ uint8_t num_subevents;
+ uint8_t subevent_interval;
+ uint8_t response_slot_delay;
+ uint8_t response_slot_spacing;
+} __packed;
+
+#define BT_HCI_EVT_LE_PA_SUBEVENT_DATA_REQUEST 0x27
+struct bt_hci_evt_le_pa_subevent_data_request {
+ uint8_t handle;
+ uint8_t subevent_start;
+ uint8_t subevent_data_count;
+} __packed;
+
+#define BT_HCI_EVT_LE_PA_RESPONSE_REPORT 0x28
+struct bt_hci_le_pa_response {
+ int8_t tx_power;
+ int8_t rssi;
+ uint8_t cte_type;
+ uint8_t response_slot;
+ uint8_t data_status;
+ uint8_t data_len;
+ uint8_t data[];
+} __packed;
+
+struct bt_hci_evt_le_pa_response_report {
+ uint8_t handle;
+ uint8_t subevent;
+ uint8_t tx_status;
+ uint8_t num_responses;
+ struct bt_hci_le_pa_response responses[];
+} __packed;
+
+#define BT_HCI_EVT_LE_ENHANCED_CONN_COMPLETE_V2 0x29
+struct bt_hci_evt_le_enhanced_conn_complete_v2 {
+ uint8_t status;
+ uint16_t handle;
+ uint8_t role;
+ uint8_t peer_addr_type;
+ uint8_t peer_addr[6];
+ uint8_t local_rpa[6];
+ uint8_t peer_rpa[6];
+ uint16_t interval;
+ uint16_t latency;
+ uint16_t supv_timeout;
+ uint8_t clock_accuracy;
+ uint8_t adv_handle;
+ uint16_t sync_handle;
+} __packed;
+
#define BT_HCI_EVT_LE_READ_ALL_REMOTE_FEATURES_COMPLETE 0x2B
struct bt_hci_evt_le_read_all_remote_features_complete {
uint8_t status;
--
2.47.3
next prev parent reply other threads:[~2026-11-27 8:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 8:55 [RFC PATCH BlueZ 0/9] Periodic advertising and PAwR over MGMT Roland Schober
2026-11-27 8:55 ` [RFC PATCH BlueZ 1/9] doc/mgmt: Add periodic advertising and PAwR commands and events Roland Schober
2026-11-27 8:55 ` [RFC PATCH BlueZ 2/9] lib/mgmt: Add periodic advertising and PAwR definitions Roland Schober
2026-11-27 8:55 ` [RFC PATCH BlueZ 3/9] monitor: Decode periodic advertising and PAwR MGMT commands and events Roland Schober
2026-11-27 8:55 ` [RFC PATCH BlueZ 4/9] client/mgmt: Add pa-params, pa-data and pawr-serve commands Roland Schober
2026-11-27 8:55 ` Roland Schober [this message]
2026-11-27 8:55 ` [RFC PATCH BlueZ 6/9] monitor: Add Too Late and Too Early error code definitions Roland Schober
2026-11-27 8:55 ` [RFC PATCH BlueZ 7/9] emulator/btdev: Keep advertising sets with periodic advertising Roland Schober
2026-11-27 8:55 ` [RFC PATCH BlueZ 8/9] emulator/btdev: Add Periodic Advertising with Responses advertiser Roland Schober
2026-11-27 8:55 ` [RFC PATCH BlueZ 9/9] mgmt-tester: Add periodic advertising and PAwR tests Roland Schober
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127085525.264299-6-rolandschober1968@gmail.com \
--to=rolandschober1968@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox