Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4a99cac authored by Henri Chataing's avatar Henri Chataing
Browse files

RootCanal: Add controller configuration preset for the Laird BL654 dongle

The dongle is used as official dongle for the LE PTS tests

Bug: 253525084
Test: m root-canal
Change-Id: I4ec5f882befbc673711ad1780d9e946638b13815
parent a0084b6c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6,6 +6,8 @@ option optimize_for = CODE_SIZE;
enum ControllerPreset {
  // Version 5.3, all features enabled, all quirks disabled.
  DEFAULT = 0;
  // Official PTS dongle, Laird BL654.
  LAIRD_BL654 = 1;
}

message ControllerFeatures {
+34 −2
Original line number Diff line number Diff line
@@ -957,7 +957,8 @@ bool ControllerProperties::CheckSupportedCommands() const {
  auto c36 = mandatory;
  // C37: Mandatory if the LE Controller can change its sleep clock accuracy,
  // otherwise excluded.
  auto c37 = excluded;
  auto c37 = mandatory_or_excluded(
      SupportsLLFeature(LLFeaturesBits::SLEEP_CLOCK_ACCURACY_UPDATES));
  // C38: Mandatory if LE Feature (Connected Isochronous Stream - Central) or
  // LE Feature (Connected Isochronous Stream - Peripheral) is supported,
  // otherwise excluded.
@@ -1099,7 +1100,7 @@ bool ControllerProperties::CheckSupportedCommands() const {
  //
  // C96: Optional if the LE Controller supports Connection State,
  // otherwise excluded.
  auto c96 = mandatory;
  auto c96 = optional;
  // C97: Mandatory if Advertising State is supported, otherwise excluded.
  auto c97 = mandatory;
  // C98: Mandatory if Scanning State is supported, otherwise excluded.
@@ -1840,6 +1841,37 @@ ControllerProperties::ControllerProperties(
    switch (config.preset()) {
      case ControllerPreset::DEFAULT:
        break;

      case ControllerPreset::LAIRD_BL654:
        // Configuration extracted with the helper script controller_info.py
        br_supported = false;
        le_supported = true;
        hci_version = bluetooth::hci::HciVersion::V_5_4;
        hci_subversion = 0x5ad2;
        lmp_version = bluetooth::hci::LmpVersion::V_5_4;
        lmp_subversion = 0x5ad2;
        company_identifier = 0x7e8;
        supported_commands = std::array<uint8_t, 64>{
            0x20, 0x00, 0x80, 0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x04,
            0x00, 0x00, 0x00, 0x28, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
            0x04, 0x00, 0x00, 0xf7, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x30,
            0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xe0, 0xf7, 0xff, 0xff,
            0xff, 0xc1, 0xe3, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        };
        le_features = 0x19beff017fff;
        le_acl_data_packet_length = 512;
        total_num_le_acl_data_packets = 4;
        iso_data_packet_length = 512;
        total_num_iso_data_packets = 5;
        le_filter_accept_list_size = 4;
        le_resolving_list_size = 4;
        le_supported_states = 0x3ffffffffff;
        le_max_advertising_data_length = 256;
        le_num_supported_advertising_sets = 4;
        le_periodic_advertiser_list_size = 4;
        break;

      default:
        break;
    }
+2 −0
Original line number Diff line number Diff line
@@ -2591,6 +2591,7 @@ enum HciVersion : 8 {
  V_5_1 = 0x0a,
  V_5_2 = 0x0b,
  V_5_3 = 0x0c,
  V_5_4 = 0x0d,
}

enum LmpVersion : 8 {
@@ -2607,6 +2608,7 @@ enum LmpVersion : 8 {
  V_5_1 = 0x0a,
  V_5_2 = 0x0b,
  V_5_3 = 0x0c,
  V_5_4 = 0x0d,
}

struct LocalVersionInformation {