Linux bluetooth development
 help / color / mirror / Atom feed
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 1/9] doc/mgmt: Add periodic advertising and PAwR commands and events
Date: Fri, 27 Nov 2026 09:55:17 +0100	[thread overview]
Message-ID: <20261127085525.264299-2-rolandschober1968@gmail.com> (raw)
In-Reply-To: <20261127085525.264299-1-rolandschober1968@gmail.com>

Add Periodic Advertising Parameters makes an advertising instance
periodic and, with subevents, Periodic Advertising with Responses.
Add Periodic Advertising Data sets the data of a periodic advertising
train. Set Periodic Advertising Subevent Data and the events Periodic
Advertising Subevent Data Request and Periodic Advertising Response
Report carry the data of the subevents and the responses to them.

Assisted-by: Claude:claude-fable-5-2
---
 doc/mgmt-protocol.rst | 208 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 208 insertions(+)

diff --git a/doc/mgmt-protocol.rst b/doc/mgmt-protocol.rst
index c4e1421e3..899b5c6f5 100644
--- a/doc/mgmt-protocol.rst
+++ b/doc/mgmt-protocol.rst
@@ -4278,6 +4278,153 @@ Possible errors:
 :Invalid Index:
 :Not Supported:
 
+Add Periodic Advertising Parameters
+```````````````````````````````````
+
+:Command Code:		0x005D
+:Controller Index:	<controller id>
+:Command Parameters:	Instance (1 Octet)
+:...:			Min_Interval (2 Octets)
+:...:			Max_Interval (2 Octets)
+:...:			Num_Subevents (1 Octet)
+:...:			Subevent_Interval (1 Octet)
+:...:			Response_Slot_Delay (1 Octet)
+:...:			Response_Slot_Spacing (1 Octet)
+:...:			Num_Response_Slots (1 Octet)
+:Return Parameters:	Instance (1 Octet)
+
+This command is used to make an advertising instance a periodic advertising
+instance. The instance has to exist: the command is sent between Add Extended
+Advertising Parameters, which creates the instance, and Add Extended
+Advertising Data, which enables it:
+
+.. csv-table::
+	:header: "Step", "Command"
+	:widths: auto
+
+	1, Add Extended Advertising Parameters
+	2, Add Periodic Advertising Parameters
+	3, Add Periodic Advertising Data (optional)
+	4, Add Extended Advertising Data
+
+The instance must use one of the secondary channel flags (Secondary Channel
+with LE 1M, LE 2M or LE Coded) and must not be connectable.
+
+The Min_Interval and Max_Interval parameters specify the range of the periodic
+advertising interval in units of 1.25 ms (range: 0x0006 to 0xFFFF).
+
+A Num_Subevents of 0 makes the instance plain periodic advertising, and the
+remaining parameters are ignored. Any other value (range: 0x01 to 0x80) makes
+it Periodic Advertising with Responses, which requires the controller to
+support the Periodic Advertising with Responses - Advertiser feature. The
+remaining parameters are then those of the HCI command LE Set Periodic
+Advertising Parameters [v2]:
+
+.. csv-table::
+	:header: "Parameter", "Unit", "Description"
+	:widths: auto
+
+	Subevent_Interval, 1.25 ms, Time between the subevents of one periodic advertising event
+	Response_Slot_Delay, 1.25 ms, Time from the start of a subevent to its first response slot
+	Response_Slot_Spacing, 0.125 ms, Time between the starts of two response slots
+	Num_Response_Slots, , Number of response slots of a subevent
+
+The controller checks these values against each other and against the
+interval. The data of the subevents is requested with the Periodic Advertising
+Subevent Data Request event.
+
+Remove Advertising stops the periodic advertising and removes the instance.
+
+This command can only be used when the controller is powered.
+
+This command generates a Command Complete event on success or a Command Status
+event on failure.
+
+Possible errors:
+
+:Failed:
+:Busy:
+:Rejected:
+:Not Supported:
+:Invalid Parameters:
+:Invalid Index:
+
+Add Periodic Advertising Data
+`````````````````````````````
+
+:Command Code:		0x005E
+:Controller Index:	<controller id>
+:Command Parameters:	Instance (1 Octet)
+:...:			Data_Length (1 Octet)
+:...:			Data (0-252 Octets)
+:Return Parameters:	Instance (1 Octet)
+
+This command is used to set the data of the periodic advertising train of an
+instance which was made periodic with Add Periodic Advertising Parameters. It
+may be sent again to change the data while the train is running.
+
+The Data parameter holds advertising data structures, each with its length
+and type. The kernel does not add anything to it.
+
+An instance with Periodic Advertising with Responses has no such data: the
+data of its subevents is set with Set Periodic Advertising Subevent Data.
+
+This command can only be used when the controller is powered.
+
+This command generates a Command Complete event on success or a Command Status
+event on failure.
+
+Possible errors:
+
+:Failed:
+:Rejected:
+:Invalid Parameters:
+:Invalid Index:
+
+Set Periodic Advertising Subevent Data
+``````````````````````````````````````
+
+:Command Code:		0x005F
+:Controller Index:	<controller id>
+:Command Parameters:	Instance (1 Octet)
+:...:			Num_Subevents (1 Octet)
+:...:			Subevent[] (1 Octet)
+:...:			Response_Slot_Start[] (1 Octet)
+:...:			Response_Slot_Count[] (1 Octet)
+:...:			Data_Length[] (1 Octet)
+:...:			Data[] (variable)
+:...:			...[]
+:Return Parameters:	Instance (1 Octet)
+
+This command is used to set the data of subevents of an instance with
+Periodic Advertising with Responses. It is the answer to the Periodic
+Advertising Subevent Data Request event and may hold the data of any number of
+the requested subevents.
+
+The Response_Slot_Start and Response_Slot_Count parameters specify the
+response slots of the subevent the controller listens to. A count of 0 means
+that no response is expected.
+
+All entries of one command are sent to the controller in a single HCI command:
+the entries, each with its four octets of header, are limited to 253 octets
+in total.
+
+The controller accepts the data of a subevent only for a limited time before
+the subevent. Data which arrives too late, or for a subevent which was not
+requested, fails the command, and nothing is transmitted in that subevent.
+
+This command can only be used when the controller is powered.
+
+This command generates a Command Complete event on success or a Command Status
+event on failure.
+
+Possible errors:
+
+:Failed:
+:Rejected:
+:Invalid Parameters:
+:Invalid Index:
+
 Events
 ------
 
