Skip to contentSkip to conversation

Expose extended adv feature support via bluez API

PATCH Applied Daniel Winkler 3 participants 6 messages Mar 16, 2021 – Mar 17, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v4 cover Expose extended adv feature support via bluez API

Hi Maintainers,

I believe this series fell through the cracks. It is listed on patchworks as "Accepted", but I have not been able to find it in the tree. I am re-posting it here, please advise if I am mistaken.

This change adds a SupportedFeatures member to the LEAdvertisingManager interface, which allows us to expose support for hardware offloading and setting TX power on advertisements.

Best,
Daniel

Changes in v4:
- Mark SupportedFeatures as experimental

Changes in v3:
- Rebased onto master

Changes in v2:
- Expose empty SupportedFeatures if no support available
- Doc: Expect empty SupportedFeatures if no support available

Daniel Winkler (3):
advertising: Add SupportedFeatures to LEAdvertisingManager1
client: Add adv SupportedFeatures to bluetoothctl doc/advertising-api: Add adv SupportedFeatures to doc

 client/main.c           |  1 +
 doc/advertising-api.txt | 18 +++++++++++++++++
 lib/mgmt.h              |  2 ++
 src/advertising.c       | 44 +++++++++++++++++++++++++++++++++++++++--
 4 files changed, 63 insertions(+), 2 deletions(-)
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog
#1 lore raw

PATCH v4 1/3 advertising: Add SupportedFeatures to LEAdvertisingManager1

The new SupportedFeatures member tells advertising clients whether the platform has hardware support for advertising or capability to set tx power of advertisements.

Additionally, fix small typo in "secondary_exists" function name.

Change is tested on hatch and kukui chromebooks by using dbus-send to verify that SupportedFeatures always exists, and is only populated when extended advertising is available.

---

Changes in v4:
- Mark SupportedFeatures as experimental

Changes in v3: None
Changes in v2:
- Expose empty SupportedFeatures if no support available

 lib/mgmt.h        |  2 ++
 src/advertising.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 44 insertions(+), 2 deletions(-)
lib/mgmt.h +2 -0
index 76a03c9c2..c0021abd8 100644
@@ -503,6 +503,8 @@ struct mgmt_rp_add_advertising {
 #define MGMT_ADV_FLAG_SEC_1M		(1 << 7)
 #define MGMT_ADV_FLAG_SEC_2M		(1 << 8)
 #define MGMT_ADV_FLAG_SEC_CODED		(1 << 9)
+#define MGMT_ADV_FLAG_CAN_SET_TX_POWER	(1 << 10)
+#define MGMT_ADV_FLAG_HW_OFFLOAD	(1 << 11)
 #define MGMT_ADV_PARAM_DURATION		(1 << 12)
 #define MGMT_ADV_PARAM_TIMEOUT		(1 << 13)
 #define MGMT_ADV_PARAM_INTERVALS	(1 << 14)
src/advertising.c +42 -2

62 lines not on this page · raw message

Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog
#2 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=449579

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS

---
Regards,
Linux Bluetooth

#3 lore raw

PATCH v4 2/3 client: Add adv SupportedFeatures to bluetoothctl

In reply to Daniel Winkler

This change adds SupportedFeatures to be shown in "show" option of bluetoothctl. It was tested with and without kernel support for features to verify that they are shown or not shown correctly.

Change was tested by verifying SupportedFeatures were populated correctly in bluetoothctl on hatch and kukui chromebooks

---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 client/main.c | 1 +
 1 file changed, 1 insertion(+)
client/main.c +1 -0
index 79658a463..1669d2c89 100644
@@ -942,6 +942,7 @@ static void cmd_show(int argc, char *argv[])
 		print_property(adapter->ad_proxy, "SupportedIncludes");
 		print_property(adapter->ad_proxy, "SupportedSecondaryChannels");
 		print_property(adapter->ad_proxy, "SupportedCapabilities");
+		print_property(adapter->ad_proxy, "SupportedFeatures");
 	}
 
 	if (adapter->adv_monitor_proxy) {
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog
#4 lore raw

PATCH v4 3/3 doc/advertising-api: Add adv SupportedFeatures to doc

In reply to Daniel Winkler

Add supported features to advertising dbus api.

---

Changes in v4: None
Changes in v3:
- Rebased onto master

Changes in v2:
- Doc: Expect empty SupportedFeatures if no support available

 doc/advertising-api.txt | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
doc/advertising-api.txt +18 -0
index 541c57004..6c0e52358 100644
@@ -257,3 +257,21 @@ Properties	byte ActiveInstances
 				int16 MaxTxPower
 
 					Max advertising tx power (dBm)
+
+		array{string} SupportedFeatures [readonly,optional,Experimental]
+
+			List of supported platform features. If no features
+			are available on the platform, the SupportedFeatures
+			array will be empty.
+
+			Possible values: "CanSetTxPower"
+
+						Indicates whether platform can
+						specify tx power on each
+						advertising instance.
+
+					 "HardwareOffload"
+
+						Indicates whether multiple
+						advertising will be offloaded
+						to the controller.
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog
maintainer Applied
#5 lore raw
In reply to Daniel Winkler

Hi Daniel,

Quoted 29 lines · Daniel Winkler

Hi Maintainers,

I believe this series fell through the cracks. It is listed on patchworks as "Accepted", but I have not been able to find it in the tree. I am re-posting it here, please advise if I am mistaken.

This change adds a SupportedFeatures member to the LEAdvertisingManager interface, which allows us to expose support for hardware offloading and setting TX power on advertisements.

Best,
Daniel

Changes in v4:
- Mark SupportedFeatures as experimental

Changes in v3:
- Rebased onto master

Changes in v2:
- Expose empty SupportedFeatures if no support available
- Doc: Expect empty SupportedFeatures if no support available

Daniel Winkler (3):
advertising: Add SupportedFeatures to LEAdvertisingManager1
client: Add adv SupportedFeatures to bluetoothctl doc/advertising-api: Add adv SupportedFeatures to doc

Quoted 8 lines
 client/main.c           |  1 +
 doc/advertising-api.txt | 18 +++++++++++++++++
 lib/mgmt.h              |  2 ++
 src/advertising.c       | 44 +++++++++++++++++++++++++++++++++++++++--
 4 files changed, 63 insertions(+), 2 deletions(-)

--
2.31.0.rc2.261.g7f71774620-goog

Applied, thanks.

Signature · 1 line
Luiz Augusto von Dentz