From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796215977; b=iRQu1vYSEXfqVIcUboECJd9mDhvIgCJYA7meEL5kFoVhv1CI+9IHWFi6BWbKly0sSw82 BlYT4N/FEMtSx6z3OGLLL+KWvNLTeruAh8cIQzrTdd+z/Oqe9HRuBjfRjAa3yorSeqmny zDvlCBrahj/C8BcFDQ5G8+/5HzN92BxJvOUDH8rBqy41Ow9XQlIa6wNJ8WIcFKcT8Dinu pEiIBQuma+N+M1g2tcmUj1V+iB5K4K5oNE4A0yYL2I4C80yE0qCOxJ2IpuxhXWqNJxunq UTk0Ybftk/in+mJ7422oG+XlJJUG/RXZmaWo2t+vVsoE+t0L3S+ltRafxfeqWUUYfgw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796215977; 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=tvz2BnGD8YHLW3zsJWxegOExpF0Qyo8mserDZvUdwRY=; b=rrLoDNgzYlBZXTcU6dFsCXUVjimHPcETHTSuOX+kQSiy/129JFKETq1T4RUK4JN4BdDc PAgLrNM2ELJT38UDENbX8TVyUlE4MkrbRrrOGirXYKt6UiTM2r4YfE4gwiMAm1GF4SBip JZh20v6tSYPR1tmbBWMiweazexzzgD5XPb5g0ErIc1eBg+xyZkVt/uiZma0QK/fW49Qb3 H9WIwdWRiIzxntVk1TSq+EqLTkb7y6Jv+g4Y/e7yWM/6XKRcBhz108JVAb4NAsUfV/UTt R4aVv88z4zqpiMTr7PaZyk9po0aRTpqqDhR09z+JXkjxRvtJINqfZ8sXHrm7RuTjXLw== 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=s8ndzPmS; arc=none smtp.remote-ip=209.85.128.41 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 3FF96606A325 for ; Wed, 2 Dec 2026 12:52:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3FF96606A325 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=s8ndzPmS Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4a68f888a41so12345845e9.0 for ; Wed, 02 Dec 2026 04:52:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796215976; x=1796820776; 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=tvz2BnGD8YHLW3zsJWxegOExpF0Qyo8mserDZvUdwRY=; b=s8ndzPmS2mgVrMmej0Goc9IWqYa6uCKi5Nz/LBG8nVw+b/n2R+YE5LSTSCvl4r4coS 9hqoQjSnh82dS8gdZNTDIpSY2wV6gyEg+NGcUcQ2GpQlJ5bjOoDoC33V47gJvnB/NAYa CJUmPO6HlLhdybQWtzXVseavKnnikKtf5F+e67eahs7NmbRtmjAMDgqpnri6uMM2LmCC S80yKRL/pZ2q5yNXaAbSmZRScPpUZMqIDPvqr/Hu9133abIU94IMc7BYagcrLgBhA6gK AUcSsdZfnirNC+M1CQb33bGpdnNRKOw1jB524xPMa3HHOTo+IdRrHc9k7e1t/G06imcM 9huA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796215976; x=1796820776; 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=tvz2BnGD8YHLW3zsJWxegOExpF0Qyo8mserDZvUdwRY=; b=Y8yhnf0gFb6HLUh/N0xzu/oeNhkj22kP+wvZ771avWPh5jJYZAD+oDBDhOI5sQd7ht YMHbMgSGfje8UjWtBEA3fQLcNNzqTOffWZ/+/DvWUM9Dp+srwNjTw3NiJ0grpkKk7XRR GWc2FnqwL6mAR5SmbYiCIoARKOYf5QM2YORmMvkhCeWT/NBkquDFYtDa21wzq9WYhoIQ Ev/hKs2B8FAji+xF0HJd56u0M5klFcyXYgd7D1ZXnkmj70ONnB8ypsiCyVqLVOzoOhIw vNmtL5Z9+l0gqGfC2wIBTJ5PG5h0yZHJ/c8Tqqz4Ou7Ez6OZfFcahPRuW2GEQtv9D2Hs vWQA== X-Gm-Message-State: APuU4Z+MgpUECHERjXxtdWMA+M7qiE5A5it/maXKQuD0Gz9kJC/ajJC2 Qo+u5dvcru3Je9qZBEzxaFbbBbWftu8MbB/7tuTuelqvLGGGLfEqxDUWIwUDJXvc X-Gm-Gg: AZFdTZd1dtHNgiHUcK6ZQD3jcv2oHCVBOM2vPzHFTL9lL0j6XapkU0ATeVERmTyk5xc 1bkafTObn94PGLdVEJkmPeKdVlcSbqMB83daV+eENrazquwFIeqvGUvMxHOPBJI3JpX9MvvNEjy zDZYhsKZQbvtNxsoXx7px2XT3mTVKVvi1ICSXjZiOmh7y3QVbU9sYNeBrxPywOzDVw/5Dr8QDAI ydr2wMqdsrClSmczx8bieqlNvnBvFBYl0wdQe0h7s/jyOnX8QrvegB5BcvYebPxPr4J1okV4Q2j JiGWwZ3N3px6SilRGDQvywERz0vcNnGH3tu7vOQZIDj3lL0wbcdsVeC4YeqMZK0QwX4EQmxJiGN 7wOqL4RjxliU60Dz34xqMWpaiudlLziyO5rWlRKQOUOsQSjxCNY/6+HxrAVsp/ft6O0ibKzIihs eUHClVHyMRCCx7nyvSwo9j/sbi3q7HDCerg96+WibpifM8osOk8oFNF84IrrOJZVwIO+Es7GnXg gmGV7sgbAfviOAjANIrj3Cw6U0Om/WaEV+rh4RBgOxIhCYytxjQXlQvxpB5NNKS0yqhmfi2TE8g vvIWZOBOmHTOyDhkg2P8BgYRP7CzPA0jwwY= X-Received: by 2002:a05:600c:2909:b0:4bb:b39d:d447 with SMTP id 5b1f17b1804b1-4bbb39dd4famr275666855e9.1.1796215975643; Wed, 02 Dec 2026 04:52:55 -0800 (PST) Received: from schinder.corp.hoffmann-group.com ([2003:8:2:4::5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbb97e5356sm441538475e9.4.2026.12.02.04.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 04:52:55 -0800 (PST) From: Roland Schober To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, Roland Schober Subject: [RFC PATCH BlueZ v2 1/9] doc/mgmt: Add PA and PAwR commands and events Date: Wed, 2 Dec 2026 13:52:33 +0100 Message-ID: <20261202125241.348452-2-rolandschober1968@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261202125241.348452-1-rolandschober1968@gmail.com> References: <20261202125241.348452-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 | 208 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) diff --git a/doc/mgmt-protocol.rst b/doc/mgmt-protocol.rst index c4e1421e3..1bab75858 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: +: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, 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: +: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