From 1454c6f1d58d6812a77aacbc7eae96a0b34124ef Mon Sep 17 00:00:00 2001 From: Chienyuan Date: Tue, 3 Nov 2020 20:56:56 +0800 Subject: [PATCH] gd: Refactor LE advertising config Tag: #gd-refactor Bug: 169125803 Test: cert/run --host Test: atest --host bluetooth_test_gd Change-Id: I06ef138d9325c404bdc1c57fed2149ae36964e36 --- gd/facade/common.proto | 7 ++++ gd/hci/cert/le_acl_manager_test.py | 4 +-- gd/hci/cert/le_advertising_manager_test.py | 4 +-- gd/hci/cert/le_scanning_manager_test.py | 4 +-- gd/hci/cert/le_scanning_with_security_test.py | 4 +-- gd/hci/facade/le_advertising_manager_facade.cc | 4 +-- gd/hci/facade/le_advertising_manager_facade.proto | 4 +-- gd/hci/hci_packets.pdl | 18 +++++----- gd/hci/le_advertising_manager.cc | 40 ++++++++++------------- gd/hci/le_advertising_manager.h | 8 ++--- gd/hci/le_advertising_manager_test.cc | 20 ++++++------ gd/l2cap/le/cert/dual_l2cap_test.py | 4 +-- gd/l2cap/le/cert/le_l2cap_test.py | 8 ++--- gd/security/cert/le_security_test.py | 8 ++--- main/shim/le_advertising_manager.cc | 2 -- 15 files changed, 68 insertions(+), 71 deletions(-) diff --git a/gd/facade/common.proto b/gd/facade/common.proto index b1176a4d5..92bddb589 100644 --- a/gd/facade/common.proto +++ b/gd/facade/common.proto @@ -13,6 +13,13 @@ enum BluetoothAddressTypeEnum { RANDOM_IDENTITY_ADDRESS = 0x3; } +enum BluetoothOwnAddressTypeEnum { + USE_PUBLIC_DEVICE_ADDRESS = 0x0; + USE_RANDOM_DEVICE_ADDRESS = 0x1; + RESOLVABLE_OR_PUBLIC_ADDRESS = 0x2; + RESOLVABLE_OR_RANDOM_ADDRESS = 0x3; +} + message BluetoothAddressWithType { BluetoothAddress address = 1; BluetoothAddressTypeEnum type = 2; diff --git a/gd/hci/cert/le_acl_manager_test.py b/gd/hci/cert/le_acl_manager_test.py index 6c2befb19..31905e41f 100644 --- a/gd/hci/cert/le_acl_manager_test.py +++ b/gd/hci/cert/le_acl_manager_test.py @@ -224,8 +224,8 @@ class LeAclManagerTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=common.RANDOM_DEVICE_ADDRESS, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_RANDOM_DEVICE_ADDRESS, peer_address_type=common.PUBLIC_DEVICE_OR_IDENTITY_ADDRESS, peer_address=common.BluetoothAddress(address=bytes(b'A6:A5:A4:A3:A2:A1')), channel_map=7, diff --git a/gd/hci/cert/le_advertising_manager_test.py b/gd/hci/cert/le_advertising_manager_test.py index bbdf7175e..030a860ff 100644 --- a/gd/hci/cert/le_advertising_manager_test.py +++ b/gd/hci/cert/le_advertising_manager_test.py @@ -78,8 +78,8 @@ class LeAdvertisingManagerTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=common.RANDOM_DEVICE_ADDRESS, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_RANDOM_DEVICE_ADDRESS, channel_map=7, filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES) request = le_advertising_facade.CreateAdvertiserRequest(config=config) diff --git a/gd/hci/cert/le_scanning_manager_test.py b/gd/hci/cert/le_scanning_manager_test.py index 4ea9b9918..45be8a628 100644 --- a/gd/hci/cert/le_scanning_manager_test.py +++ b/gd/hci/cert/le_scanning_manager_test.py @@ -83,8 +83,8 @@ class LeScanningManagerTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=common.RANDOM_DEVICE_ADDRESS, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_RANDOM_DEVICE_ADDRESS, channel_map=7, filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES) request = le_advertising_facade.CreateAdvertiserRequest(config=config) diff --git a/gd/hci/cert/le_scanning_with_security_test.py b/gd/hci/cert/le_scanning_with_security_test.py index 9ca61e2f7..242ded9f0 100644 --- a/gd/hci/cert/le_scanning_with_security_test.py +++ b/gd/hci/cert/le_scanning_with_security_test.py @@ -72,8 +72,8 @@ class LeScanningWithSecurityTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=common.RANDOM_DEVICE_ADDRESS, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_RANDOM_DEVICE_ADDRESS, channel_map=7, filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES) request = le_advertising_facade.CreateAdvertiserRequest(config=config) diff --git a/gd/hci/facade/le_advertising_manager_facade.cc b/gd/hci/facade/le_advertising_manager_facade.cc index 12afdd25c..2be2e9e57 100644 --- a/gd/hci/facade/le_advertising_manager_facade.cc +++ b/gd/hci/facade/le_advertising_manager_facade.cc @@ -71,9 +71,9 @@ bool AdvertisingConfigFromProto(const AdvertisingConfig& config_proto, hci::Adve } config->interval_max = static_cast(config_proto.interval_max()); - config->event_type = static_cast(config_proto.event_type()); + config->advertising_type = static_cast(config_proto.advertising_type()); - config->address_type = static_cast<::bluetooth::hci::AddressType>(config_proto.address_type()); + config->own_address_type = static_cast<::bluetooth::hci::OwnAddressType>(config_proto.own_address_type()); config->peer_address_type = static_cast<::bluetooth::hci::PeerAddressType>(config_proto.peer_address_type()); diff --git a/gd/hci/facade/le_advertising_manager_facade.proto b/gd/hci/facade/le_advertising_manager_facade.proto index 25e5cbf83..edb70cf52 100644 --- a/gd/hci/facade/le_advertising_manager_facade.proto +++ b/gd/hci/facade/le_advertising_manager_facade.proto @@ -38,8 +38,8 @@ message AdvertisingConfig { int32 interval_min = 4; // Unit: number of Bluetooth slots in 0.125 ms increment int32 interval_max = 5; - AdvertisingEventType event_type = 6; - bluetooth.facade.BluetoothAddressTypeEnum address_type = 7; + AdvertisingEventType advertising_type = 6; + bluetooth.facade.BluetoothOwnAddressTypeEnum own_address_type = 7; bluetooth.facade.BluetoothPeerAddressTypeEnum peer_address_type = 8; bluetooth.facade.BluetoothAddress peer_address = 9; int32 channel_map = 10; diff --git a/gd/hci/hci_packets.pdl b/gd/hci/hci_packets.pdl index 1f2e13992..58cf8a781 100644 --- a/gd/hci/hci_packets.pdl +++ b/gd/hci/hci_packets.pdl @@ -2478,11 +2478,18 @@ enum AddressType : 8 { RANDOM_IDENTITY_ADDRESS = 0x03, } +enum OwnAddressType : 8 { + PUBLIC_DEVICE_ADDRESS = 0x00, + RANDOM_DEVICE_ADDRESS = 0x01, + RESOLVABLE_OR_PUBLIC_ADDRESS = 0x02, + RESOLVABLE_OR_RANDOM_ADDRESS = 0x03, +} + packet LeSetAdvertisingParameters : LeAdvertisingCommand (op_code = LE_SET_ADVERTISING_PARAMETERS) { interval_min : 16, interval_max : 16, type : AdvertisingType, - own_address_type : AddressType, + own_address_type : OwnAddressType, peer_address_type : PeerAddressType, peer_address : Address, channel_map : 8, @@ -2542,13 +2549,6 @@ enum LeScanningFilterPolicy : 8 { CONNECT_LIST_AND_INITIATORS_IDENTITY = 0x03, } -enum OwnAddressType : 8 { - PUBLIC_DEVICE_ADDRESS = 0x00, - RANDOM_DEVICE_ADDRESS = 0x01, - RESOLVABLE_OR_PUBLIC_ADDRESS = 0x02, - RESOLVABLE_OR_RANDOM_ADDRESS = 0x03, -} - packet LeSetScanParameters : LeScanningCommand (op_code = LE_SET_SCAN_PARAMETERS) { le_scan_type : LeScanType, le_scan_interval : 16, // 0x0004-0x4000 Default 0x10 (10ms) @@ -3753,7 +3753,7 @@ packet LeMultiAdvtParam : LeMultiAdvt (sub_cmd = SET_PARAM) { interval_min : 16, interval_max : 16, type : AdvertisingType, - own_address_type : AddressType, + own_address_type : OwnAddressType, peer_address_type : PeerAddressType, peer_address : Address, channel_map : 8, diff --git a/gd/hci/le_advertising_manager.cc b/gd/hci/le_advertising_manager.cc index 2c8885bec..f66048bb7 100644 --- a/gd/hci/le_advertising_manager.cc +++ b/gd/hci/le_advertising_manager.cc @@ -47,7 +47,7 @@ struct Advertiser { }; ExtendedAdvertisingConfig::ExtendedAdvertisingConfig(const AdvertisingConfig& config) : AdvertisingConfig(config) { - switch (config.event_type) { + switch (config.advertising_type) { case AdvertisingType::ADV_IND: connectable = true; scannable = true; @@ -70,13 +70,6 @@ ExtendedAdvertisingConfig::ExtendedAdvertisingConfig(const AdvertisingConfig& co LOG_WARN("Unknown event type"); break; } - if (config.address_type == AddressType::PUBLIC_DEVICE_ADDRESS) { - own_address_type = OwnAddressType::PUBLIC_DEVICE_ADDRESS; - } else if (config.address_type == AddressType::RANDOM_DEVICE_ADDRESS) { - own_address_type = OwnAddressType::RANDOM_DEVICE_ADDRESS; - } - // TODO(b/149221472): Support fragmentation - operation = Operation::COMPLETE_ADVERTISEMENT; } struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallback { @@ -211,8 +204,8 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb hci::LeSetAdvertisingParametersBuilder::Create( config.interval_min, config.interval_max, - config.event_type, - config.address_type, + config.advertising_type, + config.own_address_type, config.peer_address_type, config.peer_address, config.channel_map, @@ -245,8 +238,8 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb hci::LeMultiAdvtParamBuilder::Create( config.interval_min, config.interval_max, - config.event_type, - config.address_type, + config.advertising_type, + config.own_address_type, config.peer_address_type, config.peer_address, config.channel_map, @@ -387,15 +380,17 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb advertising_sets_[id].current_address = AddressWithType(controller_->GetMacAddress(), AddressType::PUBLIC_DEVICE_ADDRESS); } + + // TODO(b/149221472): Support fragmentation + auto operation = Operation::COMPLETE_ADVERTISEMENT; if (!config.scan_response.empty()) { le_advertising_interface_->EnqueueCommand( - hci::LeSetExtendedAdvertisingScanResponseBuilder::Create(id, config.operation, config.fragment_preference, - config.scan_response), + hci::LeSetExtendedAdvertisingScanResponseBuilder::Create( + id, operation, kFragment_preference, config.scan_response), module_handler_->BindOnce(impl::check_status)); } le_advertising_interface_->EnqueueCommand( - hci::LeSetExtendedAdvertisingDataBuilder::Create(id, config.operation, config.fragment_preference, - config.advertisement), + hci::LeSetExtendedAdvertisingDataBuilder::Create(id, operation, kFragment_preference, config.advertisement), module_handler_->BindOnce(impl::check_status)); EnabledSet curr_set; @@ -548,17 +543,16 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb case (AdvertisingApiType::EXTENDED): { // TODO(b/149221472): Support fragmentation auto operation = Operation::COMPLETE_ADVERTISEMENT; - auto fragment_preference = FragmentPreference::CONTROLLER_SHOULD_NOT; if (set_scan_rsp) { le_advertising_interface_->EnqueueCommand( hci::LeSetExtendedAdvertisingScanResponseBuilder::Create( - advertiser_id, operation, fragment_preference, data), + advertiser_id, operation, kFragment_preference, data), module_handler_->BindOnceOn( this, &impl::check_status_with_id, advertiser_id)); } else { le_advertising_interface_->EnqueueCommand( - hci::LeSetExtendedAdvertisingDataBuilder::Create(advertiser_id, operation, fragment_preference, data), + hci::LeSetExtendedAdvertisingDataBuilder::Create(advertiser_id, operation, kFragment_preference, data), module_handler_->BindOnceOn( this, &impl::check_status_with_id, advertiser_id)); } @@ -931,13 +925,13 @@ AdvertiserId LeAdvertisingManager::CreateAdvertiser( const AdvertisingConfig& config, const common::Callback& scan_callback, const common::Callback& set_terminated_callback, os::Handler* handler) { if (config.peer_address == Address::kEmpty) { - if (config.address_type == hci::AddressType::PUBLIC_IDENTITY_ADDRESS || - config.address_type == hci::AddressType::RANDOM_IDENTITY_ADDRESS) { + if (config.own_address_type == hci::OwnAddressType::RESOLVABLE_OR_PUBLIC_ADDRESS || + config.own_address_type == hci::OwnAddressType::RESOLVABLE_OR_RANDOM_ADDRESS) { LOG_WARN("Peer address can not be empty"); return kInvalidId; } - if (config.event_type == hci::AdvertisingType::ADV_DIRECT_IND || - config.event_type == hci::AdvertisingType::ADV_DIRECT_IND_LOW) { + if (config.advertising_type == hci::AdvertisingType::ADV_DIRECT_IND || + config.advertising_type == hci::AdvertisingType::ADV_DIRECT_IND_LOW) { LOG_WARN("Peer address can not be empty for directed advertising"); return kInvalidId; } diff --git a/gd/hci/le_advertising_manager.h b/gd/hci/le_advertising_manager.h index d17890f55..e3e20e52d 100644 --- a/gd/hci/le_advertising_manager.h +++ b/gd/hci/le_advertising_manager.h @@ -31,8 +31,8 @@ class AdvertisingConfig { std::vector scan_response; uint16_t interval_min; uint16_t interval_max; - AdvertisingType event_type; - AddressType address_type; + AdvertisingType advertising_type; + OwnAddressType own_address_type; PeerAddressType peer_address_type; Address peer_address; uint8_t channel_map; @@ -54,9 +54,6 @@ class ExtendedAdvertisingConfig : public AdvertisingConfig { SecondaryPhyType secondary_advertising_phy; uint8_t sid = 0x00; Enable enable_scan_request_notifications = Enable::DISABLED; - OwnAddressType own_address_type; - Operation operation; // TODO(b/149221472): Support fragmentation - FragmentPreference fragment_preference = FragmentPreference::CONTROLLER_SHOULD_NOT; ExtendedAdvertisingConfig() = default; ExtendedAdvertisingConfig(const AdvertisingConfig& config); }; @@ -100,6 +97,7 @@ class LeAdvertisingManager : public bluetooth::Module { static constexpr AdvertiserId kInvalidId = 0xFF; static constexpr uint8_t kInvalidHandle = 0xFF; static constexpr uint8_t kAdvertisingSetIdMask = 0x0F; + static constexpr FragmentPreference kFragment_preference = FragmentPreference::CONTROLLER_SHOULD_NOT; LeAdvertisingManager(); size_t GetNumberOfAdvertisingInstances() const; diff --git a/gd/hci/le_advertising_manager_test.cc b/gd/hci/le_advertising_manager_test.cc index cc2c0fa98..a11af815a 100644 --- a/gd/hci/le_advertising_manager_test.cc +++ b/gd/hci/le_advertising_manager_test.cc @@ -375,8 +375,8 @@ class LeExtendedAdvertisingAPITest : public LeExtendedAdvertisingManagerTest { // start advertising set ExtendedAdvertisingConfig advertising_config{}; - advertising_config.event_type = AdvertisingType::ADV_IND; - advertising_config.address_type = AddressType::PUBLIC_DEVICE_ADDRESS; + advertising_config.advertising_type = AdvertisingType::ADV_IND; + advertising_config.own_address_type = OwnAddressType::PUBLIC_DEVICE_ADDRESS; std::vector gap_data{}; GapData data_item{}; data_item.data_type_ = GapDataType::FLAGS; @@ -432,8 +432,8 @@ TEST_F(LeExtendedAdvertisingManagerTest, startup_teardown) {} TEST_F(LeAdvertisingManagerTest, create_advertiser_test) { AdvertisingConfig advertising_config{}; - advertising_config.event_type = AdvertisingType::ADV_IND; - advertising_config.address_type = AddressType::PUBLIC_DEVICE_ADDRESS; + advertising_config.advertising_type = AdvertisingType::ADV_IND; + advertising_config.own_address_type = OwnAddressType::PUBLIC_DEVICE_ADDRESS; std::vector gap_data{}; GapData data_item{}; data_item.data_type_ = GapDataType::FLAGS; @@ -480,8 +480,8 @@ TEST_F(LeAdvertisingManagerTest, create_advertiser_test) { TEST_F(LeAndroidHciAdvertisingManagerTest, create_advertiser_test) { AdvertisingConfig advertising_config{}; - advertising_config.event_type = AdvertisingType::ADV_IND; - advertising_config.address_type = AddressType::PUBLIC_DEVICE_ADDRESS; + advertising_config.advertising_type = AdvertisingType::ADV_IND; + advertising_config.own_address_type = OwnAddressType::PUBLIC_DEVICE_ADDRESS; std::vector gap_data{}; GapData data_item{}; data_item.data_type_ = GapDataType::FLAGS; @@ -521,8 +521,8 @@ TEST_F(LeAndroidHciAdvertisingManagerTest, create_advertiser_test) { TEST_F(LeExtendedAdvertisingManagerTest, create_advertiser_test) { ExtendedAdvertisingConfig advertising_config{}; - advertising_config.event_type = AdvertisingType::ADV_IND; - advertising_config.address_type = AddressType::PUBLIC_DEVICE_ADDRESS; + advertising_config.advertising_type = AdvertisingType::ADV_IND; + advertising_config.own_address_type = OwnAddressType::PUBLIC_DEVICE_ADDRESS; std::vector gap_data{}; GapData data_item{}; data_item.data_type_ = GapDataType::FLAGS; @@ -578,8 +578,8 @@ TEST_F(LeExtendedAdvertisingAPITest, startup_teardown) {} TEST_F(LeExtendedAdvertisingAPITest, set_parameter) { ExtendedAdvertisingConfig advertising_config{}; - advertising_config.event_type = AdvertisingType::ADV_IND; - advertising_config.address_type = AddressType::PUBLIC_DEVICE_ADDRESS; + advertising_config.advertising_type = AdvertisingType::ADV_IND; + advertising_config.own_address_type = OwnAddressType::PUBLIC_DEVICE_ADDRESS; std::vector gap_data{}; GapData data_item{}; data_item.data_type_ = GapDataType::COMPLETE_LOCAL_NAME; diff --git a/gd/l2cap/le/cert/dual_l2cap_test.py b/gd/l2cap/le/cert/dual_l2cap_test.py index c8bde932c..00e6392b7 100644 --- a/gd/l2cap/le/cert/dual_l2cap_test.py +++ b/gd/l2cap/le/cert/dual_l2cap_test.py @@ -89,8 +89,8 @@ class DualL2capTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=common.RANDOM_DEVICE_ADDRESS, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_RANDOM_DEVICE_ADDRESS, channel_map=7, filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES) request = le_advertising_facade.CreateAdvertiserRequest(config=config) diff --git a/gd/l2cap/le/cert/le_l2cap_test.py b/gd/l2cap/le/cert/le_l2cap_test.py index 623ca3d1c..80f3aed26 100644 --- a/gd/l2cap/le/cert/le_l2cap_test.py +++ b/gd/l2cap/le/cert/le_l2cap_test.py @@ -77,8 +77,8 @@ class LeL2capTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=common.RANDOM_DEVICE_ADDRESS, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_RANDOM_DEVICE_ADDRESS, channel_map=7, filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES) request = le_advertising_facade.CreateAdvertiserRequest(config=config) @@ -101,8 +101,8 @@ class LeL2capTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=common.RANDOM_DEVICE_ADDRESS, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_RANDOM_DEVICE_ADDRESS, channel_map=7, filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES) request = le_advertising_facade.CreateAdvertiserRequest(config=config) diff --git a/gd/security/cert/le_security_test.py b/gd/security/cert/le_security_test.py index 36ea8bd9b..a61cb3deb 100644 --- a/gd/security/cert/le_security_test.py +++ b/gd/security/cert/le_security_test.py @@ -109,8 +109,8 @@ class LeSecurityTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=self.cert_address.type, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_PUBLIC_DEVICE_ADDRESS, channel_map=7, filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES) request = le_advertising_facade.CreateAdvertiserRequest(config=config) @@ -126,8 +126,8 @@ class LeSecurityTest(GdBaseTestClass): advertisement=[gap_data], interval_min=512, interval_max=768, - event_type=le_advertising_facade.AdvertisingEventType.ADV_IND, - address_type=self.dut_address.type, + advertising_type=le_advertising_facade.AdvertisingEventType.ADV_IND, + own_address_type=common.USE_PUBLIC_DEVICE_ADDRESS, channel_map=7, filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES) request = le_advertising_facade.CreateAdvertiserRequest(config=config) diff --git a/main/shim/le_advertising_manager.cc b/main/shim/le_advertising_manager.cc index c4000d991..5f42e45a3 100644 --- a/main/shim/le_advertising_manager.cc +++ b/main/shim/le_advertising_manager.cc @@ -169,8 +169,6 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface, offset += len + 1; // 1 byte for len } - config.operation = bluetooth::hci::Operation::COMPLETE_ADVERTISEMENT; - bluetooth::hci::AdvertiserId id = bluetooth::shim::GetAdvertising()->ExtendedCreateAdvertiser( reg_id, config, scan_callback, set_terminated_callback, -- 2.11.0