Expose extended adv feature support via bluez API
Subsystems (2)
cover Expose extended adv feature support via bluez API
Hi Maintainers,
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
Daniel Winkler (3):
PRE_UPSTREAM: advertising: Add SupportedFeatures to
LEAdvertisingManager1
PRE_UPSTREAM: advertising: Add adv SupportedFeatures to bluetoothctl
PRE_UPSTREAM: advertising: Add adv SupportedFeatures to doc
client/main.c | 1 + doc/advertising-api.txt | 18 +++++++++++++ lib/mgmt.h | 2 ++ src/advertising.c | 56 +++++++++++++++++++++++++++++++++++++++-- 4 files changed, 75 insertions(+), 2 deletions(-)
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
PATCH 1/3 PRE_UPSTREAM: 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 are populated when extended advertising is available only.
---
lib/mgmt.h | 2 ++ src/advertising.c | 56 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 2 deletions(-)
lib/mgmt.h +2 -0
@@ -516,6 +516,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_OP_REMOVE_ADVERTISING 0x003Fstruct mgmt_cp_remove_advertising {
src/advertising.c +54 -2
73 lines not on this page · raw message
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
RE: [Bluez,v1,1/3] PRE_UPSTREAM: advertising: Add SupportedFeatures to LEAdvertisingManager1
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. While we are preparing for reviewing the patches, we found the following issue/warning.
Test Result:
checkgitlint Failed
Outputs:
1: T1 Title exceeds max length (73>72): "PRE_UPSTREAM: advertising: Add SupportedFeatures to LEAdvertisingManager1"
---
Regards,
Linux Bluetooth
PATCH 2/3 PRE_UPSTREAM: advertising: Add adv SupportedFeatures to bluetoothctl
In reply to Daniel WinklerThis 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
---
client/main.c | 1 + 1 file changed, 1 insertion(+)
client/main.c +1 -0
@@ -933,6 +933,7 @@ static void cmd_show(int argc, char *argv[])print_property (adapter->ad_proxy,"SupportedInstances" );print_property (adapter->ad_proxy,"SupportedIncludes" );print_property (adapter->ad_proxy,"SupportedSecondaryChannels" ); +print_property (adapter->ad_proxy,"SupportedFeatures" ); }return bt_shell_noninteractive_quit (EXIT_SUCCESS );
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
PATCH 3/3 PRE_UPSTREAM: advertising: Add adv SupportedFeatures to doc
In reply to Daniel Winkler---
doc/advertising-api.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
doc/advertising-api.txt +18 -0
@@ -209,3 +209,21 @@ Properties byte ActiveInstances Possible values: "1M" "2M" "Coded" + + array{string} SupportedFeatures [readonly, optional] + + List of supported platform features. If no features + are available on the platform, the SupportedFeatures + endpoint will not be populated. + + 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.28.0.297.g1956fa8f8d-goog