Loading system/gd/hci/cert/le_acl_manager_test_lib.py +4 −3 Original line number Diff line number Diff line Loading @@ -136,12 +136,12 @@ class LeAclManagerTestBase(): handle = cc_view.GetConnectionHandle() address = cc_view.GetPeerAddress() return True if b'\x3e\x13\x0A\x00' in packet_bytes: if b'\x3e\x1f\x0A\x00' in packet_bytes: cc_view = hci_packets.LeEnhancedConnectionCompleteView( hci_packets.LeMetaEventView( hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes))))) handle = cc_view.GetConnectionHandle() address = cc_view.GetPeerResolvablePrivateAddress() address = cc_view.GetPeerAddress() return True return False Loading Loading @@ -202,6 +202,7 @@ class LeAclManagerTestBase(): def test_cert_connects(self): self.set_privacy_policy_static() self.register_for_le_event(hci_packets.SubeventCode.CONNECTION_COMPLETE) self.register_for_le_event(hci_packets.SubeventCode.ENHANCED_CONNECTION_COMPLETE) self.dut_le_acl_manager.listen_for_incoming_connections() Loading Loading @@ -253,7 +254,7 @@ class LeAclManagerTestBase(): hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes))))) handle = cc_view.GetConnectionHandle() return True if b'\x3e\x13\x0A\x00' in packet_bytes: if b'\x3e\x1f\x0A\x00' in packet_bytes: cc_view = hci_packets.LeEnhancedConnectionCompleteView( hci_packets.LeMetaEventView( hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes))))) Loading system/gd/hci/facade/le_advertising_manager_facade.cc +24 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,30 @@ bool AdvertisingConfigFromProto(const AdvertisingConfig& config_proto, hci::Exte config->tx_power = static_cast<uint8_t>(config_proto.tx_power()); config->legacy_pdus = true; auto advertising_type = static_cast<::bluetooth::hci::AdvertisingType>(config_proto.advertising_type()); switch (advertising_type) { case AdvertisingType::ADV_IND: { config->connectable = true; config->scannable = true; } break; case AdvertisingType::ADV_DIRECT_IND: { config->connectable = true; config->directed = true; config->high_duty_directed_connectable = true; } break; case AdvertisingType::ADV_SCAN_IND: { config->scannable = true; } break; case AdvertisingType::ADV_NONCONN_IND: { } break; case AdvertisingType::ADV_DIRECT_IND_LOW: { config->directed = true; config->connectable = true; } break; } return true; } Loading Loading
system/gd/hci/cert/le_acl_manager_test_lib.py +4 −3 Original line number Diff line number Diff line Loading @@ -136,12 +136,12 @@ class LeAclManagerTestBase(): handle = cc_view.GetConnectionHandle() address = cc_view.GetPeerAddress() return True if b'\x3e\x13\x0A\x00' in packet_bytes: if b'\x3e\x1f\x0A\x00' in packet_bytes: cc_view = hci_packets.LeEnhancedConnectionCompleteView( hci_packets.LeMetaEventView( hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes))))) handle = cc_view.GetConnectionHandle() address = cc_view.GetPeerResolvablePrivateAddress() address = cc_view.GetPeerAddress() return True return False Loading Loading @@ -202,6 +202,7 @@ class LeAclManagerTestBase(): def test_cert_connects(self): self.set_privacy_policy_static() self.register_for_le_event(hci_packets.SubeventCode.CONNECTION_COMPLETE) self.register_for_le_event(hci_packets.SubeventCode.ENHANCED_CONNECTION_COMPLETE) self.dut_le_acl_manager.listen_for_incoming_connections() Loading Loading @@ -253,7 +254,7 @@ class LeAclManagerTestBase(): hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes))))) handle = cc_view.GetConnectionHandle() return True if b'\x3e\x13\x0A\x00' in packet_bytes: if b'\x3e\x1f\x0A\x00' in packet_bytes: cc_view = hci_packets.LeEnhancedConnectionCompleteView( hci_packets.LeMetaEventView( hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes))))) Loading
system/gd/hci/facade/le_advertising_manager_facade.cc +24 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,30 @@ bool AdvertisingConfigFromProto(const AdvertisingConfig& config_proto, hci::Exte config->tx_power = static_cast<uint8_t>(config_proto.tx_power()); config->legacy_pdus = true; auto advertising_type = static_cast<::bluetooth::hci::AdvertisingType>(config_proto.advertising_type()); switch (advertising_type) { case AdvertisingType::ADV_IND: { config->connectable = true; config->scannable = true; } break; case AdvertisingType::ADV_DIRECT_IND: { config->connectable = true; config->directed = true; config->high_duty_directed_connectable = true; } break; case AdvertisingType::ADV_SCAN_IND: { config->scannable = true; } break; case AdvertisingType::ADV_NONCONN_IND: { } break; case AdvertisingType::ADV_DIRECT_IND_LOW: { config->directed = true; config->connectable = true; } break; } return true; } Loading