diff options
author | 2024-10-12 00:08:51 +0000 | |
---|---|---|
committer | 2025-01-28 09:45:22 -0800 | |
commit | 725d60c13f8758d838c195f9025fe9292677ecd1 (patch) | |
tree | 5df2254c0d4afade3eca4e0787439410e84c34f5 /tools/rootcanal | |
parent | 8bf8784bca5750cb57aa79eb5d4e76ff59c55d33 (diff) |
RootCanal: Add INTEL_BE200 controller preset
Bug: 372977055
Test: m root-canal
Flag: EXEMPT, tool change
Change-Id: Ibfacbc9dcf52c0c98a1572510e0637bef84a16e2
Diffstat (limited to 'tools/rootcanal')
6 files changed, 48 insertions, 1 deletions
diff --git a/tools/rootcanal/model/controller/controller_properties.cc b/tools/rootcanal/model/controller/controller_properties.cc index 26718a9747..3f6c918bfe 100644 --- a/tools/rootcanal/model/controller/controller_properties.cc +++ b/tools/rootcanal/model/controller/controller_properties.cc @@ -1743,6 +1743,40 @@ ControllerProperties::ControllerProperties(rootcanal::configuration::Controller le_supported_states = 0x3ffffffffff; break; + case ControllerPreset::INTEL_BE200: + // Configuration extracted with the helper script controller_info.py + supports_csr_vendor_command = true; + br_supported = true; + le_supported = true; + hci_version = bluetooth::hci::HciVersion::V_5_4; + hci_subversion = 0x4363; + lmp_version = bluetooth::hci::LmpVersion::V_5_4; + lmp_subversion = 0x4363; + company_identifier = 0x2; + supported_commands = std::array<uint8_t, 64>{ + 0xbf, 0xff, 0xfb, 0x03, 0xcc, 0xff, 0x0f, 0xff, 0xbf, 0xff, 0xfc, 0x1f, 0xf2, + 0x0f, 0xe8, 0xfe, 0x3f, 0xf7, 0x8f, 0xff, 0x1c, 0x00, 0x04, 0x00, 0x61, 0xf7, + 0xff, 0xff, 0x7f, 0x38, 0x00, 0x00, 0xfe, 0xf0, 0xff, 0xff, 0xff, 0xe3, 0x80, + 0x07, 0x00, 0xe8, 0x1f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + lmp_features = std::array<uint64_t, 3>{0x877bffdbfe0ffebf, 0x0, 0x300}; + acl_data_packet_length = 1021; + total_num_acl_data_packets = 4; + sco_data_packet_length = 96; + total_num_sco_data_packets = 6; + num_supported_iac = 2; + le_features = 0x80059ff; + le_acl_data_packet_length = 251; + total_num_le_acl_data_packets = 3; + le_filter_accept_list_size = 25; + le_resolving_list_size = 25; + le_supported_states = 0x3ffffffffff; + le_max_advertising_data_length = 160; + le_num_supported_advertising_sets = 12; + le_periodic_advertiser_list_size = 12; + break; + default: break; } diff --git a/tools/rootcanal/model/controller/dual_mode_controller.cc b/tools/rootcanal/model/controller/dual_mode_controller.cc index 15f788b438..c7b5d0bbe2 100644 --- a/tools/rootcanal/model/controller/dual_mode_controller.cc +++ b/tools/rootcanal/model/controller/dual_mode_controller.cc @@ -3290,6 +3290,11 @@ void DualModeController::WriteLoopbackMode(CommandView command) { ErrorCode::SUCCESS)); } +void DualModeController::IntelDdcConfigWrite(CommandView /*command*/) { + send_event_(bluetooth::hci::CommandCompleteBuilder::Create(kNumCommandPackets, OpCode::INTEL_DDC_CONFIG_WRITE, + std::vector<uint8_t> { static_cast<uint8_t>(ErrorCode::SUCCESS) })); +} + // Note: the list does not contain all defined opcodes. // Notable exceptions: // - Vendor commands @@ -4274,6 +4279,8 @@ const std::unordered_map<OpCode, DualModeController::CommandHandler> {OpCode::LE_GET_CONTROLLER_ACTIVITY_ENERGY_INFO, &DualModeController::LeGetControllerActivityEnergyInfo}, {OpCode::LE_EX_SET_SCAN_PARAMETERS, &DualModeController::LeExSetScanParameters}, - {OpCode::GET_CONTROLLER_DEBUG_INFO, &DualModeController::GetControllerDebugInfo}}; + {OpCode::GET_CONTROLLER_DEBUG_INFO, &DualModeController::GetControllerDebugInfo}, + {OpCode::INTEL_DDC_CONFIG_WRITE, &DualModeController::IntelDdcConfigWrite}, + }; } // namespace rootcanal diff --git a/tools/rootcanal/model/controller/dual_mode_controller.h b/tools/rootcanal/model/controller/dual_mode_controller.h index d0394a7bfd..c5574bda85 100644 --- a/tools/rootcanal/model/controller/dual_mode_controller.h +++ b/tools/rootcanal/model/controller/dual_mode_controller.h @@ -525,6 +525,7 @@ public: void LeGetControllerActivityEnergyInfo(CommandView command); void LeExSetScanParameters(CommandView command); void GetControllerDebugInfo(CommandView command); + void IntelDdcConfigWrite(CommandView command); // CSR vendor command. // Implement the command specific to the CSR controller diff --git a/tools/rootcanal/model/setup/test_command_handler.cc b/tools/rootcanal/model/setup/test_command_handler.cc index 93315ae16e..59071842a5 100644 --- a/tools/rootcanal/model/setup/test_command_handler.cc +++ b/tools/rootcanal/model/setup/test_command_handler.cc @@ -246,6 +246,8 @@ void TestCommandHandler::SetDeviceConfiguration(const vector<std::string>& args) preset = rootcanal::configuration::ControllerPreset::LAIRD_BL654; } else if (args[1] == "csr_rck_pts_dongle") { preset = rootcanal::configuration::ControllerPreset::CSR_RCK_PTS_DONGLE; + } else if (args[1] == "intel_be200") { + preset = rootcanal::configuration::ControllerPreset::INTEL_BE200; } else { response_string_ = "TestCommandHandler 'set_device_configuration' invalid configuration preset"; send_response_(response_string_); diff --git a/tools/rootcanal/packets/hci_packets.pdl b/tools/rootcanal/packets/hci_packets.pdl index 23abb93b29..8f3d3c1588 100644 --- a/tools/rootcanal/packets/hci_packets.pdl +++ b/tools/rootcanal/packets/hci_packets.pdl @@ -400,6 +400,7 @@ enum OpCode : 16 { // VENDOR_SPECIFIC // MSFT_OPCODE_xxxx below is needed for the tests. MSFT_OPCODE_INTEL = 0xFC1E, + INTEL_DDC_CONFIG_WRITE = 0xFC8B, LE_GET_VENDOR_CAPABILITIES = 0xFD53, LE_BATCH_SCAN = 0xFD56, LE_APCF = 0xFD57, diff --git a/tools/rootcanal/proto/rootcanal/configuration.proto b/tools/rootcanal/proto/rootcanal/configuration.proto index 0b6db15c89..0beb961291 100644 --- a/tools/rootcanal/proto/rootcanal/configuration.proto +++ b/tools/rootcanal/proto/rootcanal/configuration.proto @@ -24,6 +24,8 @@ enum ControllerPreset { LAIRD_BL654 = 1; // Official PTS dongle, CSR rck. CSR_RCK_PTS_DONGLE = 2; + // Official PTS dongle, Intel BE200. + INTEL_BE200 = 3; } message ControllerFeatures { |