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

Commit 9ec0799b authored by jruthe's avatar jruthe
Browse files

test_vendor: Rename discoverable devices.

Test: compiles
Change-Id: I1fc1f6845995e9e816556679622db6f6d447b7b3
parent f09e568f
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -145,16 +145,7 @@ class Device {
  // The time between page scans.
  std::chrono::milliseconds page_scan_delay_ms_;

  std::vector<uint8_t> extended_inquiry_data_ = {
      0x08,  // Length
      BT_EIR_COMPLETE_LOCAL_NAME_TYPE,
      'g',
      'D',
      'e',
      'v',
      'i',
      'c',
      'e'};
  std::vector<uint8_t> extended_inquiry_data_;

  // Classic Bluetooth CLKN_slave[16..2] - CLKN_master[16..2]
  // Bluetooth Core Specification Version 4.2, Volume 2, Part C, Section 4.3.2
+10 −2
Original line number Diff line number Diff line
@@ -25,8 +25,16 @@ namespace test_vendor_lib {
Beacon::Beacon() {
  advertising_interval_ms_ = std::chrono::milliseconds(1280);
  advertising_type_ = BTM_BLE_NON_CONNECT_EVT;
  adv_data_ = {0x07,  // Length
  adv_data_ = {0x0F,  // Length
               BTM_BLE_AD_TYPE_NAME_CMPL,
               'g',
               'D',
               'e',
               'v',
               'i',
               'c',
               'e',
               '-',
               'b',
               'e',
               'a',
@@ -35,7 +43,7 @@ Beacon::Beacon() {
               'n',
               0x02,  // Length
               BTM_BLE_AD_TYPE_FLAG,
               BTM_BLE_BREDR_NOT_SPT};
               BTM_BLE_BREDR_NOT_SPT | BTM_BLE_GEN_DISC_FLAG};

  scan_data_ = {0x05,  // Length
                BTM_BLE_AD_TYPE_NAME_SHORT,
+15 −3
Original line number Diff line number Diff line
@@ -27,17 +27,29 @@ BeaconSwarm::BeaconSwarm() {
  advertising_type_ = BTM_BLE_NON_CONNECT_EVT;
  adv_data_ = {0x02,  // Length
               BTM_BLE_AD_TYPE_FLAG,
               BTM_BLE_BREDR_NOT_SPT,
               0x0d,  // Length (four spots for the count)
               BTM_BLE_BREDR_NOT_SPT | BTM_BLE_GEN_DISC_FLAG,
               0x15,
               BTM_BLE_AD_TYPE_NAME_CMPL,
               'g',
               'D',
               'e',
               'v',
               'i',
               'c',
               'e',
               '-',
               'b',
               'e',
               'a',
               'c',
               'o',
               'n',
               ' '};
               '_',
               's',
               'w',
               'a',
               'r',
               'm'};

  scan_response_present_ = true;
  scan_data_ = {0x06,  // Length
+25 −11
Original line number Diff line number Diff line
@@ -28,17 +28,31 @@ namespace test_vendor_lib {
BrokenAdv::BrokenAdv() {
  advertising_interval_ms_ = std::chrono::milliseconds(1280);
  advertising_type_ = BTM_BLE_NON_CONNECT_EVT;
  adv_data_ = {0x02,  // Length
  adv_data_ = {
      0x02,  // Length
      BTM_BLE_AD_TYPE_FLAG,
               BTM_BLE_BREDR_NOT_SPT,
               0x07,  // Length
      BTM_BLE_BREDR_NOT_SPT | BTM_BLE_GEN_DISC_FLAG,
      0x13,  // Length
      BTM_BLE_AD_TYPE_NAME_CMPL,
               'B',
               'R',
               '0',
               'K',
               '3',
               'N'};
      'g',
      'D',
      'e',
      'v',
      'i',
      'c',
      'e',
      '-',
      'b',
      'r',
      'o',
      'k',
      'e',
      'n',
      '_',
      'a',
      'd',
      'v',
  };

  constant_adv_data_ = adv_data_;

+10 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ Classic::Classic() {
  advertising_interval_ms_ = std::chrono::milliseconds(0);
  device_class_ = 0x30201;

  extended_inquiry_data_ = {0x08,  // Length
  extended_inquiry_data_ = {0x10,  // Length
                            BT_EIR_COMPLETE_LOCAL_NAME_TYPE,
                            'g',
                            'D',
@@ -36,7 +36,15 @@ Classic::Classic() {
                            'v',
                            'i',
                            'c',
                            'e'};
                            'e',
                            '-',
                            'c',
                            'l',
                            'a',
                            's',
                            's',
                            'i',
                            'c'};
  page_scan_repetition_mode_ = 0;
  page_scan_delay_ms_ = std::chrono::milliseconds(600);
}
Loading