From 499b4e0ce0b8171f5265c23ab8839eca6e5384c8 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Thu, 30 Jan 2020 18:44:46 +0100 Subject: [PATCH] Bluetooth: host: Document privacy-disabled directed advertising reports Document why a privacy-disabled scanner will not notify about directed advertising reports. This is the default behaviour of the privacy-disabled scanner. In order to receive the reports the option BT_SCAN_WITH_IDENTITY must be enabled. Signed-off-by: Joakim Andersson --- include/bluetooth/bluetooth.h | 7 +++++++ subsys/bluetooth/host/Kconfig | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/bluetooth/bluetooth.h b/include/bluetooth/bluetooth.h index 8f4f96d19c7..4662036adb4 100644 --- a/include/bluetooth/bluetooth.h +++ b/include/bluetooth/bluetooth.h @@ -509,6 +509,13 @@ struct bt_le_scan_cb { * Start LE scanning with given parameters and provide results through * the specified callback. * + * Note: The LE scanner by default does not use the Identity Address of the + * local device when :option:`CONFIG_BT_PRIVACY` is disabled. This is to + * prevent the active scanner from disclosing the identity information + * when requesting additional information from advertisers. + * In order to enable directed advertiser reports then + * :option:`CONFIG_BT_SCAN_WITH_IDENTITY` must be enabled. + * * @param param Scan parameters. * @param cb Callback to notify scan results. May be NULL if callback * registration through @ref bt_le_scan_cb_register is preferred. diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig index 663f21e476d..e6688b8fd1a 100644 --- a/subsys/bluetooth/host/Kconfig +++ b/subsys/bluetooth/host/Kconfig @@ -484,8 +484,10 @@ config BT_SCAN_WITH_IDENTITY Enable this if you want to perform active scanning using the local identity address as the scanner address. By default the stack will always use a non-resolvable private address (NRPA) in order to avoid - disclosing local identity information. However, if the use case - requires disclosing it then enable this option. + disclosing local identity information. By not scanning with the + identity address the scanner will receive directed advertise reports + for for the local identity. If this use case is required, then enable + this option. config BT_DEVICE_NAME_DYNAMIC bool "Allow to set Bluetooth device name on runtime"