From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796336158; b=OQ+fRfIZRFaA0ZeNrOS+ofPTtN81nZeR8epBePRcDPXrjM+/btAoulwRFTTYHzTmeNRL xvlSYTqImPbCgtm2IwHEESfqUtR4KT89LZqPFFyjT54W5Gqw+Ww+IhQOdW10z1V6/MWbN 9yTM18X9qLAOOmoGWVzJy6RDd47qTCRHkbRPklalAsyN0CqYXyD82dZFMWqQcj6MOfmW6 972ejztBNUxfo9g4CIQy518wQT2ftzWfpiihxe9AJqGcGnR53d1LoigQw76vAzEDLUpCQ vu9k0BuBQLHFP+19KIIG8jnstiRx0f/h8PLzXQ5oGagUh+8tfatNMPEtXdkIokYnkFw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796336158; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=caEO8eW93mIAmZuT4w2qfRLenofxuny8yw/nJzKj06A=; b=ehBnrXEcMfne7lVX+Jgs5M23l8ZVqV+bGohFa/eVKiCmYqEh1nPMcB2c3O1WPrRhZVVm UtsdvPRn5i69LUXxWi5mm5+GOusVbCKCVXeJbGwXMAOeiO+Oyxc65M4g36EUYr1bir70b nq0b6wA9ca7dD4z4eHONH+SyAFiP2cum86XS6PrOyQqAVUbLn1L1EGia88lur+h6wfLhg /fTX/GH5pmIn1O/N45SgjjB05oORITBbALvyh89lwkIPYHy3tqPr1yLpXwLXj5kugMoO1 MjYUttUlJ9YbBn89q1eyCHP9ygKSQkuFzSBVVKiKLYYMsYI3510/t1latoPcpshNMww== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Xk1bYDsZ; arc=none smtp.remote-ip=209.85.128.46 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10E7B606A32F for ; Thu, 3 Dec 2026 22:15:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 10E7B606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Xk1bYDsZ Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4bb66245c51so175275e9.0 for ; Thu, 03 Dec 2026 14:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796336156; x=1796940956; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=caEO8eW93mIAmZuT4w2qfRLenofxuny8yw/nJzKj06A=; b=Xk1bYDsZz3kkCBzrLhAY4mguGEZv0HlAZgEqcos8hh2D1pQMyo/JhvF50CpZq9pMwv TRtelRrYoPxP3xLp6MqAxoOP2TFb/qJaCk16IpUC/JlT6g9+/Sptgpeq+dJoNo1KcHkw RUkJ8aU/u5lePUHIasIUaPG2thy5s5k50uL2qap41ZOby/9/3kZrS8MFjQRfdlYH2x8I tAeThx9vOLhZz5dYgQVo/AhW0O/w1cq8R/kC1XOhmS0dIPDPxUrJDbDyI087lfqM2MFw Sfgs25PZ2M5/LhiUkfCh4r7VwcB9z7UI9gWfNcAdiAJR3JxofHytpcxs67xIY8N7Dh5b o50Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796336156; x=1796940956; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=caEO8eW93mIAmZuT4w2qfRLenofxuny8yw/nJzKj06A=; b=OVTU1tRx0i3uPW/2D80ggYTLJ/UPEMCFj7Bg13JKtpacNjNzv9JnxlMbefZX3avPC7 NbfJk1WW6leMM3bCvFcsrVAv1TP2WyLL3WitJun+ildJhWZciT7J56dVQyfe0H5/kUJe ac7mUsUwp/QCaJO3tu7C1O2T+gpsYS4Hdo+BLLVCbw/eRzzsvnMDiwvCqj6J20AMBEgA SHYcUsKvW6mtlqY+ELqZqBB+UfbwauvF7ihvqum/ZENKLmGZe+ccTInmuN5N3fi/r/J4 +toWH26HXhSTJSoeAfpuK+QgLvq3IXJ6nSKxNROqxO5GlWP1fOUHNuRcIfMLa7A9l+37 p9rw== X-Gm-Message-State: APuU4Z8iU5tR+4O2iGAlJsKr62noJpQ+w2NhjdIQur03STmE2P0js30E D2YWOwKuUxrPorv2GT9QjLnpXX/hkTdxPgXsMtpJGM71fyOihQZzItEyT7Uo6r56 X-Gm-Gg: AZFdTZdGJGIkIKMRHNWVLzCP/5Q6UR4f1PP4DRyMlJbjfTAeOLkjs1BhqqxgUARTa/z 6uAGDdg/NXkeJuA8Gl2M9nzofBuqwWMDP+TOU68yKUkHctygncsPoqIhijD6O184wWM54ErjEFR 5vpvpNvmH8KeQ6eI0C2cPMcxrY1y9afuTxjbHSO0Y/2TDAtaj7X4lgyLtP2VKO6dJR3MOwvTHPQ rqmu4U9T1sfbNpOvlDhqWLRMmlkqgluUHhp8/wbB/8pokhFobkhk9U9g6g5+F6NC1f57hwlcNac AICS/YMy6iHx4WYNiGxODGbYsclqiOPLBENbtgBXlHvf7uBJtt98IBoAHkTzO0cbwSuC04G1buK zRbD6zp5FwIclN7X0gDBIm4Xpwb8m/9uBRS+GfLTyY7dYQl5yzxIrifXYCs61PEXj27uMYzpeGY mB1F++2aMV9D+J5urnRFcVojkWSp1j5jvC62c1CoBDYDAqQEXfNO05kh2t+b7xDkkKa+QyibViT 6Q0hmedGN9kG9ngDAN2CkXLb+w1OR67AliO8k6JYbO4uOGyFuWG9Igm7KIfA2pgqrbFI8uAheyN 1VJogLiN4vxYYkPVH+P0uMJ/gLMJVmrQf0N7CUvA3epvmo6K X-Received: by 2002:a5d:5f06:0:b0:4a5:14e5:db76 with SMTP id ffacd0b85a97d-4d1dcedf7fcmr481679f8f.0.1796336156419; Thu, 03 Dec 2026 14:15:56 -0800 (PST) Received: from schinder.fritz.box ([2001:9e8:b39a:7900:a13b:fe74:8c9c:c788]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d17435e11fsm1584273f8f.51.2026.12.03.14.15.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 14:15:56 -0800 (PST) From: Roland Schober To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, Roland Schober Subject: [RFC PATCH BlueZ v3 01/12] doc/mgmt: Add PA and PAwR commands and events Date: Thu, 3 Dec 2026 23:15:21 +0100 Message-ID: <20261203221532.682750-2-rolandschober1968@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261203221532.682750-1-rolandschober1968@gmail.com> References: <20261203221532.682750-1-rolandschober1968@gmail.com> X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 | 210 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) diff --git a/doc/mgmt-protocol.rst b/doc/mgmt-protocol.rst index c4e1421e3..5fdb6d8d6 100644 --- a/doc/mgmt-protocol.rst +++ b/doc/mgmt-protocol.rst @@ -4278,6 +4278,155 @@ Possible errors: :Invalid Index: :Not Supported: +Add Periodic Advertising Parameters +``````````````````````````````````` + +:Command Code: 0x005D +:Controller Index: +: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: +: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: +: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, +which takes the data of up to 15 subevents: 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 fails the command, and nothing is +transmitted in that subevent. Data for a subevent which was not requested, or +which has its data already, fails the command with Busy. + +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: +:Invalid Parameters: +:Invalid Index: + Events ------ @@ -5599,3 +5748,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: +: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: +: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