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 2/9] lib/mgmt: Add periodic advertising and PAwR definitions
Date: Fri, 27 Nov 2026 09:55:18 +0100 [thread overview]
Message-ID: <20261127085525.264299-3-rolandschober1968@gmail.com> (raw)
In-Reply-To: <20261127085525.264299-1-rolandschober1968@gmail.com>
Add the MGMT commands and events for periodic advertising and Periodic
Advertising with Responses (PAwR):
- Add Periodic Advertising Parameters (0x005d)
- Add Periodic Advertising Data (0x005e)
- Set Periodic Advertising Subevent Data (0x005f)
- Periodic Advertising Subevent Data Request event (0x0035)
- Periodic Advertising Response Report event (0x0036)
Assisted-by: Claude:claude-fable-5-2
---
lib/bluetooth/mgmt.h | 74 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/lib/bluetooth/mgmt.h b/lib/bluetooth/mgmt.h
index af71be828..450d20afb 100644
--- a/lib/bluetooth/mgmt.h
+++ b/lib/bluetooth/mgmt.h
@@ -838,6 +838,49 @@ struct mgmt_cp_load_conn_subrate {
struct mgmt_conn_subrate params[];
} __packed;
+#define MGMT_OP_ADD_PERIODIC_ADV_PARAMS 0x005D
+struct mgmt_cp_add_periodic_adv_params {
+ uint8_t instance;
+ uint16_t min_interval;
+ uint16_t max_interval;
+ 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 mgmt_rp_add_periodic_adv_params {
+ uint8_t instance;
+} __packed;
+
+#define MGMT_OP_ADD_PERIODIC_ADV_DATA 0x005E
+struct mgmt_cp_add_periodic_adv_data {
+ uint8_t instance;
+ uint8_t data_len;
+ uint8_t data[];
+} __packed;
+struct mgmt_rp_add_periodic_adv_data {
+ uint8_t instance;
+} __packed;
+
+struct mgmt_pa_subevent_data {
+ uint8_t subevent;
+ uint8_t response_slot_start;
+ uint8_t response_slot_count;
+ uint8_t data_len;
+ uint8_t data[];
+} __packed;
+
+#define MGMT_OP_SET_PA_SUBEVENT_DATA 0x005F
+struct mgmt_cp_set_pa_subevent_data {
+ uint8_t instance;
+ uint8_t num_subevents;
+ uint8_t subevents[];
+} __packed;
+struct mgmt_rp_set_pa_subevent_data {
+ uint8_t instance;
+} __packed;
+
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
uint16_t opcode;
@@ -1156,6 +1199,32 @@ struct mgmt_ev_security_level_changed {
uint8_t tlv_data[];
} __packed;
+#define MGMT_EV_PA_SUBEVENT_DATA_REQUEST 0x0035
+struct mgmt_ev_pa_subevent_data_request {
+ uint8_t instance;
+ uint8_t subevent_start;
+ uint8_t subevent_data_count;
+} __packed;
+
+struct mgmt_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;
+
+#define MGMT_EV_PA_RESPONSE_REPORT 0x0036
+struct mgmt_ev_pa_response_report {
+ uint8_t instance;
+ uint8_t subevent;
+ uint8_t tx_status;
+ uint8_t num_responses;
+ uint8_t responses[];
+} __packed;
+
static const char *mgmt_op[] = {
"<0x0000>",
"Read Version",
@@ -1250,6 +1319,9 @@ static const char *mgmt_op[] = {
"Mesh Send Cancel",
"HCI Cmd Sync",
"Load Connection Subrate",
+ "Add Periodic Advertising Parameters",
+ "Add Periodic Advertising Data",
+ "Set Periodic Advertising Subevent Data",
};
static const char *mgmt_ev[] = {
@@ -1306,6 +1378,8 @@ static const char *mgmt_ev[] = {
"Mesh Packet Complete",
"Connection Subrate",
"Security Level Changed",
+ "Periodic Advertising Subevent Data Request",
+ "Periodic Advertising Response Report",
};
static const char *mgmt_status[] = {
--
2.47.3
next prev parent reply other threads:[~2026-11-27 8:55 UTC|newest]
Thread overview: 13+ 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 15:37 ` Periodic advertising and PAwR over MGMT bluez.test.bot
2026-11-27 8:55 ` Roland Schober [this message]
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 ` [RFC PATCH BlueZ 5/9] monitor: Add PAwR HCI definitions Roland Schober
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
2026-11-27 21:37 ` [RFC BlueZ 0/9] Periodic advertising and PAwR over MGMT Roland Schober
2026-12-01 15:43 ` Luiz Augusto von Dentz
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-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.