Commit: cf7795a6ad50ab379bb6a0dceff2b0dc99ed5456
Parent: d94551190dd59aac3edcd387e64335406b066779
Author: Daniel Winkler <danielwinkler@google.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2020-10-30 02:45:17
Tree: dc2698fc6c9fd7914191cdebe7c6cc7bb2abb29d

advertising: Use new mgmt interface for advertising add This patch allows bluetoothd to use the new extended advertising add mgmt interface if it is available. The new interface will be used by default, as it allows the client to set advertising intervals, and tx power if the controller and kernel support extended advertising. Each new registered advertisement will submit two requests to kernel; the first sets the advertising parameters for the advertising instance, and the second sets the advertising data and scan response for the instance. The parameters MGMT request will return the tx power selected by the controller (if applicable), which is propagated to the client via a dbus Set method. Note: This patch also fixes a small bug in the packet monitor, where the tx power value 0xff is considered as "Host has no preference". However, the spec states this value to be 0x7f. It is corrected in this patch This change has been tested extensively on Hatch (extended advertising) and Kukui (no extended advertising) chromebooks. Manual tests do the following: - Configure advertisement with custom intervals, tx power with valid and invalid values and combinations - Ensure that with valid parameters, they are propagated and set in hci requests. With invalid parameters, ensure that the registration fails. Automatic tests verify 25 advertising usage scenarios involving single and multi-advertising registration, over-registration, parameter validation, etc. These tests don't test new intervals and tx power, but validate that the new MGMT interface does not regress compatibility in these 25 scenarios.

Diffstat

M lib/mgmt.h | 28 ++++++++++++++++++++++++++++
M monitor/packet.c | 4 ++- -
M src/advertising.c | 222 ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - - -

3 files changed, 237 insertions(+), 17 deletions(-)

View Full Diff | Patch