Skip to content

Commit

Permalink
Update TBRM_2_5. Add new TBRM_2_6 test
Browse files Browse the repository at this point in the history
  • Loading branch information
dparausanu committed Oct 8, 2024
1 parent 21bc77a commit 3616106
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 11 deletions.
70 changes: 59 additions & 11 deletions src/app/tests/suites/certification/Test_TC_TBRM_2_5.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name:
"[TC-TBRM-2.5] Verify network configuration of a Thread Border Router
endpoint that support also Secondary Network Interface device type"
name: "[TC-TBRM-2.5] Verify configuration of Thread Border Router endpoint which support Secondary Network Interface device type when Network Commissioning Cluster is used to configure Thread network"

PICS:
- TBRM.S
- CNET.S.F01

config:
nodeId: 0x12344321
nodeId: 1
cluster: Thread Border Router Management
endpoint: 1
endpoint: 2
PIXIT.TBRM.THREAD_ACTIVE_DATASET:
type: octet_string
defaultValue: "hex:0e08000000000001000035060004001fffe00708fddeb3d807f0cc3f04104b575fabba5fdb5917c8267eca0674740c0402a0f7f8000300001901025b3502085b35dead5b35beef030435623335051000112233445566778899aabbccddeeff"
Expand All @@ -36,8 +33,59 @@ tests:
values:
- name: nodeId
value: nodeId

- label:
"Step 2: If DUT was not commissioned using BLE-THREAD method configure Thread network using Network Commissioning Cluster"
verification: |
#2a Arm Fail Safe on DUT
./chip-tool generalcommissioning arm-fail-safe 120 1 1 0
On TH(chip-tool) verify that DUT sends a response with errorCode: 0
# Step 1
[1725982685.786] [7126:7136] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001
[1725982685.786] [7126:7136] [TOO] Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001
[1725982685.790] [7126:7136] [TOO] ArmFailSafeResponse: {
[1725982685.791] [7126:7136] [TOO] errorCode: 0
[1725982685.791] [7126:7136] [TOO] debugText:
[1725982685.791] [7126:7136] [TOO] }
#2b Add Dataset using Network Commissioning Cluster
./chip-tool networkcommissioning add-or-update-thread-network hex:0e08000000000001000035060004001fffe00708fd6c6464dd3ce8ca0410765efb0a07009be94c17b35399c6927a0c0402a0f7f8000300001901025b3502085b35dead5b35beef030435623335051000112233445566778899aabbccddeeff 1 2 --Breadcrumb 1
On TH(chip-tool) verify that DUT sends a response with networkingStatus: 0
[1725982952.732] [9168:9170] [TOO] Endpoint: 2 Cluster: 0x0000_0031 Command 0x0000_0005
[1725982952.732] [9168:9170] [TOO] NetworkConfigResponse: {
[1725982952.732] [9168:9170] [TOO] networkingStatus: 0
[1725982952.736] [9168:9170] [TOO] networkIndex: 0
[1725982952.736] [9168:9170] [TOO] }
#2c Connect to Thread network
./chip-tool networkcommissioning connect-network hex:5b35dead5b35beef 1 2 --Breadcrumb 1
On TH(chip-tool) verify that DUT sends a response with networkingStatus: 0
[1725983064.276] [10049:10051] [TOO] Endpoint: 2 Cluster: 0x0000_0031 Command 0x0000_0007
[1725983064.277] [10049:10051] [TOO] ConnectNetworkResponse: {
[1725983064.277] [10049:10051] [TOO] networkingStatus: 0
[1725983064.277] [10049:10051] [TOO] errorValue: null
[1725983064.277] [10049:10051] [TOO] }
#2d Send Commissioning Complete command
./chip-tool generalcommissioning commissioning-complete 1 0
On TH(chip-tool) verify that DUT sends a response with errorCode: 0
[1725983243.683] [11490:11500] [TOO] Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0005
[1725983243.683] [11490:11500] [TOO] CommissioningCompleteResponse: {
[1725983243.683] [11490:11500] [TOO] errorCode: 0
[1725983243.684] [11490:11500] [TOO] debugText:
[1725983243.684] [11490:11500] [TOO] }
cluster: "LogCommands"
command: "UserPrompt"
arguments:
values:
- name: "message"
value: "Please enter 'y' after running commands above"

# Step 3
- label: "TH sends a GetActiveDatasetRequest command to the DUT"
command: GetActiveDatasetRequest
response:
Expand All @@ -47,17 +95,17 @@ tests:
constraints:
type: octet_string

# Step 2
# Step 4
- label: "TH read MaxNetworks attribute from Network Commissioning Cluster"
cluster: NetworkCommissioning
command: readAttribute
attribute: MaxNetworks
response:
value: 1

# Step 3
# Step 5
- label: "TH reads the InterfaceEnabled attribute from the DUT"
command: readAttribute
attribute: InterfaceEnabled
response:
value: true
value: true
94 changes: 94 additions & 0 deletions src/app/tests/suites/certification/Test_TC_TBRM_2_6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: "[TC-TBRM-2.6] Verify configuration of Network Commissioning Cluster when Thread Border Router endpoint which support Secondary Network Interface device type is used to configure Thread network"

PICS:
- TBRM.S

config:
nodeId: 1
cluster: Thread Border Router Management
endpoint: 2
PIXIT.TBRM.THREAD_ACTIVE_DATASET:
type: octet_string
defaultValue: "hex:0e08000000000001000035060004001fffe00708fd82b7cd966fd80604107cbe11f0b4e6276276877c7467b8d8550c0402a0f7f8000300001901025b3502085b35dead5b35beef030435623335051000112233445566778899aabbccddeeff"
PIXIT.TBRM.THREAD_EXTENDED_PANID:
type: octet_string
defaultValue: "hex:5b35dead5b35beef"

tests:
- label: "Step 1: Wait for the commissioned device to be retrieved"
cluster: DelayCommands
command: WaitForCommissionee
arguments:
values:
- name: nodeId
value: nodeId

- label:
"Step 2: TH sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to 120"
cluster: "General Commissioning"
command: "ArmFailSafe"
endpoint: 0
arguments:
values:
- name: "ExpiryLengthSeconds"
value: 120
- name: "Breadcrumb"
value: 1
response:
values:
- name: "ErrorCode"
value: 0
- name: "DebugText"
value: ""

- label: "Step 3: In a CASE session, TH sends command SetActiveDatasetRequest to DUT with ActiveDataset: PIXIT.TBRM.THREAD_ACTIVE_DATASET"
command: SetActiveDatasetRequest
arguments:
values:
- name: ActiveDataset
value: PIXIT.TBRM.THREAD_ACTIVE_DATASET

- label: "Step 4: TH sends CommissioningComplete command to the DUT"
cluster: "General Commissioning"
command: "CommissioningComplete"
endpoint: 0
response:
values:
- name: "ErrorCode"
value: 0 # SUCCESS

- label: "Step 5: TH read LastNetworkID attribute from DUT"
command: "readAttribute"
cluster: "Network Commissioning"
attribute: "LastNetworkID"
response:
value: PIXIT.TBRM.THREAD_EXTENDED_PANID
constraints:
type: octet_string

- label: "Step 6: TH read MaxNetworks attribute from Network Commissioning Cluster"
cluster: NetworkCommissioning
command: readAttribute
attribute: MaxNetworks
response:
value: 1

- label: "Step 7: TH reads the InterfaceEnabled attribute from the DUT"
command: readAttribute
attribute: InterfaceEnabled
response:
value: true

0 comments on commit 3616106

Please sign in to comment.