Bluetooth: host: Allow get local OOB data while advertiser is enabled

Allow to get local OOB data while advertiser, scanner or whitelist
initiator is active. If direct initiator is active or the advertiser
is using the random address as a random static identity address then
the function will return error.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2020-03-10 14:16:43 +01:00 committed by Johan Hedberg
commit 628b3bc416
2 changed files with 65 additions and 23 deletions

View file

@ -652,6 +652,14 @@ struct bt_le_oob {
* :option:`CONFIG_BT_RPA_TIMEOUT` seconds. This address will be used for
* advertising, active scanning and connection creation.
*
* @note If privacy is enabled the RPA cannot be refreshed in the following
* cases:
* - Creating a connection in progress, wait for the connected callback.
* - Advertiser is enabled using a Random Static Identity Address for a
* different local identity.
* - The local identity conflicts with the local identity used by other
* roles.
*
* @param[in] id Local identity, in most cases BT_ID_DEFAULT.
* @param[out] oob LE OOB information
*