@@ -5599,3 +5746,64 @@ Possible values for the Encryption type:
 	0x02, AES-CCM encryption
 
 This event will be sent to all management sockets.
+
+Periodic Advertising Subevent Data Request
+``````````````````````````````````````````
+
+:Event Code:		0x0035
+:Controller Index:	<controller id>
+:Event Parameters:	Instance (1 Octet)
+:...:			Subevent_Start (1 Octet)
+:...:			Subevent_Data_Count (1 Octet)
+
+This event indicates that the controller is ready to accept the data of
+Subevent_Data_Count subevents of an instance with Periodic Advertising with
+Responses, starting with the subevent Subevent_Start and wrapping to subevent
+0 after the last one. The data is set with the Set
+Periodic Advertising Subevent Data command.
+
+This event will be sent to all management sockets.
+
+Periodic Advertising Response Report
+````````````````````````````````````
+
+:Event Code:		0x0036
+:Controller Index:	<controller id>
+:Event Parameters:	Instance (1 Octet)
+:...:			Subevent (1 Octet)
+:...:			TX_Status (1 Octet)
+:...:			Num_Responses (1 Octet)
+:...:			TX_Power[] (1 Octet)
+:...:			RSSI[] (1 Octet)
+:...:			CTE_Type[] (1 Octet)
+:...:			Response_Slot[] (1 Octet)
+:...:			Data_Status[] (1 Octet)
+:...:			Data_Length[] (1 Octet)
+:...:			Data[] (variable)
+:...:			...[]
+
+This event reports the responses received in the response slots of a subevent
+of an instance with Periodic Advertising with Responses.
+
+Possible values for the TX_Status parameter:
+
+.. csv-table::
+	:header: "Value", "Description"
+	:widths: auto
+
+	0x00, The subevent was transmitted
+	0x01, The subevent was not transmitted
+
+The parameters of a response are those of the HCI event LE Periodic
+Advertising Response Report. TX_Power and RSSI are in dBm, with 0x7F for a
+value which is not available. Possible values for the Data_Status parameter:
+
+.. csv-table::
+	:header: "Value", "Description"
+	:widths: auto
+
+	0x00, Data complete
+	0x01, "Data incomplete, more data to come"
+	0xFF, Failed to receive the response
+
+This event will be sent to all management sockets.
-- 
2.47.3


  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 ` Roland Schober [this message]
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 ` [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

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-2-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