Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 1/2] doc/mgmt: Document Advertising setting as Global Advertising
@ 2026-10-05 15:21 Luiz Augusto von Dentz
  2026-10-05 15:21 ` [PATCH BlueZ v1 2/2] mgmt-tester: Add Global Advertising tests for extended advertising Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2026-10-05 15:21 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

The Advertising setting always uses instance 0, and with extended
advertising it has a dedicated advertising set, so only instances
sharing that set are overridden by it; the others are advertised
concurrently and removing instances never disables it.

Assisted-by: OpenCode:claude-opus-5.5
---
 doc/mgmt-protocol.rst | 70 +++++++++++++++++++++++++++++--------------
 1 file changed, 47 insertions(+), 23 deletions(-)

diff --git a/doc/mgmt-protocol.rst b/doc/mgmt-protocol.rst
index f4c6822bfec1..ed2bd3349f25 100644
--- a/doc/mgmt-protocol.rst
+++ b/doc/mgmt-protocol.rst
@@ -306,7 +306,7 @@ following available bits:
     7, Basic Rate/Enhanced Data Rate
     8, High Speed
     9, Low Energy
-    10, Advertising
+    10, Advertising (Global Advertising - instance 0)
     11, Secure Connections
     12, Debug Keys
     13, Privacy
@@ -1714,6 +1714,12 @@ Set Advertising (since 1.4)
 :Return Parameters:	Current_Settings (4 Octets)
 
 This command is used to enable LE advertising on a controller that supports it.
+This is referred to as Global Advertising and it always uses advertising
+instance 0, its advertising data is generated by the kernel based on the
+current settings (e.g. Flags, TX Power, Local Name and Appearance) and is not
+related to the advertising instances added with Add Advertising or Add
+Extended Advertising Parameters/Data commands, which start at instance 1.
+
 The allowed values for the Advertising command parameter are:
 
 .. csv-table::
@@ -1742,10 +1748,20 @@ The value 0x02 should be the preferred mode of operation when implementing
 peripheral mode.
 
 Using this command will temporarily deactivate any configuration made by the Add
-Advertising command. This command takes precedence. Once a Set Advertising
-command with value 0x00 is issued any previously made configurations via
-Add/Remove Advertising, including such changes made while Set Advertising was
-active, will be re-enabled.
+Advertising command that shares the same advertising set as Global Advertising.
+This command takes precedence. Once a Set Advertising command with value 0x00
+is issued any previously made configurations via Add/Remove Advertising,
+including such changes made while Set Advertising was active, will be
+re-enabled.
+
+If the controller does not support extended advertising, there is only a single
+advertising set, so all instances are deactivated while Global Advertising is
+enabled. If the controller supports extended advertising, Global Advertising
+uses a dedicated advertising set (handle 0x00) so instances using other
+advertising sets continue to be advertised concurrently and are not affected
+by this command. Only an instance that would need to share the advertising
+set of Global Advertising (e.g. when the controller supports a single
+advertising set) is deactivated.
 
 A pre-requisite is that LE is already enabled, otherwise this command will
 return a "rejected" response.
@@ -2757,10 +2773,12 @@ This command is used to configure an advertising instance that can be used to
 switch a Bluetooth Low Energy controller into advertising mode.
 
 Added advertising information with this command will not be visible immediately
-if advertising is enabled via the Set Advertising command. The usage of the Set
-Advertising command takes precedence over this command. Instance information is
-stored and will be advertised once advertising via Set Advertising has been
-disabled.
+if Global Advertising is enabled via the Set Advertising command and the
+instance shares the same advertising set (see Set Advertising command). The
+usage of the Set Advertising command takes precedence over this command.
+Instance information is stored and will be advertised once advertising via Set
+Advertising has been disabled. If the controller supports extended advertising
+the instance is advertised concurrently with Global Advertising.
 
 The Instance identifier is a value between 1 and the number of supported
 instances. The value 0 is reserved.
@@ -2880,10 +2898,12 @@ When the Instance parameter is zero, then all previously added advertising
 Instances will be removed.
 
 Removing advertising information with this command will not be visible as long
-as advertising is enabled via the Set Advertising command. The usage of the Set
-Advertising command takes precedence over this command. Changes to Instance
-information are stored and will be advertised once advertising via Set
-Advertising has been disabled.
+as Global Advertising is enabled via the Set Advertising command and the
+instance shares the same advertising set (see Set Advertising command). The
+usage of the Set Advertising command takes precedence over this command.
+Changes to Instance information are stored and will be advertised once
+advertising via Set Advertising has been disabled. Removing instances never
+disables Global Advertising.
 
 Removing an instance while it is being advertised will immediately cancel the
 instance, even when it has been advertised less then its configured Timeout or
@@ -3048,7 +3068,7 @@ currently the following available bits:
 	7, Basic Rate/Enhanced Data Rate
 	8, High Speed
 	9, Low Energy
-	10, Advertising
+	10, Advertising (Global Advertising - instance 0)
 	11, Secure Connections
 	12, Debug Keys
 	13, Privacy
@@ -3779,10 +3799,12 @@ advertising instance. This command is expected to be followed by an Add Extended
 Advertising Data command to complete and enable the advertising instance.
 
 Added advertising information with this command will not be visible immediately
-if advertising is enabled via the Set Advertising command. The usage of the Set
-Advertising command takes precedence over this command. Instance information is
-stored and will be advertised once advertising via Set Advertising has been
-disabled.
+if Global Advertising is enabled via the Set Advertising command and the
+instance shares the same advertising set (see Set Advertising command). The
+usage of the Set Advertising command takes precedence over this command.
+Instance information is stored and will be advertised once advertising via Set
+Advertising has been disabled. If the controller supports extended advertising
+the instance is advertised concurrently with Global Advertising.
 
 The Instance identifier is a value between 1 and the number of supported
 instances. The value 0 is reserved.
@@ -3936,11 +3958,13 @@ advertisement registration process.
 
 If extended advertising is available, this call will initiate HCI commands to
 set the instance's advertising data, set scan response data, and then enable the
-instance. If extended advertising is unavailable, the advertising instance
-structure maintained in kernel will have its advertising data and scan response
-updated, and the instance will either be scheduled immediately or left in the
-queue for later advertisement as part of round-robin advertisement rotation in
-software.
+instance, regardless of Global Advertising being enabled via Set Advertising
+command, unless the instance shares the same advertising set (see Set
+Advertising command). If extended advertising is unavailable, the advertising
+instance structure maintained in kernel will have its advertising data and scan
+response updated, and the instance will either be scheduled immediately or left
+in the queue for later advertisement as part of round-robin advertisement
+rotation in software, or until Global Advertising is disabled.
 
 If Scan_Rsp_Len is zero and the flags defined in Add Extended Advertising
 Parameters command do not have connectable flag set and the global connectable
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-06 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 15:21 [PATCH BlueZ v1 1/2] doc/mgmt: Document Advertising setting as Global Advertising Luiz Augusto von Dentz
2026-10-05 15:21 ` [PATCH BlueZ v1 2/2] mgmt-tester: Add Global Advertising tests for extended advertising Luiz Augusto von Dentz
2026-10-05 20:18 ` [BlueZ,v1,1/2] doc/mgmt: Document Advertising setting as Global Advertising bluez.test.bot
2026-10-06 16:53 ` [PATCH BlueZ v1 1/2] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox