.GAP_CASE: &GAP_CASE
  SDK: ESP32_IDF
  Test App: SSC_BLE
  auto test: 'Yes'
  category: Function
  test point 1: basic function
  initial condition: BLE_INIT3
  test environment: SSC_T2_5
  execution time: 0
  module: BT Stack
  sub module: GAP
  version: v1 (2016-12-31)
  CI ready: 'Yes'
  level: Integration
  allow fail: ''

.dut1_stop_adv: &dut1_stop_adv
  LIST_MERGE:
    - - "SSC SSC1 bleadv -D -z stop"
      - ["R SSC1 C +BLEADV:"]

.dut2_stop_adv: &dut2_stop_adv
  LIST_MERGE:
    - - "SSC SSC2 bleadv -D -z stop"
      - ["R SSC2 C +BLEADV:"]

.dut1_start_adv: &dut1_start_adv
  LIST_MERGE:
    - - "SSC SSC1 bleadv -D -z start"
      - ["R SSC1 C +BLEADV:Start,OK"]

.set_default_ble_name: &set_default_ble_name
  LIST_MERGE:
    - - "SSC SSC1 ble -S -z name -n <dut1_ble_name>"
      - ["R SSC1 C +BLE:OK"]

.set_default_adv_data: &set_default_adv_data
  LIST_MERGE:
    - - "SSC SSC1 bleadv -D -z stop"
      - ["R SSC1 C +BLEADV:"]
    - - "SSC SSC1 bleadv -L -c 0 -t 3"
      - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
    - - "SSC SSC1 bleadv -D -z start"
      - ["R SSC1 C +BLEADV:Start,OK"]

.open_capture_nic: &open_capture_nic
  LIST_MERGE:
    - - "NIC BLENIC START <bt_capture_nic> bt+capture"
      - ['R PC_COM C +NIC_START:OK']

.dut1_connect_to_dut2: &dut1_connect_to_dut2
  LIST_MERGE:
    - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
      - ['P SSC1 C +BLECONN:GapConnect,OK', 'P SSC2 C +BLECONN:GapConnect,OK']

test cases:
- ID: BTSTK_GAP_01001
  <<: *GAP_CASE
  test point 2: BLE GAP param device name test
  summary: ble set ascii device name
  steps: |
    1. DUT1 set ascii device name
    2. stop advertising
    3. config scan response and start advertising
    4. DUT2 do active scan
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. device name in scan result
  cmd set:
  - ""
  - *set_default_ble_name
  - - "SSC SSC1 bleadv -D -z stop"
    - ["R SSC1 C +BLEADV:"]
  - - "SSC SSC1 bleadv -L -c 0 -t 3 -n 1"
    - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - - "SSC SSC1 bleadv -D -z start"
    - ["R SSC1 C +BLEADV:Start,OK"]
  - *dut2_stop_adv
  - - "SSC SSC2 blescan -D -z start -t 3 -c 0"
    - ["R SSC2 P <dut1_ble_name>"]
- ID: BTSTK_GAP_01002
  <<: *GAP_CASE
  test point 2: BLE GAP param device name test
  summary: ble set non-ascii device name
  steps: |
    1. DUT1 set non-ascii device name
    2. stop advertising
    3. config scan response and start advertising
    4. DUT2 do active scan
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. device name in scan result
  cmd set:
  - ""
  - - "SSC SSC1 ble -S -z name -n <dut1_ble_name_hex>"
    - ["R SSC1 C +BLE:OK"]
  - - "SSC SSC1 bleadv -D -z stop"
    - ["R SSC1 C +BLEADV:"]
  - - "SSC SSC1 bleadv -L -c 0 -t 3 -n 1"
    - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - - "SSC SSC1 bleadv -D -z start"
    - ["R SSC1 C +BLEADV:Start,OK"]
  - *dut2_stop_adv
  - - "SSC SSC2 blescan -D -z start -t 3 -c 0"
    - ["R SSC2 P <dut1_ble_name_hex>"]
- ID: BTSTK_GAP_02001
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response include name
  steps: |
    1. DUT1 stop advertise and set short device name
    2. DUT1 set include device name for adv data and scan response
    3. DUT1 start advertising
    4. PC do active scan and capture advertising report
    5. DUT1 stop advertising
    6. DUT1 set not include device name for adv data and scan response
    7. DUT1 start advertising
    8. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. get complete device name in ADV_IND and SCAN_RSP
    5. succeed
    6. succeed
    7. succeed
    8. do not have complete device name in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - *set_default_ble_name
  - - "SSC SSC1 bleadv -L -c 0 -n 1 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.NameComplete=<dut1_ble_name>)'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.NameComplete=<dut1_ble_name>)'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(!HCIEvent.data_0.NameComplete)'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(!HCIEvent.data_0.NameComplete)'
- ID: BTSTK_GAP_02002
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response include Tx power
  steps: |
    1. DUT1 set include Tx power for adv data and scan response
    2. DUT1 start advertising
    3. PC do active scan and capture advertising report
    4. DUT1 stop advertising
    5. DUT1 set not include Tx power for adv data and scan response
    6. DUT1 start advertising
    7. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. get Tx power in ADV_IND and SCAN_RSP
    4. succeed
    5. succeed
    6. succeed
    7. do not have Tx power in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -x 1 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.TxPower="")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.TxPower="")'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -x 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(!HCIEvent.data_0.TxPower)'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(!HCIEvent.data_0.TxPower)'
- ID: BTSTK_GAP_02004
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response appearance
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set appearance to 0 for adv data and scan response
    3. DUT1 start advertising
    4. PC do active scan and capture advertising report
    5. DUT1 stop advertising
    6. DUT1 set appearance to 1 for adv data and scan response
    7. DUT1 start advertising
    8. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. do not have appearance in ADV_IND and SCAN_RSP
    5. succeed
    6. succeed
    7. succeed
    8. get appearance 1 in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -a 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(!HCIEvent.data_0.Appearance)'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(!HCIEvent.data_0.Appearance)'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -a 1 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.Appearance="0x01")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.Appearance="0x01")'
- ID: BTSTK_GAP_02005
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response manufacturer data
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set manufacturer to 0x12345678 for adv data and scan response
    3. DUT1 start advertising
    4. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. get manufacturer data 0x12345678 in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -m 0x12345678 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ManufacturerSpecificData="0x12345678")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ManufacturerSpecificData="0x12345678")'
- ID: BTSTK_GAP_02006
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response manufacturer length not equal to real lenght
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set manufacturer 0x12345678 and length 3 for adv data and scan response
    3. DUT1 start advertising
    4. PC do active scan and capture advertising report
    5. DUT1 stop advertise
    6. DUT1 set manufacturer 0x12345678 and length 10 for adv data and scan response
    7. DUT1 start advertising
    8. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. get manufacturer data 0x12345678 in ADV_IND and SCAN_RSP
    5. succeed
    6. succeed
    7. succeed
    8. get manufacturer data 0x12345678 in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -m 0x12345678 -t 3 -l 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ManufacturerSpecificData="0x12345678")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ManufacturerSpecificData="0x12345678")'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -m 0x12345678 -t 3 -l 10"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ManufacturerSpecificData="0x12345678")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ManufacturerSpecificData="0x12345678")'
- ID: BTSTK_GAP_02007
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response service data
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response service data 0x1234123456 and not include device name
    3. DUT1 start advertising
    4. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. get ServiceData16BitUUID 0x1234123456 in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -d 0x1234123456 -t 3 -p -f 0 -x 0"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ServiceData16BitUUID="1234123456")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ServiceData16BitUUID="1234123456")'
- ID: BTSTK_GAP_02008
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response service data and set length not equal to real length
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response service data 0x1234123456 and service data length 3
    3. DUT1 start advertising
    4. PC do active scan and capture advertising report
    5. DUT1 stop advertise
    6. DUT1 set advertising data and scan response service data 0x1234123456 and service data length 10
    7. DUT1 start advertising
    8. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. get ServiceData16BitUUID 0x1234123456 in ADV_IND and SCAN_RSP
    5. succeed
    6. succeed
    7. succeed
    8. get ServiceData16BitUUID 0x1234123456 in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -d 0x1234123456 -t 3 -l 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ServiceData16BitUUID="1234123456")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ServiceData16BitUUID="1234123456")'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -d 0x1234123456 -t 3 -l 10"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ServiceData16BitUUID="1234123456")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.ServiceData16BitUUID="1234123456")'
- ID: BTSTK_GAP_02009
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response service uuid list
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response not include name, service uuid list 0xABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000
    3. DUT1 start advertising
    4. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. get Complete16BitServiceUUID 0xABCD Complete32BitServiceUUID 0xABCDDCBA
    and Complete128BitServiceUUID 0x12349B5F8000008000100000ABCD0000 in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -x 0 -i 0x00-0x00 -s ABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.Complete16BitServiceUUID="ABCD")(HCIEvent.data_0.Complete32BitServiceUUID="ABCDDCBA")(HCIEvent.data_0.Complete128BitServiceUUID="12349B5F8000008000100000ABCD0000")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.Complete16BitServiceUUID="ABCD")(HCIEvent.data_0.Complete32BitServiceUUID="ABCDDCBA")(HCIEvent.data_0.Complete128BitServiceUUID="12349B5F8000008000100000ABCD0000")'
- ID: BTSTK_GAP_02010
  <<: *GAP_CASE
  test point 2: BLE GAP config advertising data
  summary: ble set advertising data / scan response service uuid list and uuid length not equal to real length
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response not include name, service uuid list 0xABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 and service uuid len 32
    3. DUT1 start advertising
    4. PC do active scan and capture advertising report
    5. DUT1 stop advertise
    6. DUT1 set advertising data and scan response not include name, service uuid list 0xABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 and service uuid len 64
    7. DUT1 start advertising
    8. PC do active scan and capture advertising report
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. get Complete16BitServiceUUID 0xABCD Complete32BitServiceUUID 0xABCDDCBA
    and Complete128BitServiceUUID 0x12349B5F8000008000100000ABCD0000 in ADV_IND and SCAN_RSP
    5. succeed
    6. succeed
    7. succeed
    8. get Complete16BitServiceUUID 0xABCD Complete32BitServiceUUID 0xABCDDCBA
    and Complete128BitServiceUUID 0x12349B5F8000008000100000ABCD0000 in ADV_IND and SCAN_RSP
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  version: v2 (2016-03-01)
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -x 0 -i 0x00-0x00 -s ABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 -t 3 -l 32"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.Complete16BitServiceUUID="ABCD")(HCIEvent.data_0.Complete32BitServiceUUID="ABCDDCBA")(HCIEvent.data_0.Complete128BitServiceUUID="12349B5F8000008000100000ABCD0000")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.Complete16BitServiceUUID="ABCD")(HCIEvent.data_0.Complete32BitServiceUUID="ABCDDCBA")(HCIEvent.data_0.Complete128BitServiceUUID="12349B5F8000008000100000ABCD0000")'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -x 0 -i 0x00-0x00 -s ABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 -t 3 -l 64"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - *open_capture_nic
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.Complete16BitServiceUUID="ABCD")(HCIEvent.data_0.Complete32BitServiceUUID="ABCDDCBA")(HCIEvent.data_0.Complete128BitServiceUUID="12349B5F8000008000100000ABCD0000")'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="SCAN_RSP")(HCIEvent.address_0=<dut1_bt_mac>)(HCIEvent.data_0.Complete16BitServiceUUID="ABCD")(HCIEvent.data_0.Complete32BitServiceUUID="ABCDDCBA")(HCIEvent.data_0.Complete128BitServiceUUID="12349B5F8000008000100000ABCD0000")'
- ID: BTSTK_GAP_03001
  <<: *GAP_CASE
  test point 2: BLE GAP set advertise param
  summary: ble set adv parameter adv_type
  steps: |
    1. DUT1 stop advertise
    2. DUT1 start adv with adv_type ADV_IND
    3. PC do active scan and capture advertising report
    4. repeat step 1-3 with adv_type ADV_TYPE_DIRECT_IND_HIGH
    5. repeat step 1-3 with adv_type ADV_TYPE_SCAN_IND
    6. repeat step 1-3 with adv_type ADV_TYPE_NONCONN_IND
    7. repeat step 1-3 with adv_type ADV_TYPE_DIRECT_IND_LOW
  expected result: |
    1. succeed
    2. succeed
    3. get ADV_IND with DUT1 BT MAC
    4. get ADV_DIRECT_IND with DUT1 BT MAC
    5. get ADV_SCAN_IND with DUT1 BT MAC
    6. get ADV_NONCONN_IND with DUT1 BT MAC
    7. can not get ADV_DIRECT_IND with DUT1 BT MAC
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  cmd set:
  - ""
  - - "SSC SSC1 bleadv -L -c 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - *open_capture_nic
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -D -z start -t 0"
    - ["R SSC1 C +BLEADV:OK"]
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -D -z start -t 1 -y 0 -b <hci_nic_mac>"
    - ["R SSC1 C +BLEADV:OK"]
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_DIRECT_IND")(HCIEvent.address_0=<dut1_bt_mac>)'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -i 0x00B0-0x0200 -t 3"
    - ["R SSC1 C +BLEADV:OK"]
  - - "SSC SSC1 bleadv -D -z start -t 2 -i 0x00B0-0x0200"
    - ["R SSC1 C +BLEADV:OK"]
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_SCAN_IND")(HCIEvent.address_0=<dut1_bt_mac>)'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -D -z start -t 3 -i 0x00B0-0x0200"
    - ["R SSC1 C +BLEADV:OK"]
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_NONCONN_IND")(HCIEvent.address_0=<dut1_bt_mac>)'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -i 0x0640-0x0780 -t 3"
    - ["R SSC1 C +BLEADV:OK"]
  - - "SSC SSC1 bleadv -D -z start -t 4 -i 0x0640-0x0780 -y 0 -b <hci_nic_mac>"
    - ["R SSC1 C +BLEADV:OK"]
  - - "HCITOOL 3 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.address_0!=<dut1_bt_mac>)'
- ID: BTSTK_GAP_03002
  <<: *GAP_CASE
  test point 2: BLE GAP set advertise param
  summary: ble set adv parameter channel map
  steps: |
    1. DUT1 stop advertise
    2. DUT1 start adv on channel 37
    3. PC do active scan and capture advertising report
    4. repeat step 1-3 with channel map 38, 39, all
    4. repeat step 1-3 with channel map not valid
  expected result: |
    1. succeed
    2. succeed
    3. get ADV_IND with DUT1 BT MAC
    4. get ADV_IND with DUT1 BT MAC
    5. can not get ADV_IND with DUT1 BT MAC
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  allow fail: 1/2
  cmd set:
  - ""
  - - "SSC SSC1 bleadv -L -c 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - *open_capture_nic
  - - LOOP 7 3 "[1,2,3,4,5,6,7]" "['PDU','PDU','PDU','PDU','PDU','PDU','PDU']"
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -D -z start -t 0 -h {%d}"
    - ["R SSC1 C +BLEADV:Start,OK"]
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC {%s} (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.event_type_0="ADV_IND")(HCIEvent.address_0=<dut1_bt_mac>)'
  - - "SSC SSC1 bleadv -D -z start -t 0 -h 8"
    - ["R SSC1 C +BLEADV:Start,ERROR"]
- ID: BTSTK_GAP_03004
  <<: *GAP_CASE
  test point 2: BLE GAP set advertise param
  summary: ble set adv parameter peer address and peer address type
  steps: |
    1. DUT1 stop advertise
    2. DUT1 start adv with adv type DIRECT_IND_HIGH, peer address type public and peer address as <hci_nic_mac>
    3. PC do active scan and capture advertising report
    4. repeat step 1-3 with adv type DIRECT_IND_HIGH, peer address type random and peer address as <hci_nic_mac>
  expected result: |
    1. succeed
    2. succeed
    3. get ADV_IND with DUT1 name DUT1 BT MAC
    4. get ADV_IND with DUT1 name and DUT1 BT MAC
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  allow fail: 2/3
  cmd set:
  - ""
  - - "SSC SSC1 bleadv -L -c 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - *open_capture_nic
  - *dut1_stop_adv
  - - LOOP 2 2 "[0,1]" "['=','!=']"
    - [""]
  - - "SSC SSC1 bleadv -D -z start -t 1 -y {%d} -b <hci_nic_mac>"
    - ["R SSC1 C +BLEADV:OK"]
  - - "HCITOOL 2 -i <hci_nic> lescan"
    - - 'P PC_COM C +HCITOOL:OK'
      - 'P BLENIC PDU (HCIEvent.le_sub_event_code="LEAdvReport")(HCIEvent.address_0{%s}<dut1_bt_mac>)'
- ID: BTSTK_GAP_03005
  <<: *GAP_CASE
  CI ready: "No"
  test point 2: BLE GAP set advertise param
  summary: ble set adv parameter adv interval
  steps: |
    1. DUT1 stop advertise
    2. DUT1 start adv with adv interval 0x20-0x20 on channel 1
    3. PC do active scan and capture advertising report
    4. repeat step 1-3 with adv interval 0x40-0x40, 0x60-0x60
  expected result: |
    1. succeed
    2. succeed
    3. calculate adv intervals, within the interval range in adv param
    4. calculate adv intervals, within the interval range in adv param
  initial condition: BLE_INIT1
  test environment: SSC_T1_3
  CI ready: 'No'
  cmd set:
  - "BLEFunction/AdvInterval"
  - - interval_list = ["0x0020-0x0020", "0x0040-0x0040", "0x0060-0x0060"]
    - ['']
  - - deviation = 0.3
    - ['']
- ID: BTSTK_GAP_03008
  <<: *GAP_CASE
  test point 2: BLE GAP set advertise param
  summary: ble adv with random address and RPA_PUBLIC
  initial condition: BLE_INIT_SMP
  steps: |
    1. DUT2 set random address
    2. DUT2 adv with RPA_PUBLIC
    3. DUT1 start scan
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  cmd set:
  - ""
  - - "SSC SSC1 bleadv -L -c 0 -t 3 -n 1"
    - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - - "SSC SSC2 bleadv -D -z stop"
    - ["R SSC2 C +BLEADV:Stop,OK"]
  - - "SSC SSC2 ble -S -z privacy -p 1"
    - ["R SSC2 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC2 bleadv -D -z start -t 0 -o 2"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC1 blescan -D -z start"
    - ["R SSC1 NP <dut2_bt_mac> C InquiryComplete"]
- ID: BTSTK_GAP_03009
  <<: *GAP_CASE
  test point 2: BLE GAP set advertise param
  summary: ble set adv owner address type as RPA_PUBLIC
  initial condition: BLE_INIT_SMP
  steps: |
    1. DUT2 set owner address type as RPA_PUBLIC and start adv
    2. DUT1 scan
    3. exchange IRK and pairing
    4. DUT2 set privacy
    5. DUT2 set owner address type as RPA_PUBLIC and start adv
    6. DUT1 scan
    7. DUT1 connect to DUT2
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. succeed
    5. succeed
    6. succeed
    7. succeed
  cmd set:
  - ""
  - - "SSC SSC2 ble -S -z name -n <dut1_ble_name>"
    - ["R SSC2 C +BLE:OK"]
  - - "SSC SSC2 blesmp -S -z AuthReqMode -v 0x01"
    - ['P SSC2 C +BLESMP:OK']
  - - "SSC SSC2 blesmp -S -z IOCAP -v 0x03"
    - ['P SSC2 C +BLESMP:OK']
  - - "SSC SSC[1-2] blesmp -S -z RspKey -v 0x02"
    - ['P SSC[1-2] C +BLESMP:OK']
  - - "SSC SSC[1-2] blesmp -S -z InitKey -v 0x02"
    - ['P SSC[1-2] C +BLESMP:OK']
  - - "SSC SSC2 bleadv -L -c 0 -n 1"
    - ["R SSC2 C +BLEADV:SetAdv,OK"]
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
    - ['P SSC1 C +BLECONN:GapConnect,OK', 'P SSC2 C +BLECONN:GapConnect,OK']
  - - "SSC SSC2 blesmp -E -r <dut1_bt_mac> -z Enc"
    - ['P SSC[1-2] C +BLESMP:AuthComplete,Success,0']
  - - "SSC SSC1 bleconn -D -z all"
    - ['P SSC1 C +BLECONN:GapDisconnect,OK', 'P SSC2 C +BLECONN:GapDisconnect,OK']
  - - "SSC SSC2 ble -S -z privacy -p 1"
    - ["R SSC2 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC2 bleadv -D -z stop"
    - ["R SSC2 C +BLEADV:"]
  - - "SSC SSC2 bleadv -D -z start -o 2"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC1 blescan -D -z start"
    - ["R SSC1 P <dut2_bt_mac> C Complete"]
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
    - ["R SSC1 C +BLECONN:GapConnect,OK", "R SSC2 C +BLECONN:GapConnect,OK"]
- ID: BTSTK_GAP_03010
  <<: *GAP_CASE
  CI ready: "No"  # can't restore to use public address after set to use private address
  test point 2: BLE GAP set advertise param
  summary: ble adv with privacy address and RPA_RANDOM
  initial condition: BLE_INIT_SMP
  steps: |
    1. DUT2 set random address
    2. DUT2 adv with RPA_RANDOM
    3. DUT1 start scan
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  cmd set:
  - ""
  - - "SSC SSC2 bleadv -D -z stop"
    - ["R SSC2 C +BLEADV:Stop,OK"]
  - *set_default_ble_name
  - - "SSC SSC2 ble -S -z randAddr -a <static_device_addr> -r 1"
    - ["R SSC2 C +BLECONN:SetRandAddr,OK"]
  - - "SSC SSC2 ble -S -z privacy -p 1"
    - ["R SSC2 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC2 bleadv -L -c 0 -n 1"
    - ["R SSC2 C +BLEADV:SetAdv,OK"]
  - - "SSC SSC2 bleadv -D -z start -t 0 -o 3"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC1 blescan -D -z start"
    - ["R SSC1 NP <dut2_bt_mac> C Complete"]
- ID: BTSTK_GAP_03011
  <<: *GAP_CASE
  CI ready: "No"  # can't restore to use public address after set to use private address
  test point 2: BLE GAP set advertise param
  summary: ble set adv owner address type as RPA_RANDOM
  initial condition: BLE_INIT_SMP
  steps: |
    1. DUT2 set owner address type as RPA_RANDOM and start adv
    2. DUT2 set static random address
    3. DUT2 set owner address type as RPA_RANDOM and start adv
    4. DUT1 start scan
    5. exchange IRK and do pairing
    6. DUT2 set privacy
    7. DUT2 set owner address type as RPA_RANDOM and start adv
    8. DUT1 scan
    9. DUT1 connect to DUT2
  expected result: |
    1. failed
    2. succeed
    3. succeed
    4. succeed
    5. succeed
    6. succeed
    7. succeed
    8. succeed
    9. succeed
  cmd set:
  - ""
  - - "SSC SSC[1-2] blesmp -S -z AuthReqMode -v 0x01"
    - ['P SSC[1-2] C +BLESMP:OK']
  - - "SSC SSC[1-2] blesmp -S -z IOCAP -v 0x02"
    - ['P SSC[1-2] C +BLESMP:OK']
  - - "SSC SSC[1-2] blesmp -S -z RspKey -v 0x02"
    - ['P SSC[1-2] C +BLESMP:OK']
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
    - ['P SSC1 C +BLECONN:GapConnect,OK', 'P SSC2 C +BLECONN:GapConnect,OK']
  - - "SSC SSC2 blesmp -E -r <dut1_bt_mac> -z Enc"
    - ['P SSC[1-2] C +BLESMP:AuthComplete,Success,0']
  - - "SSC SSC1 bleconn -D -z all"
    - ['P SSC1 C +BLECONN:GapDisconnect,OK', 'P SSC2 C +BLECONN:GapDisconnect,OK']
  - - "SSC SSC2 ble -S -z randAddr -a <static_device_addr> -r 1"
    - ["R SSC2 C +BLECONN:SetRandAddr,OK"]
  - - "SSC SSC2 ble -S -z privacy -p 1"
    - ["R SSC2 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC2 bleadv -D -z stop"
    - ["R SSC2 C +BLEADV:"]
  - - "SSC SSC2 bleadv -D -z start -o 3"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC1 blescan -D -z start"
    - ["R SSC1 P <dut2_bt_mac> C Complete"]
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
    - ["R SSC1 C +BLECONN:GapConnect,OK", "R SSC2 C +BLECONN:GapConnect,OK"]
- ID: BTSTK_GAP_03012
  <<: *GAP_CASE
  test point 2: BLE GAP set advertise param
  summary: set ble adv peer_address_type as RPA_PUBLIC and RPA_RANDOM
  initial condition: BLE_INIT_SMP
  steps: |
    1. DUT1 set peer address and peer address type RPA_PUBLIC
    2. DUT1 set peer address and peer address type RPA_RANDOM
  expected result: |
    1. succeed
    2. succeed
  cmd set:
  - ""
  - - "SSC SSC1 bleadv -D -z stop"
    - ["R SSC1 C +BLEADV:"]
  - - "SSC SSC1 bleadv -D -z start -b <dut2_bt_mac> -y 2"
    - ["R SSC1 C +BLEADV:Start,ERROR"]
  - - "SSC SSC1 bleadv -D -z start -b <dut2_bt_mac> -y 3"
    - ["R SSC1 C +BLEADV:Start,ERROR"]
- ID: BTSTK_GAP_04001
  <<: *GAP_CASE
  test point 2: BLE GAP set scan param
  summary: ble set scan type
  steps: |
    1. stop advertise and set short device name
    2. DUT1 set adv data with manufacturer data A
    3. DUT1 set scan response data with manufacturer data B
    4. DUT2 do passive scan
    5. DUT2 do active scan
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. get manufacturer data A
    5. get manufacturer data B
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -R -t 1 -r 0x15FF1011121314151617181910111213141516171819"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - - "SSC SSC1 bleadv -R -t 2 -r 0x020AEB"
    - ["R SSC1 C +BLEADV:SetScanRes,OK"]
  - *dut1_start_adv
  - *dut2_stop_adv
  - - "SSC SSC2 blescan -D -z start -t 3 -e 2 -c 0 -s 0"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,man,0x1011121314151617181910111213141516171819"%%(<dut1_bt_mac>)'
      - 'R SSC2 NRE "\+BTSCANEXT:%%s,txp,0xEB"%%(<dut1_bt_mac>) C Complete'
  - - "SSC SSC2 blescan -D -z stop"
    - ['R SSC2 C +BLESCAN']
  - - "SSC SSC2 blescan -D -z start -t 3 -e 1 -c 0 -s 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,man,0x1011121314151617181910111213141516171819"%%(<dut1_bt_mac>)'
      - 'P SSC2 RE "\+BTSCANEXT:%%s,txp,0xEB"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_04002
  <<: *GAP_CASE
  test point 2: BLE GAP set scan param
  summary: ble set scan own address type (not test if own address work as expected)
  steps: |
    1. DUT1 start advertising
    2. DUT2 set own addr type (public, random, rpa_public, rpa_random)
    3. DUT2 do active scan
    4. DUT2 set invalid own addr type
  expected result: |
    1. succeed
    2. succeed
    3. able to scan DUT1
    4. error
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -t 3"
    - ["R SSC1 C +BLEADV:SetScanRes,OK"]
  - *dut1_start_adv
  - *dut2_stop_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -c 0 -s 1 -o 0"
    - ['R SSC2 P <dut1_bt_mac> C Complete']
  - - "SSC SSC2 ble -S -z privacy -p 1"
    - ["R SSC2 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC2 blescan -D -z start -t 1 -c 0 -s 1 -o 2"
    - ['R SSC2 P <dut1_bt_mac> C Complete']
  - - "SSC SSC2 ble -S -z randAddr -a <static_device_addr> -r 1"
    - ["R SSC2 C +BLECONN:SetRandAddr,OK"]
  - - "SSC SSC2 blescan -D -z start -t 1 -c 0 -s 1 -o 1"
    - ['R SSC2 P <dut1_bt_mac> C Complete']
  - - "SSC SSC2 ble -S -z privacy -p 1"
    - ["R SSC2 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC2 blescan -D -z start -t 1 -c 0 -s 1 -o 3"
    - ['R SSC2 P <dut1_bt_mac> C Complete']
- ID: BTSTK_GAP_04003
  <<: *GAP_CASE
  test point 2: BLE GAP set scan param
  summary: ble set scan interval (will not test if scan interval work as expected)
  steps: |
    1. DUT2 start advertising
    2. DUT1 set scan interval 0x0004
    3. DUT1 set scan interval 0x4000
    4. DUT1 set invalid scan interval
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. error
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 blescan -D -z start -c 0 -s 1 -i 0x0004 -w 0x0004"
    - ["R SSC1 C +BLESCAN:Start,OK"]
  - - "SSC SSC1 blescan -D -z stop"
    - ["R SSC1 C +BLESCAN:Stop,OK"]
  - - "SSC SSC1 blescan -D -z start -c 0 -s 1 -i 0x4000 -w 0x4000"
    - ["R SSC1 C +BLESCAN:Start,OK"]
  - - "SSC SSC1 blescan -D -z stop"
    - ["R SSC1 C +BLESCAN:Stop,OK"]
  - - "SSC SSC1 blescan -D -z start -c 0 -s 1 -i 0x0003 -w 0x0003"
    - ["R SSC1 C +BLESCAN:Start,ERROR"]
  - - "SSC SSC1 blescan -D -z start -c 0 -s 1 -i 0x4001 -w 0x4001"
    - ["R SSC1 C +BLESCAN:Start,ERROR"]
- ID: BTSTK_GAP_04004
  <<: *GAP_CASE
  test point 2: BLE GAP set scan param
  summary: ble set scan window (will not test if scan window work as excepted)
  steps: |
    1. DUT2 set scan interval 0x0004
    2. DUT2 set scan interval 0x4000
    3. DUT2 set scan interval 0x0003
    4. DUT2 set scan interval 0x4001
  expected result: |
    1. succeed
    2. succeed
    3. fail
    4. fail
  initial condition: BLE_INIT1
  test environment: SSC_T1_4
  cmd set:
  - ""
  - - "SSC SSC1 blescan -D -z start -c 0 -w 0x0004 -i 0x0004"
    - ["R SSC1 C +BLESCAN:Start,OK"]
  - - "SSC SSC1 blescan -D -z stop"
    - ["R SSC1 C +BLESCAN:Stop,OK"]
  - - "SSC SSC1 blescan -D -z start -c 0 -w 0x4000 -i 0x4000"
    - ["R SSC1 C +BLESCAN:Start,OK"]
  - - "SSC SSC1 blescan -D -z stop"
    - ["R SSC1 C +BLESCAN:Stop,OK"]
  - - "SSC SSC1 blescan -D -z start -c 0 -w 0x0003 -i 0x0003"
    - ["R SSC1 C +BLESCAN:Start,ERROR"]
  - - "SSC SSC1 blescan -D -z start -c 0 -w 0x4001 - 0x4001"
    - ["R SSC1 C +BLESCAN:Start,ERROR"]
- ID: BTSTK_GAP_05001
  <<: *GAP_CASE
  test point 2: BLE GAP start stop adv / scan
  summary: stop and start adv in wrong state
  steps: |
    1. DUT1 stop adv
    2. DUT1 stop adv
    3. DUT2 do passive scan
    4. DUT1 start adv
    5. DUT1 start adv
    6. DUT2 do passive scan
  expected result: |
    1. succeed
    2. succeed
    3. DUT1 not in scan result
    4. succeed
    5. succeed
    6. DUT1 in scan result
  cmd set:
  - ""
  - *dut1_stop_adv
  - *dut1_stop_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -c 0"
    - ["R SSC2 NP <dut1_bt_mac> C Complete"]
  - *dut1_start_adv
  - - "SSC SSC1 bleadv -D -z start"
    - ["R SSC1 C +BLEADV:Start"]
  - - "SSC SSC2 blescan -D -z start -t 1 -c 0"
    - ["R SSC2 P <dut1_bt_mac> C Complete"]
- ID: BTSTK_GAP_05002
  <<: *GAP_CASE
  test point 2: BLE GAP start stop adv / scan
  summary: cancel scan when scanning or not scanning
  steps: |
    1. DUT1 start scanning for 3 seconds
    2. DUT1 stop scanning
    3. DUT1 stop scanning
  expected result: |
    1. succeed
    2. succeed
    3. failed
  initial condition: BLE_INIT1
  test environment: SSC_T1_4
  cmd set:
  - ""
  - - "SSC SSC1 blescan -D -z start -t 3 -c 0"
    - ["R SSC1 C +BLESCAN:OK"]
  - - "SSC SSC1 blescan -D -z stop"
    - ["R SSC1 C +BLESCAN:Stop,OK"]
  - - "SSC SSC1 blescan -D -z stop"
    - ["R SSC1 C +BLESCAN:Stop,ERROR"]
- ID: BTSTK_GAP_08001
  <<: *GAP_CASE
  test point 2: BLE GAP operation without init/enable BT or register callback
  summary: do adv, scan, set name when BT is deinit
  steps: |
    1. DUT1 do adv
    2. DUT1 do set name
  expected result: |
    1. fail
    2. fail
  initial condition: BLE_DEINIT1
  test environment: SSC_T1_4
  cmd set:
  - ""
  - - "SSC SSC1 bleadv -L -c 0"
    - ["R SSC1 C +BLEADV"]
  - - "SSC SSC1 bleadv -D -z start"
    - ["R SSC1 C +BLEADV"]
  - - "SSC SSC1 ble -S -z name -n abcde"
    - ["R SSC1 C +BLE"]
- ID: BTSTK_GAP_08002
  <<: *GAP_CASE
  test point 2: BLE GAP operation without init/enable BT or register callback
  summary: do adv, scan, set name, conn when BT is disable
  steps: |
    1. DUT1 do init
    2. DUT1 do adv
    3. DUT2 do set name
  expected result: |
    1. succeed
    2. fail
    3. fail
  initial condition: BLE_DEINIT1
  test environment: SSC_T1_4
  cmd set:
  - ""
  - - "SSC SSC1 bt -D -z init"
    - ["R SSC1 C +BT:OK"]
  - - "SSC SSC1 bleadv -L -c 0"
    - ["R SSC1 C +BLEADV"]
  - - "SSC SSC1 bleadv -D -z start"
    - ["R SSC1 C +BLEADV"]
  - - "SSC SSC1 ble -S -z name -n abcde"
    - ["R SSC1 C +BLE"]
- ID: BTSTK_GAP_08003
  <<: *GAP_CASE
  test point 2: BLE GAP operation without init/enable BT or register callback
  summary: do adv, scan, set name, conn when BT is enable but no callback registered
  steps: |
    1. DUT1 do init and enable
    2. DUT1 do adv
    3. DUT2 do set name
  expected result: |
    1. succeed
    2. fail
    3. fail
  initial condition: BLE_DEINIT1
  test environment: SSC_T1_4
  cmd set:
  - ""
  - - "SSC SSC1 bt -D -z start"
    - ["R SSC1 C +BT:OK"]
  - - "SSC SSC1 bleadv -L -c 0"
    - ["R SSC1 C +BLEADV"]
  - - "SSC SSC1 bleadv -D -z start"
    - ["R SSC1 C +BLEADV"]
  - - "SSC SSC1 ble -S -z name -n abcde"
    - ["R SSC1 C +BLE"]
- ID: BTSTK_GAP_09002
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: process scan data service UUIDs
  steps: |
    1. DUT1 set raw adv 16 bit Complete UUID list
    2. DUT1 start adv
    3. DUT2 do active scan with extended scan data
    4. repeat step 1-3 with 16 bit incomplete UUID, 32 bit complete/incomplete UUID, 128 bit complete/incomplete UUID
  expected result: |
    1. succeed
    2. succeed
    3. scan with the correct adv data
    4. scan with the correct adv data
  cmd set:
  - ""
  - *dut2_stop_adv
  - - LOOP 4 4 "['0302ABCD','0303ABCD','0504ABCDABCD','0505ABCDABCD',]" "['insrv16,0xABCD','srv16,0xABCD','insrv32,0xABCDABCD','srv32,0xABCDABCD']"
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -R -t 1 -r 0x{%s}"
    - ["R SSC1 C +BLEADV:OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,{%s}"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
  - - LOOP 2 4 "['1106ABCDABCDABCDABCDABCDABCDABCDABCD','1107ABCDABCDABCDABCDABCDABCDABCDABCD']" "['insrv128,0xABCDABCDABCDABCDABCDABCDABCDABCD','srv128,0xABCDABCDABCDABCDABCDABCDABCDABCD']"
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -R -t 1 -r 0x{%s}"
    - ["R SSC1 C +BLEADV:OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,{%s}"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09003
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: process scan data service data
  steps: |
    1. DUT1 set raw adv 16 bit service data
    2. DUT1 start adv
    3. DUT2 do active scan with extended scan data
    4. repeat step 1-3 with 32 bit service data, 128 bit service data
  expected result: |
    1. succeed
    2. succeed
    3. scan with the correct adv data
    4. scan with the correct adv data
  cmd set:
  - ""
  - *dut2_stop_adv
  - - LOOP 3 4 "['0416ABCDEF','0620ABCDABCDEF','1221ABCDABCDABCDABCDABCDABCDABCDABCDEF',]" "['srvdata16,0xABCDEF','srvdata32,0xABCDABCDEF','srvdata128,0xABCDABCDABCDABCDABCDABCDABCDABCDEF']"
  - - "SSC SSC1 bleadv -R -t 1 -r 0x{%s}"
    - ["R SSC1 C +BLEADV:OK"]
  - *dut1_stop_adv
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,{%s}"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09005
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: proccess scan data included device name
  steps: |
    1. DUT1 stop advertise and set short device name abcde
    2. DUT1 set include device name for adv data and scan response
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
    5. DUT1 stop advertising
    6. DUT1 set not include device name for adv data and scan response
    7. DUT1 start advertising
    8. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. scan with the correct adv data
    5. succeed
    6. succeed
    7. succeed
    8. scan with the correct adv data
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 ble -S -z name -n abcde"
    - ["R SSC1 C +BLE"]
  - - "SSC SSC1 bleadv -L -c 0 -n 1 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCAN:INQ,%%s,abcde"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCAN:INQ,%%s,NULL"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09006
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: proccess scan data included Tx power
  steps: |
    1. DUT1 stop advertise and set short device name
    2. DUT1 set include Tx power for adv data and scan response
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
    5. DUT1 stop advertising
    6. DUT1 set not include Tx power for adv data and scan response
    7. DUT1 start advertising
    8. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. scan with the correct adv data
    5. succeed
    6. succeed
    7. succeed
    8. scan with the correct adv data
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -x 1 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,txp,0x03"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -x 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'R SSC2 NRE "\+BTSCANEXT:%%s,txp,0x03"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09008
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: proccess scan data included appearance
  steps: |
    1. DUT1 stop advertise and set short device name
    2. DUT1 set appearance to 0 for adv data and scan response
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
    5. DUT1 stop advertising
    6. DUT1 set appearance to 1 for adv data and scan response
    7. DUT1 start advertising
    8. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. scan with the correct adv data
    5. succeed
    6. succeed
    7. succeed
    8. scan with the correct adv data
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -a 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 NRE "\+BTSCANEXT:%%s,app,0x0100"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -a 1 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,app,0x0100"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09009
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: proccess scan data included manufacturer data
  steps: |
    1. DUT1 stop advertise and set short device name
    2. DUT1 set manufacturer to 0x12345678 for adv data and scan response
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. scan with the correct adv data
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -m 0x12345678 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,man,0x12345678"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09010
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: proccess scan data included service data
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response service data 0x1234123456 and not include device name
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. scan with the correct adv data
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -d 0x1234123456 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,srvdata16,0x1234123456"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09011
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: proccess scan data included service uuid list
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response not include name, service uuid list 0xABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. scan with the correct adv data
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -x 0 -i 0x00-0x00 -s ABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1 -c 0 -d 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,srv16,0xABCD"%%(<dut1_bt_mac>)'
      - 'P SSC2 RE "\+BTSCANEXT:%%s,srv32,0xABCDDCBA"%%(<dut1_bt_mac>)'
      - 'P SSC2 RE "\+BTSCANEXT:%%s,srv128,0x12349B5F8000008000100000ABCD0000"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09012
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: adv include name and not set device name
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response include name
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. failed
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 1 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - - "SSC SSC1 bleadv -D -z start"
    - ["R SSC1 C +BLEADV:Start,OK"]
  - - "SSC SSC2 blescan -D -z start -c 0"
    - - 'P SSC2 RE "\+BTSCAN:INQ,%%s"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09013
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: adv manufacturer_len not equal to real len
  steps: |
    1. DUT1 stop adv
    2. DUT1 set manufacturer len shorter then real len
    3. DUT1 start adv
    4. DUT2 start scan
    5. DUT1 stop adv
    6. DUT1 set manufacturer len longer then real len
    7. DUT1 start adv
    8. DUT2 start scan
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. succeed
    5. succeed
    6. succeed
    7. succeed
    8. succeed
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -m 0x12345678 -t 3 -l 6"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -e 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,man,0x12345678"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -m 0x12345678 -t 3 -l 10"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -e 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,man,0x12345678"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09014
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: set adv service data length not equal to real length
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response service data 0x1234123456 and set service data length 4
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
    5. DUT1 stop advertise
    6. DUT1 set advertising data and scan response service data 0x1234123456 and set service data length 10
    7. DUT1 start advertising
    8. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. scan with the correct adv data
    5. succeed
    6. succeed
    7. succeed
    8. scan with the correct adv data
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -d 0x1234123456 -t 3 -l 4"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,srvdata16,0x1234123456"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -d 0x1234123456 -t 3 -l 10"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,srvdata16,0x1234123456"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_09015
  <<: *GAP_CASE
  test point 2: BLE GAP processing scan data
  summary: set service uuid length not equal to real length
  steps: |
    1. DUT1 stop advertise
    2. DUT1 set advertising data and scan response not include name, service uuid list 0xABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 and set service uuid length 32
    3. DUT1 start advertising
    4. DUT2 start scan and processing scan data
    5. DUT1 stop advertise
    6. DUT1 set advertising data and scan response not include name, service uuid list 0xABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 and set service uuid length 64
    7. DUT1 start advertising
    8. DUT2 start scan and processing scan data
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. scan with the correct adv data
    5. succeed
    6. succeed
    7. succeed
    8. scan with the correct adv data
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -x 0 -i 0x00-0x00 -s ABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 -t 3 -l 32"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,srv16,0xABCD"%%(<dut1_bt_mac>)'
      - 'P SSC2 RE "\+BTSCANEXT:%%s,srv32,0xABCDDCBA"%%(<dut1_bt_mac>)'
      - 'P SSC2 RE "\+BTSCANEXT:%%s,srv128,0x12349B5F8000008000100000ABCD0000"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
  - *dut1_stop_adv
  - - "SSC SSC1 bleadv -L -c 0 -n 0 -x 0 -i 0x00-0x00 -s ABCD,ABCDDCBA,12349B5F8000008000100000ABCD0000 -t 3 -l 64"
    - ["R SSC1 C +BLEADV:SetAdv,OK"]
  - *dut1_start_adv
  - - "SSC SSC2 blescan -D -z start -t 1 -e 1"
    - - 'P SSC2 RE "\+BTSCANEXT:%%s,srv16,0xABCD"%%(<dut1_bt_mac>)'
      - 'P SSC2 RE "\+BTSCANEXT:%%s,srv32,0xABCDDCBA"%%(<dut1_bt_mac>)'
      - 'P SSC2 RE "\+BTSCANEXT:%%s,srv128,0x12349B5F8000008000100000ABCD0000"%%(<dut1_bt_mac>)'
      - 'R SSC2 C Complete'
- ID: BTSTK_GAP_10001
  <<: *GAP_CASE
  CI ready: 'No'
  test point 2: BLE GAP master multi connection test
  summary: master connect to 3 slaves with different app and master do disconnect
  steps: |
    1. DUT2-DUT4 starts adv
    2. DUT1 connect to DUT2 - DUT4
    3. DUT1 disconnect with DUT2 - DUT4
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  initial condition: BLE_INIT5
  test environment: SSC_T5_1
  allow fail: 3/5
  cmd set:
  - ""
  - - "SSC SSC[2-4] bleadv -D -z start"
    - ["P SSC[2-4] C +BLEADV:Start,OK"]
  - - LOOP 3 1 "[0,1,2]" "[2,3,4]" "[2,3,4]"
    - ""
  - - "SSC SSC1 bleconn -C -p 0x1{%d} -a <dut{%d}_bt_mac>"
    - ['P SSC1 C +BLECONN:GapConnect,OK',  'P SSC{%d} C +BLECONN:GapConnect,OK']
  - - LOOP 3 1 "[2,1,0]" "[4,3,2]" "[4,3,2]"
    - ""
  - - "SSC SSC1 bleconn -D -z client -p 0x1{%d} -a <dut{%d}_bt_mac>"
    - ['P SSC1 C +BLECONN:GapDisconnect,OK', 'P SSC{%d} C +BLECONN:GapDisconnect,OK']
- ID: BTSTK_GAP_10002
  <<: *GAP_CASE
  CI ready: 'No'
  test point 2: BLE GAP master multi connection test
  summary: master connect to 3 slaves with different app and slave do disconnect
  steps: |
    1. DUT2-DUT4 starts adv
    2. DUT1 connect to DUT2 - DUT4
    3. DUT1 disconnect with DUT2 - DUT4
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  initial condition: BLE_INIT5
  test environment: SSC_T5_1
  allow fail: 3/5
  cmd set:
  - ""
  - - "SSC SSC[2-4] bleadv -D -z start"
    - ["P SSC[2-4] C +BLEADV:Start,OK"]
  - - LOOP 3 1 "[0,1,2]" "[2,3,4]" "[2,3,4]"
    - ""
  - - "SSC SSC1 bleconn -C -p 0x1{%d} -a <dut{%d}_bt_mac>"
    - ['P SSC1 C +BLECONN:GapConnect,OK', 'P SSC{%d} C +BLECONN:GapConnect,OK']
    - - LOOP 3 1 "[2,3,4]" "[2,3,4]"
    - ""
  - - "SSC SSC{%d} bleconn -D -z server -p 0xA0 -r <dut1_bt_mac>"
    - ['P SSC1 C +BLECONN:GapDisconnect,OK,001[0-2]', 'P SSC{%d} C +BLECONN:GapDisconnect,OK']
- ID: BTSTK_GAP_10003
  <<: *GAP_CASE
  CI ready: 'No'
  test point 2: BLE GAP master multi connection test
  summary: master connect to 4 slaves with same app and master do disconnect
  steps: |
    1. DUT2-DUT4 starts adv
    2. DUT1 connect to DUT2 - DUT5
    3. DUT1 disconnect with DUT2 - DUT5
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  initial condition: BLE_INIT5
  test environment: SSC_T5_1
  allow fail: 3/5
  cmd set:
  - ""
  - - "SSC SSC[2-5] bleadv -D -z start"
    - ["P SSC[2-5] C +BLEADV:Start,OK"]
  - - LOOP 4 1 "[2,3,4,5]" "[2,3,4,5]"
    - ""
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut{%d}_bt_mac>"
    - ['R SSC1 C +BLECONN:GapConnect,OK', 'R SSC{%d} C +BLECONN:GapConnect,OK']
  - - LOOP 4 1 "[2,3,4,5]" "[2,3,4,5]"
    - ""
  - - "SSC SSC1 bleconn -D -z client -p 0x10 -a <dut{%d}_bt_mac>"
    - ['P SSC1 C +BLECONN:GapDisconnect,OK', 'P SSC{%d} C +BLECONN:GapDisconnect,OK']
- ID: BTSTK_GAP_10004
  <<: *GAP_CASE
  CI ready: 'No'
  test point 2: BLE GAP master multi connection test
  summary: master connect to 4 slaves with same app and slave do disconnect
  steps: |
    1. DUT2-DUT4 starts adv
    2. DUT1 connect to DUT2 - DUT5
    3. DUT1 disconnect with DUT2 - DUT5
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  initial condition: BLE_INIT5
  test environment: SSC_T5_1
  allow fail: 3/5
  cmd set:
  - ""
  - - "SSC SSC[2-5] bleadv -D -z start"
    - ["P SSC[2-5] C +BLEADV:Start,OK"]
  - - LOOP 4 1 "[2,3,4,5]" "[2,3,4,5]"
    - ""
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut{%d}_bt_mac>"
    - ['R SSC1 C +BLECONN:GapConnect,OK', 'R SSC{%d} C +BLECONN:GapConnect,OK']
  - - LOOP 4 1 "[2,3,4,5]" "[2,3,4,5]"
    - ""
  - - "SSC SSC{%d} bleconn -D -z server -p 0xA2 -a <dut1_bt_mac>"
    - ['P SSC1 C +BLECONN:GapDisconnect,OK', 'P SSC{%d} C +BLECONN:GapDisconnect,OK']
- ID: BTSTK_GAP_11001
  <<: *GAP_CASE
  CI ready: 'No'
  test point 2: BLE GAP slave multi connection test
  summary: slave connected by 4 master and master do disconnect
  steps: |
    1. DUT2-DUT5 starts adv
    2. DUT1 connect to DUT2 - DUT5
    3. DUT1 disconnect with DUT2 - DUT5
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  initial condition: BLE_INIT5
  test environment: SSC_T5_1
  allow fail: 3/5
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 gatts -S -z load -p 0xA2"
    - ['R SSC1 C +GATTS:StartService,OK,A002']
  - - LOOP 4 2 "[2,3,4,5]" "[2,3,4,5]"
    - ""
  - - "SSC SSC1 bleadv -D -z start"
    - ["P SSC1 C +BLEADV:Start,OK"]
  - - "SSC SSC{%d} bleconn -C -p 0x10 -a <dut1_bt_mac>"
    - ['R SSC{%d} C +BLECONN:GapConnect,OK,0010', 'R SSC1 C +BLECONN:GapConnect,OK']
  - - LOOP 4 1 "[2,3,4,5]" "[2,3,4,5]"
  - - "SSC SSC{%d} bleconn -D -z client -p 0x10 -a <dut1_bt_mac>"
    - ['P SSC{%d} C +BLECONN:GapDisconnect,OK', 'P SSC1 C +BLECONN:GapDisconnect,OK']
- ID: BTSTK_GAP_11002
  <<: *GAP_CASE
  CI ready: 'No'
  test point 2: BLE GAP slave multi connection test
  summary: slave connected by 4 master and slave do disconnect
  steps: |
    1. DUT2-DUT5 starts adv
    2. DUT1 connect to DUT2 - DUT5
    3. DUT1 disconnect with DUT2 - DUT5
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  initial condition: BLE_INIT5
  test environment: SSC_T5_1
  allow fail: 3/5
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 gatts -S -z load -p 0xA2"
    - ['R SSC1 C +GATTS:StartService,OK,A002']
  - - LOOP 4 2 "[2,3,4,5]" "[2,3,4,5]"
    - ""
  - - "SSC SSC1 bleadv -D -z start"
    - ["P SSC1 C +BLEADV:Start,OK"]
  - - "SSC SSC{%d} bleconn -C -p 0x10 -a <dut1_bt_mac>"
    - ['R SSC{%d} C +BLECONN:GapConnect,OK,0010', 'R SSC1 C +BLECONN:GapConnect,OK']
  - - LOOP 4 1 "[2,3,4,5]" "[2,3,4,5]"
    - ""
  - - "SSC SSC1 bleconn -D -z server -p 0xA2 -a <dut{%d}_bt_mac>"
    - ['P SSC{%d} C +BLECONN:GapDisconnect,OK', 'P SSC1 C +BLECONN:GapDisconnect,OK']
- ID: BTSTK_GAP_12001
  <<: *GAP_CASE
  CI ready: 'No'
  test point 2: BLE GAP multi connection as both master and slave role test
  summary:  connected by 2 masters and connect to 2 slaves and do disconnect
  steps: |
    1. DUT1 starts adv
    2. DUT2 DUT3 connect to DUT1
    3. DUT1 connect to DUT4 DUT5
    4. DUT1 do disconnect
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. succeed
  initial condition: BLE_INIT5
  test environment: SSC_T5_1
  allow fail: 3/5
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 gatts -S -z load -p 0xA2"
    - ['R SSC1 C +GATTS:StartService,OK,A002']
  - - LOOP 2 2 "[2,3]" "[2,3]"
    - ""
  - - "SSC SSC1 bleadv -D -z start"
    - ["P SSC1 C +BLEADV:Start,OK"]
  - - "SSC SSC{%d} bleconn -C -p 0x10 -a <dut1_bt_mac>"
    - ['R SSC{%d} C +BLECONN:GapConnect,OK,0010', 'P SSC1 C +BLECONN:GapConnect,OK']
  - - "SSC SSC[4-5] bleadv -D -z start"
    - ["P SSC[4-5] C +BLEADV:Start,OK"]
  - - LOOP 2 1 "[4,5]" "[4,5]"
    - ""
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut{%d}_bt_mac>"
    - ['P SSC1 C +BLECONN:GapConnect,OK', 'P SSC{%d} C +BLECONN:GapConnect,OK']
  - - "SSC SSC1 bleconn -D -z all"
    - ["P SSC[2-5] C Disconnect"]
- ID: BTSTK_GAP_12002
  <<: *GAP_CASE
  CI ready: 'No'
  test point 2: BLE GAP multi connection as both master and slave role test
  summary:  connected by 2 masters and connect to 2 slaves and be disconnected
  steps: |
    1. DUT1 starts adv
    2. DUT2 DUT3 connect to DUT1
    3. DUT1 connect to DUT4 DUT5
    4. DUT[2-5] do disconnect
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. succeed
  initial condition: BLE_INIT5
  test environment: SSC_T5_1
  allow fail: 3/5
  cmd set:
  - ""
  - *dut1_stop_adv
  - - "SSC SSC1 gatts -S -z load -p 0xA2"
    - ['R SSC1 C +GATTS:StartService,OK,A002']
  - - LOOP 2 2 "[2,3]" "[2,3]"
    - ""
  - - "SSC SSC1 bleadv -D -z start"
    - ["P SSC1 C +BLEADV:Start,OK"]
  - - "SSC SSC{%d} bleconn -C -p 0x10 -a <dut1_bt_mac>"
    - ['R SSC{%d} C +BLECONN:GapConnect,OK,0010', 'R SSC1 C +BLECONN:GapConnect,OK']
  - - "SSC SSC[4-5] bleadv -D -z start"
    - ["P SSC[4-5] C +BLEADV:Start,OK"]
  - - LOOP 2 1 "[4,5]" "[4,5]"
    - ""
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut{%d}_bt_mac>"
    - ['R SSC1 C +BLECONN:GapConnect,OK', 'R SSC{%d} C +BLECONN:GapConnect,OK']
  - - LOOP 4 1 "[2,3,4,5]"
  - - "SSC SSC{%d} bleconn -D -z all"
    - ["P SSC1 C Disconnect"]
- ID: BTSTK_GAP_50001
  <<: *GAP_CASE
  category: Performance
  test point 1: performance + stress
  test point 2: BLE GAP performance test
  summary: BLE Connect and disconnect performance test
  steps: |
    1. DUT1 disconnect with DUT2
    2. DUT2 start advertising
    3. DUT1 connect to DUT2
    4. do service discovery
    5. loop step 1-4
    6. check connection fail ratio and average conn time
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. succeed
    5. succeed
    6. meet pass standard
  initial condition: BLE_INIT2
  execution time: 6
  version: v1 (2017-05-19)
  CI ready: 'No'
  cmd set:
  - "BLEStress/BLEConnPerformance"
  - - "test_time = 20"
    - ""
  - - "average_conn_time = 3"
    - ""
  - - "fail_ratio = 0.01"
    - ""
  - - "fail_timeout = 10"
    - ""
- ID: BTSTK_GAP_50004
  <<: *GAP_CASE
  category: Performance
  test point 1: performance + stress
  test point 2: BLE GAP performance test
  summary: BLE Connect and disconnect correct performance test
  steps: |
    1. DUT1 disconnect with DUT2
    2. DUT2 start advertising
    3. DUT1 connect to DUT2
    4. loop step 1-4 1000 times
    5. reboot
    6. loop step 1-5
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. succeed
    5. succeed
    6. meet pass standard
  initial condition: BLE_INIT2
  execution time: 6
  version: v1 (2017-05-19)
  CI ready: 'No'
  cmd set:
  - "BLEStress/BLEConnCorPerformance"
  - - "test_time = 100"
    - ""
  - - "reboot_time = 1000"
    - ""
  - - "average_conn_time = 3"
    - ""
  - - "fail_ratio = 0.01"
    - ""
  - - "fail_timeout = 10"
    - ""
- ID: BTSTK_GAP_51001
  <<: *GAP_CASE
  category: Performance
  test point 1: performance + stress
  test point 2: BLE GAP performance test
  summary: BLE adv and scan forever
  steps: |
    1. DUT1 do adv
    2. DUT2 do scan
  expected result: |
    1. succeed
    2. succeed
  initial condition: BLE_INIT2
  execution time: 10
  cmd set:
  - "BLEStress/BLEAdvScanPerformance"
  - - "test_time = 600"
    - ""
- ID: BTSTK_GAP_14001
  <<: *GAP_CASE
  test point 2: BLE GAP set randAddr as random address
  summary: adv with static random address and be connected
  steps: |
    1. DUT2 do set randaddr
    2. DUT2 start adv and DUT1 start scan
    3. DUT1 connect to DUT2
  expected result: |
    1. succeed
    2. succeed
    3. succeed
  cmd set:
  - ""
  - - "SSC SSC2 bleadv -D -z stop"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC2 ble -S -z randAddr -a <static_device_addr> -r 1"
    - ["R SSC2 C +BLECONN:SetRandAddr,OK"]
  - - "SSC SSC2 bleadv -D -z start -o 1"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC1 blescan -D -z start"
    - ['R SSC1 P <static_device_addr> C Complete']
  - - "SSC SSC1 bleconn -C -p 0x10 -a <static_device_addr> -r 1"
    - ["P SSC1 C +BLECONN:GapConnect,OK", "P SSC2 C +BLECONN:GapConnect,OK"]
- ID: BTSTK_GAP_14002
  <<: *GAP_CASE
  test point 2: BLE GAP set as pablic address
  summary: BLE GAP set invalid randaddr FF:FF:FF:FF:FF:FF
  steps: |
    1. DUT1 set invalid randaddr FF:FF:FF:FF:FF:FF
  expected result: |
    1. failed
  cmd set:
  - ""
  - - "SSC SSC1 ble -S -z randAddr -a FF:FF:FF:FF:FF:FF -r 1"
    - ["R SSC1 C +BLECONN:SetRandAddr,ERROR"]
- ID: BTSTK_GAP_14003
  <<: *GAP_CASE
  test point 2: BLE GAP set as pablic address
  summary: BLE GAP set invalid randaddr 11:00:00:00:00:00
  steps: |
    1. DUT1 set invalid randaddr 11:00:00:00:00:00
  expected result: |
    1. failed
  cmd set:
  - ""
  - - "SSC SSC1 ble -S -z randAddr -a 11:00:00:00:00:00 -r 1"
    - ["R SSC1 C +BLECONN:SetRandAddr,ERROR"]
- ID: BTSTK_GAP_14004
  <<: *GAP_CASE
  test point 2: BLE GAP set as pablic address
  summary: BLE GAP set invalid randaddr 10:FA:67:25:AB:DA
  steps: |
    1. DUT1 set invalid randaddr 10:FA:67:25:AB:DA
  expected result: |
    1. failed
  cmd set:
  - ""
  - - "SSC SSC1 ble -S -z randAddr -a 10:FA:67:25:AB:DA -r 1"
    - ["R SSC1 C +BLECONN:SetRandAddr,ERROR"]
- ID: BTSTK_GAP_14005
  <<: *GAP_CASE
  test point 2: BLE GAP set as pablic address
  summary: BLE GAP set invalid randaddr 01:49:F0:AF:CA:DB
  steps: |
    1. DUT1 set invalid randaddr 01:49:F0:AF:CA:DB
  expected result: |
    1. failed
  cmd set:
  - ""
  - - "SSC SSC1 ble -S -z randAddr -a 01:49:F0:AF:CA:DB -r 1"
    - ["R SSC1 C +BLECONN:SetRandAddr,ERROR"]
- ID: BTSTK_GAP_14006
  <<: *GAP_CASE
  test point 2: BLE GAP set as pablic address
  summary: BLE GAP set invalid randaddr 00:AC:F6:36:A4:6B
  steps: |
    1. DUT1 set invalid randaddr 00:AC:F6:36:A4:6B
  expected result: |
    1. failed
  cmd set:
  - ""
  - - "SSC SSC1 ble -S -z randAddr -a 00:AC:F6:36:A4:6B -r 1"
    - ["R SSC1 C +BLECONN:SetRandAddr,ERROR"]
- ID: BTSTK_GAP_14007
  <<: *GAP_CASE
  test point 2: BLE set random address test
  summary: BLE set random address as resolvable private address and cannot be scan
  initial condition: BLE_INIT_SMP
  steps: |
    1. SSC1 set adv params and config local privacy as true
    2. SSC1 bleadv and SSC2 blescan
  expected result: |
    1. succeed
    2. succeed
  cmd set:
  - ""
  - - "SSC SSC1 bleadv -L -c 0 -t 3"
    - ["R SSC1 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - - "SSC SSC1 ble -S -z privacy -p 1"
    - ["R SSC1 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC1 bleadv -D -z start -o 2"
    - ["R SSC1 C +BLEADV:OK"]
  - - "SSC SSC2 blescan -D -z start -t 3 -c 0"
    - ["R SSC2 NP <dut1_bt_mac> C +BLESCAN:InquiryComplete"]
- ID: BTSTK_GAP_14008
  <<: *GAP_CASE
  test point 2: BLE set random address test
  summary: BLE pairing and set random address as resolvable private address, reconnect after disconnect
  steps: |
    1. SSC2 set AuthReqMode and IOCAP,set RspKey as Enc and IRK
    2. pairing
    3. SSC1 disconnect to SSC2
    4. SSC2 do local privacy
    5. SSC2 bleadv and SSC1 blescan
    6. SSC1 connect to SSC2
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. succeed
    5. succeed
    6. succeed
  initial condition: BLE_INIT_SMP
  cmd set:
  - ""
  - - "SSC SSC2 blesmp -S -z AuthReqMode -v 0x01"
    - ['P SSC2 C +BLESMP:OK']
  - - "SSC SSC2 blesmp -S -z IOCAP -v 0x03"
    - ['P SSC2 C +BLESMP:OK']
  - - "SSC SSC[1-2] blesmp -S -z RspKey -v 0x02"
    - ['P SSC[1-2] C +BLESMP:OK']
  - - "SSC SSC[1-2] blesmp -S -z InitKey -v 0x02"
    - ['P SSC[1-2] C +BLESMP:OK']
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
    - ['P SSC1 C +BLECONN:GapConnect,OK', 'P SSC2 C +BLECONN:GapConnect,OK']
  - - "SSC SSC2 blesmp -E -r <dut1_bt_mac> -z Enc"
    - ['P SSC[1-2] C +BLESMP:AuthComplete,Success,0']
  - - "SSC SSC1 bleconn -D -z all"
    - ['P SSC1 C +BLECONN:GapDisconnect,OK', 'P SSC2 C +BLECONN:GapDisconnect,OK']
  - - "SSC SSC2 ble -S -z privacy -p 1"
    - ["R SSC2 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC2 bleadv -D -z start -o 2"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC1 blescan -D -z start -t 3"
    - ["R SSC1 P <dut2_bt_mac> C InquiryComplete"]
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
    - ["R SSC1 C +BLECONN:GapConnect,OK", "R SSC2 C +BLECONN:GapConnect,OK"]
- ID: BTSTK_GAP_14009
  <<: *GAP_CASE
  test point 2: BLE set random address test
  summary: BLE pairing and set random address as resolvable private address, reconnect after reboot
  steps: |
    1. SSC2 set AuthReqMode and IOCAP,set RspKey as Enc and IRK
    2. pairing
    3. SSC1 and SSC2 reboot
    4. SSC2 do local privacy
    5. SSC2 bleadv and SSC1 blescan
    6. SSC1 connect to SSC2
  expected result: |
    1. succeed
    2. succeed
    3. succeed
    4. succeed
    5. succeed
    6. succeed
  initial condition: BLE_INIT_SMP
  allow fail: 2/3
  cmd set:
  - ""
  - - "SSC SSC2 blesmp -S -z AuthReqMode -v 0x01"
    - ['P SSC2 C +BLESMP:OK']
  - - "SSC SSC2 blesmp -S -z IOCAP -v 0x03"
    - ['P SSC2 C +BLESMP:OK']
  - - "SSC SSC2 blesmp -S -z RspKey -v 0x03"
    - ['P SSC2 C +BLESMP:OK']
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
    - ['P SSC1 C +BLECONN:GapConnect,OK', 'P SSC2 C +BLECONN:GapConnect,OK']
  - - "SSC SSC2 blesmp -E -r <dut1_bt_mac> -z Enc"
    - ['P SSC[1-2] C +BLESMP:AuthComplete,Success,0']
  - - "SSC SSC[1-2] reboot"
    - ['R SSC[1-2] C !!!ready!!!']
  - - "SSC SSC[1-2] ble -R"
    - ["R SSC[1-2] C +BLE:OK"]
  - - "SSC SSC2 gatts -S -z load -p 0xA2"
    - ['R SSC2 C +GATTS:StartService,OK,A002']
  - - "SSC SSC2 ble -S -z privacy -p 1"
    - ["R SSC2 C +BLECONN:SetResAddr,Success"]
  - - "SSC SSC2 bleadv -D -z stop"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC2 bleadv -L -c 0 -t 3"
    - ["R SSC2 C +BLEADV:SetAdv,OK C +BLEADV:SetScanRes,OK"]
  - - "SSC SSC2 bleadv -D -z start -o 2"
    - ["R SSC2 C +BLEADV:OK"]
  - - "SSC SSC1 blescan -D -z stop"
    - ["R SSC1 C +BLESCAN:OK"]
  - - "SSC SSC1 blescan -D -z start -t 3 -c 0"
    - ["R SSC1 P <dut2_bt_mac> C InquiryComplete"]
  - - "SSC SSC1 bleconn -C -p 0x10 -a <dut2_bt_mac>"
    - ["R SSC1 C +BLECONN:GapConnect,OK", "R SSC2 C +BLECONN:GapConnect,OK"]
- ID: BTSTK_GAP_15001
  <<: *GAP_CASE
  test point 2: BLE GAP white list test
  summary: add white list and remove
  steps: |
   1. get white list
   2. DUT1 add DUT2 into white list
   3. remove DUT2 from white list
   4. remove DUT2 from white list
  expected result: |
   1. succeed
   2. succeed
   3. succeed
   4. succeed
  initial condition: BLE_INIT_REBOOT2
  cmd set:
  - ""
  - - "SSC SSC1 ble -W -z get"
    - ['P SSC1 C +BLE:GetWhiteList,OK,12']
  - - "SSC SSC1 ble -W -a <dut2_bt_mac> -z add"
    - ['P SSC1 C +BLE:AddWhiteList,Success']
  - - "SSC SSC1 ble -W -a <dut2_bt_mac> -z remove"
    - ['P SSC1 C +BLE:RemoveWhiteList,Success']
  - - "SSC SSC1 ble -W -a <dut2_bt_mac> -z remove"
    - ['P SSC1 C +BLE:RemoveWhiteList,Success']
- ID: BTSTK_GAP_15002
  <<: *GAP_CASE
  test point 2: BLE GAP white list test
  summary: get white list test
  steps: |
   1. DUT1 add white list DUT2 DUT3 DUT4 DUT5
   2. DUT1 get white list
  expected result: |
   1. succeed
   2. succeed
  initial condition: BLE_INIT_REBOOT2
  cmd set:
  - ""
  - - LOOP 4 1 "[0,1,2,4]"
  - - "SSC SSC1 ble -W -z add -a c0:3e:72:bd:a8:c{%d}"
    - ['P SSC1 C +BLE:AddWhiteList,Success']
  - - "SSC SSC1 ble -W -z get"
    - ['P SSC1 C +BLE:GetWhiteList,OK,8']
- ID: BTSTK_GAP_15003
  <<: *GAP_CASE
  test point 2: BLE GAP white list test
  summary: add white list twice
  steps: |
   1. DUT1 add DUT2 into white list
   2. DUT1 add DUT2 into white list
   3. DUT1 get white list
  expected result: |
   1. succeed
   2. succeed
   3. succeed
  initial condition: BLE_INIT_REBOOT2
  cmd set:
  - ""
  - - "SSC SSC1 ble -W -a <dut2_bt_mac> -z add"
    - ['P SSC1 C +BLE:AddWhiteList,Success']
  - - "SSC SSC1 ble -W -a <dut2_bt_mac> -z add"
    - ['P SSC1 C +BLE:AddWhiteList,Success']
  - - "SSC SSC1 ble -W -z get"
    - ['P SSC1 C +BLE:GetWhiteList,OK,11']
- ID: BTSTK_GAP_15004
  <<: *GAP_CASE
  test point 2: BLE GAP white list test
  summary: add 12 device to white list
  steps: |
   1. DUT1 add 12 addresses into white list
   2. DUT1 get white list
   3. DUT1 add 13th address into white list
  expected result: |
   1. succeed
   2. succeed
   3. failed
  initial condition: BLE_INIT_REBOOT2
  cmd set:
  - ""
  - - LOOP 12 1 "['0','1','2','3','4','5','6','7','8','9','a','b']"
    - ''
  - - "SSC SSC1 ble -W -a c0:9b:0e:36:6d:7{%s} -z add"
    - ['P SSC1 C +BLE:AddWhiteList,Success']
  - - "SSC SSC1 ble -W -z get"
    - ['P SSC1 C +BLE:GetWhiteList,OK,0']
  - - "SSC SSC1 ble -W -a c0:9b:0e:36:6d:7c -z add"
    - ['P SSC1 C +BLE:AddWhiteList,Fail']
- ID: BTSTK_GAP_16001
  <<: *GAP_CASE
  test point 2: BLE low power test
  summary: test adv current and adv interval 32-32
  category: Performance
  auto test: 'No'
  steps: |
   1. DUT2 start adv
   2. test DUT2 current
  expected result: |
   1. succeed
   2. succeed
  cmd set:
  - "BLEFunction/BLELowPower"
  - - op_test = "start_adv"
    - ''
- ID: BTSTK_GAP_16002
  <<: *GAP_CASE
  test point 2: BLE low power test
  summary: test scan current and scan window/interval 04
  category: Performance
  auto test: 'No'
  steps: |
   1. DUT2 start scan
   2. test DUT2 current
  expected result: |
   1. succeed
   2. succeed
  cmd set:
  - "BLEFunction/BLELowPower"
  - - op_test = "start_scan"
    - ""
- ID: BTSTK_GAP_16003
  <<: *GAP_CASE
  test point 2: BLE low power test
  summary: test connect current and interval 6-6
  category: Performance
  auto test: 'No'
  steps: |
   1. DUT1 connect to DUT2
   2. test DUT2 current
  expected result: |
   1. succeed
   2. succeed
  cmd set:
  - "BLEFunction/BLELowPower"
  - - op_test = "do_connect"
    - ""
