Bluetooth: host: Add support for multiple advertising set
Add support for multiple advertising set. Move the advertising state flags to be per advertising set and loop over advertising sets instead of looking up legacy advertiser set or handle 0. Since it is not certain that the advertising set terminated event can arrive directly after the connection complete event there is currently a limitation that there can only be one local identity used by connectable advertisers at a time. This guarantees that we know the local identity being used in the connection complete event. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
bfd2f6e928
commit
d4f22a8216
7 changed files with 403 additions and 317 deletions
|
@ -434,7 +434,16 @@ enum {
|
|||
|
||||
/** LE Advertising Parameters. */
|
||||
struct bt_le_adv_param {
|
||||
/** Local identity */
|
||||
/** Local identity.
|
||||
*
|
||||
* @note When extended advertising :option:`CONFIG_BT_EXT_ADV` is not
|
||||
* enabled or not supported by the controller it is not possible
|
||||
* to scan and advertise simultaneously using two different
|
||||
* random addresses.
|
||||
*
|
||||
* @note It is not possible to have multiple connectable advertising
|
||||
* sets advertising simultaneously using different identities.
|
||||
*/
|
||||
u8_t id;
|
||||
|
||||
/** Advertising Set Identifier, valid range 0x00 - 0x0f.
|
||||
|
@ -1038,7 +1047,7 @@ struct bt_le_oob {
|
|||
* cases:
|
||||
* - Creating a connection in progress, wait for the connected callback.
|
||||
* In addition when extended advertising :option:`CONFIG_BT_EXT_ADV` is
|
||||
* not enabled or supported by the controller:
|
||||
* not enabled or not supported by the controller:
|
||||
* - 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
|
||||
|
|
|
@ -622,8 +622,8 @@ struct bt_conn_cb {
|
|||
* @ref bt_conn_le_create_param timeout parameter, which defaults to
|
||||
* :option:`CONFIG_BT_CREATE_CONN_TIMEOUT` seconds.
|
||||
* - @p BT_HCI_ERR_ADV_TIMEOUT High duty cycle directed connectable
|
||||
* advertiser started by @ref bt_le_adv_start or bt_le_ext_adv_start
|
||||
* failed to be connected within the timeout.
|
||||
* advertiser started by @ref bt_le_adv_start failed to be connected
|
||||
* within the timeout.
|
||||
*/
|
||||
void (*connected)(struct bt_conn *conn, u8_t err);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue