forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest_TC_BIND_2_1.yaml
388 lines (325 loc) · 23.5 KB
/
Test_TC_BIND_2_1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# Copyright (c) 2021 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.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default
name: 119.2.1. [TC-BIND-2.1] Binding Cluster Attributes-Node [DUT-Controller]
PICS:
- BIND.C
- MCORE.ROLE.CONTROLLER
- "!MCORE.DT_SW_COMP"
config:
nodeId: 0x12344321
cluster: "Basic Information"
endpoint: 0
tests:
- label: "Note"
verification: |
Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command.
1.This test case requires 4 raspi to execute. 1 raspi as Commissioner. and 1 raspi as dut[Controller] 2 raspi as controllee
2. In this example, RASP is used as DUT & it requires additional shell access to execute the controller commands. To support the shell, use the following command to build the all-clusters-app . On the DUT device Use - [scripts/examples/gn_build_example.sh examples/all-clusters-app/linux/ out/all-clusters-app chip_inet_config_enable_ipv4=false chip_build_libshell=true ] - (Vendor DUT must have this provision to execute the controller commands. )
3.Pair TH2 , TH3 with ble-wifi with different discriminator as mentioned below test steps , using the chip-tool running as commissioner in one RPI.
4.using the commissioner write the ACL entries on both TH2 and TH3 for allowing to receive commands for onoff cluster from DUT(Controller)
5.Hit the Enter button on raspi , you will see a shell prompt (>) , enter help, this would list the command for switch . At the prompt enter switch on ,the "on" command is sent to both TH2 and TH3. and the command and corresponding response can be verified in the log. to test if the TH2/TH3 are turned on or not, you can read the on-off attribute status. Read the status before sending the switch on command and read after sending the command. you should see the value changing.
disabled: true
- label: "Pre-Conditions"
verification: |
1 TH2 supports On/Off server on Endpoint 1.
2 TH3 supports On/Off server on Endpoint 2.
3 DUT supports On/Off client.
1. TH1 - Test Harness1 as Commissioner
2. TH2 - Test Harness2 as Controlee
3. TH3 - Test Harness3 as Controlee
4. DUT - Controller
disabled: true
- label: "Step 1: Factory Reset DUT"
verification: |
Vendor specific action, for chip-tool run
rm -rf /tmp/chip*
disabled: true
- label: "Step 2: Commission DUT to TH1s fabric"
verification: |
./chip-tool pairing onnetwork 1 20202021
disabled: true
- label: "Step 3: Commission TH2 to TH1s fabric (Node ID = 2)"
verification: |
./chip-tool pairing ble-wifi 2 chipsetup4 matter123 20202021 3840
disabled: true
- label: "Step 4: Commission TH3 to TH1s fabric (Node ID = 3)"
verification: |
./chip-tool pairing ble-wifi 3 chipsetup4 matter123 20202021 3841
disabled: true
- label:
"Step 5: TH1 writes Binding entries into DUT on the endpoint with the
On/Off client with Entry 1: Node = 2 Cluster = 0x0006(onoff) Endpoint
= 1 Entry 2: Node = 3 Cluster = 0x0006(onoff) Endpoint = 2 Note: Node
2 corresponds to TH2s Node ID Node 3 corresponds to TH3s Node ID"
verification: |
./chip-tool binding write binding '[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }, { "node" : 3 , "cluster" : "0x0006" , "endpoint" : 2 }]' 1 1
Verify the SUCCESS status response On TH1(Chip-tool) log and below is the sample log provided for the raspi platform
[1686231481.225889][13509:13511] CHIP:DMG: WriteResponseMessage =
[1686231481.225946][13509:13511] CHIP:DMG: {
[1686231481.225995][13509:13511] CHIP:DMG: AttributeStatusIBs =
[1686231481.226068][13509:13511] CHIP:DMG: [
[1686231481.226124][13509:13511] CHIP:DMG: AttributeStatusIB =
[1686231481.226187][13509:13511] CHIP:DMG: {
[1686231481.226247][13509:13511] CHIP:DMG: AttributePathIB =
[1686231481.226322][13509:13511] CHIP:DMG: {
[1686231481.226391][13509:13511] CHIP:DMG: Endpoint = 0x1,
[1686231481.226467][13509:13511] CHIP:DMG: Cluster = 0x1e,
[1686231481.226542][13509:13511] CHIP:DMG: Attribute = 0x0000_0000,
[1686231481.226613][13509:13511] CHIP:DMG: }
[1686231481.226692][13509:13511] CHIP:DMG:
[1686231481.226758][13509:13511] CHIP:DMG: StatusIB =
[1686231481.226828][13509:13511] CHIP:DMG: {
[1686231481.226900][13509:13511] CHIP:DMG: status = 0x00 (SUCCESS),
[1686231481.226970][13509:13511] CHIP:DMG: },
[1686231481.227120][13509:13511] CHIP:DMG:
[1686231481.227186][13509:13511] CHIP:DMG: },
[1686231481.227270][13509:13511] CHIP:DMG:
[1686231481.227326][13509:13511] CHIP:DMG: AttributeStatusIB =
[1686231481.227387][13509:13511] CHIP:DMG: {
[1686231481.227446][13509:13511] CHIP:DMG: AttributePathIB =
[1686231481.227514][13509:13511] CHIP:DMG: {
[1686231481.227584][13509:13511] CHIP:DMG: Endpoint = 0x1,
[1686231481.227658][13509:13511] CHIP:DMG: Cluster = 0x1e,
[1686231481.227733][13509:13511] CHIP:DMG: Attribute = 0x0000_0000,
[1686231481.227806][13509:13511] CHIP:DMG: ListIndex = Null,
[1686231481.227875][13509:13511] CHIP:DMG: }
[1686231481.228035][13509:13511] CHIP:DMG:
[1686231481.228103][13509:13511] CHIP:DMG: StatusIB =
[1686231481.228171][13509:13511] CHIP:DMG: {
[1686231481.228242][13509:13511] CHIP:DMG: status = 0x00 (SUCCESS),
[1686231481.228312][13509:13511] CHIP:DMG: },
[1686231481.228381][13509:13511] CHIP:DMG:
[1686231481.228439][13509:13511] CHIP:DMG: },
[1686231481.228524][13509:13511] CHIP:DMG:
[1686231481.228580][13509:13511] CHIP:DMG: AttributeStatusIB =
[1686231481.228641][13509:13511] CHIP:DMG: {
[1686231481.228701][13509:13511] CHIP:DMG: AttributePathIB =
[1686231481.228768][13509:13511] CHIP:DMG: {
[1686231481.228917][13509:13511] CHIP:DMG: Endpoint = 0x1,
[1686231481.229041][13509:13511] CHIP:DMG: Cluster = 0x1e,
[1686231481.229119][13509:13511] CHIP:DMG: Attribute = 0x0000_0000,
[1686231481.229192][13509:13511] CHIP:DMG: ListIndex = Null,
[1686231481.229262][13509:13511] CHIP:DMG: }
[1686231481.229340][13509:13511] CHIP:DMG:
[1686231481.229470][13509:13511] CHIP:DMG: StatusIB =
[1686231481.229545][13509:13511] CHIP:DMG: {
[1686231481.229616][13509:13511] CHIP:DMG: status = 0x00 (SUCCESS),
[1686231481.229686][13509:13511] CHIP:DMG: },
[1686231481.229755][13509:13511] CHIP:DMG:
[1686231481.229814][13509:13511] CHIP:DMG: },
[1686231481.229882][13509:13511] CHIP:DMG:
[1686231481.229936][13509:13511] CHIP:DMG: ],
[1686231481.230023][13509:13511] CHIP:DMG:
[1686231481.230125][13509:13511] CHIP:DMG: InteractionModelRevision = 1
[1686231481.230180][13509:13511] CHIP:DMG: }
disabled: true
- label: "Step 6: TH1 enables DUT as Controller"
verification: |
disabled: true
- label:
"Step 7: DUT is triggered to send On command to its binding node
entries"
PICS: OO.C.C01.Tx
verification: |
./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}]}]' 2 0
Verify the SUCCESS status response On TH1(Chip-tool) log and below is the sample log provided for the raspi platform
[1652330385.328196][3240:3245] CHIP:DMG: StatusIB =
[1652330385.328229][3240:3245] CHIP:DMG: {
[1652330385.328264][3240:3245] CHIP:DMG: status = 0x00 (SUCCESS),
[1652330385.328298][3240:3245] CHIP:DMG: },
./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 2, "deviceType": null}]}]' 3 0
Verify the SUCCESS status response On TH1(Chip-tool) log and below is the sample log provided for the raspi platform
[1650610345.847274][2626:2631] CHIP:DMG: StatusIB =
[1650610345.847317][2626:2631] CHIP:DMG: {
[1650610345.847383][2626:2631] CHIP:DMG: status = 0x00 (SUCCESS),
[1650610345.847429][2626:2631] CHIP:DMG: },
NOTE:
Every DUT should have their own mechanism to trigger on/off mechanism.
DUT sends On command in the shell
>switch on
On TH2(all-cluster-app) log, Verify that TH2 receives On command and below is the sample log provided for the raspi platform
[1686569607.687455][68496:68496] CHIP:DMG: InvokeRequestMessage =
[1686569607.687516][68496:68496] CHIP:DMG: {
[1686569607.687570][68496:68496] CHIP:DMG: suppressResponse = false,
[1686569607.687632][68496:68496] CHIP:DMG: timedRequest = false,
[1686569607.687689][68496:68496] CHIP:DMG: InvokeRequests =
[1686569607.687759][68496:68496] CHIP:DMG: [
[1686569607.687815][68496:68496] CHIP:DMG: CommandDataIB =
[1686569607.687891][68496:68496] CHIP:DMG: {
[1686569607.687954][68496:68496] CHIP:DMG: CommandPathIB =
[1686569607.688024][68496:68496] CHIP:DMG: {
[1686569607.688097][68496:68496] CHIP:DMG: EndpointId = 0x1,
[1686569607.688172][68496:68496] CHIP:DMG: ClusterId = 0x6,
[1686569607.688245][68496:68496] CHIP:DMG: CommandId = 0x1,
[1686569607.688316][68496:68496] CHIP:DMG: },
[1686569607.688385][68496:68496] CHIP:DMG:
[1686569607.688450][68496:68496] CHIP:DMG: CommandFields =
[1686569607.688629][68496:68496] CHIP:DMG: {
[1686569607.688706][68496:68496] CHIP:DMG: },
[1686569607.688772][68496:68496] CHIP:DMG: },
[1686569607.688842][68496:68496] CHIP:DMG:
[1686569607.688897][68496:68496] CHIP:DMG: ],
[1686569607.688966][68496:68496] CHIP:DMG:
[1686569607.689085][68496:68496] CHIP:DMG: InteractionModelRevision = 1
[1686569607.689141][68496:68496] CHIP:DMG: },
On TH3(all-cluster-app) log, Verify that TH3 receives On command and below is the sample log provided for the raspi platform
[1686569607.660350][46545:46545] CHIP:DMG: InvokeRequestMessage =
[1686569607.660410][46545:46545] CHIP:DMG: {
[1686569607.660462][46545:46545] CHIP:DMG: suppressResponse = false,
[1686569607.660522][46545:46545] CHIP:DMG: timedRequest = false,
[1686569607.660578][46545:46545] CHIP:DMG: InvokeRequests =
[1686569607.660648][46545:46545] CHIP:DMG: [
[1686569607.660739][46545:46545] CHIP:DMG: CommandDataIB =
[1686569607.660802][46545:46545] CHIP:DMG: {
[1686569607.660884][46545:46545] CHIP:DMG: CommandPathIB =
[1686569607.660956][46545:46545] CHIP:DMG: {
[1686569607.661026][46545:46545] CHIP:DMG: EndpointId = 0x2,
[1686569607.661126][46545:46545] CHIP:DMG: ClusterId = 0x6,
[1686569607.661201][46545:46545] CHIP:DMG: CommandId = 0x1,
[1686569607.661293][46545:46545] CHIP:DMG: },
[1686569607.661367][46545:46545] CHIP:DMG:
[1686569607.661449][46545:46545] CHIP:DMG: CommandFields =
[1686569607.661517][46545:46545] CHIP:DMG: {
[1686569607.661606][46545:46545] CHIP:DMG: },
[1686569607.661672][46545:46545] CHIP:DMG: },
[1686569607.661741][46545:46545] CHIP:DMG:
[1686569607.661817][46545:46545] CHIP:DMG: ],
[1686569607.661887][46545:46545] CHIP:DMG:
[1686569607.661963][46545:46545] CHIP:DMG: InteractionModelRevision = 1
[1686569607.662019][46545:46545] CHIP:DMG: },
Verify DUT receives SUCCESS response from TH2(all-cluster-app)
[1686569607.703553][48796:48796] CHIP:DMG: StatusIB =
[1686569607.703635][48796:48796] CHIP:DMG: {
[1686569607.703711][48796:48796] CHIP:DMG: status = 0x00 (SUCCESS),
[1686569607.703785][48796:48796] CHIP:DMG: },
Verify DUT receives SUCCESS response from TH3(all-cluster-app)
[1686569607.703553][48796:48796] CHIP:DMG: StatusIB =
[1686569607.703635][48796:48796] CHIP:DMG: {
[1686569607.703711][48796:48796] CHIP:DMG: status = 0x00 (SUCCESS),
[1686569607.703785][48796:48796] CHIP:DMG: },
disabled: true
- label: "Step 8: TH1 reads OnOff attribute from TH2 (Endpoint 1)"
PICS: OO.C.C01.Tx
verification: |
./chip-tool onoff read on-off 2 1
On TH1 (Chip-tool) log, Verify that OnOff value is set to On(TRUE) and below is the sample log provided for the raspi platform
[1657798291.396477][3835:3841] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4260513117
[1657798291.396514][3835:3841] CHIP:TOO: OnOff: TRUE
disabled: true
- label:
"Step 9: TH1 removes second binding entry corresponding to TH3 from
DUT"
verification: |
./chip-tool binding write binding '[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }]' 1 1
Verify the SUCCESS status response On TH1(Chip-tool) log and below is the sample log provided for the raspi platform
[1657800844.739922][4000:4006] CHIP:DMG: WriteResponseMessage =
[1657800844.739949][4000:4006] CHIP:DMG: {
[1657800844.739990][4000:4006] CHIP:DMG: AttributeStatusIBs =
[1657800844.740021][4000:4006] CHIP:DMG: [
[1657800844.740057][4000:4006] CHIP:DMG: AttributeStatusIB =
[1657800844.740111][4000:4006] CHIP:DMG: {
[1657800844.740150][4000:4006] CHIP:DMG: AttributePathIB =
[1657800844.740195][4000:4006] CHIP:DMG: {
[1657800844.740230][4000:4006] CHIP:DMG: Endpoint = 0x0,
[1657800844.740275][4000:4006] CHIP:DMG: Cluster = 0x1e,
[1657800844.740322][4000:4006] CHIP:DMG: Attribute = 0x0000_0000,
[1657800844.740359][4000:4006] CHIP:DMG: }
[1657800844.740405][4000:4006] CHIP:DMG:
[1657800844.740444][4000:4006] CHIP:DMG: StatusIB =
[1657800844.740477][4000:4006] CHIP:DMG: {
[1657800844.740516][4000:4006] CHIP:DMG: status = 0x00 (SUCCESS),
[1657800844.740548][4000:4006] CHIP:DMG: },
[1657800844.740584][4000:4006] CHIP:DMG:
[1657800844.740607][4000:4006] CHIP:DMG: },
[1657800844.740653][4000:4006] CHIP:DMG:
[1657800844.740687][4000:4006] CHIP:DMG: AttributeStatusIB =
[1657800844.740714][4000:4006] CHIP:DMG: {
[1657800844.740748][4000:4006] CHIP:DMG: AttributePathIB =
[1657800844.740781][4000:4006] CHIP:DMG: {
[1657800844.740820][4000:4006] CHIP:DMG: Endpoint = 0x0,
[1657800844.740858][4000:4006] CHIP:DMG: Cluster = 0x1e,
[1657800844.740905][4000:4006] CHIP:DMG: Attribute = 0x0000_0000,
[1657800844.740946][4000:4006] CHIP:DMG: ListIndex = Null,
[1657800844.740981][4000:4006] CHIP:DMG: }
[1657800844.741025][4000:4006] CHIP:DMG:
[1657800844.741063][4000:4006] CHIP:DMG: StatusIB =
[1657800844.741094][4000:4006] CHIP:DMG: {
[1657800844.741133][4000:4006] CHIP:DMG: status = 0x00 (SUCCESS),
[1657800844.741168][4000:4006] CHIP:DMG: },
[1657800844.741208][4000:4006] CHIP:DMG:
[1657800844.741241][4000:4006] CHIP:DMG: },
[1657800844.741272][4000:4006] CHIP:DMG:
[1657800844.741295][4000:4006] CHIP:DMG: ],
[1657800844.741336][4000:4006] CHIP:DMG:
[1657800844.741369][4000:4006] CHIP:DMG: InteractionModelRevision = 1
[1657800844.741392][4000:4006] CHIP:DMG: }
[1657800844.741511][4000:4006] CHIP:DMG: WriteClient moving to [AwaitingDe]
[1657800844.741591][4000:4006] CHIP:EM: Sending Standalone Ack for MessageCounter:142199059 on exchange 12653i
disabled: true
- label:
"Step 10: DUT is triggered to send off command to its binding entries"
PICS: OO.C.C00.Tx
verification: |
DUT sends off command in the shell
>switch off
On TH2(all-cluster-app) log, Verify that TH2 receives Off command and below is the sample log provided for the raspi platform
[1686570217.594079][68496:68496] CHIP:DMG: InvokeRequestMessage =
[1686570217.594141][68496:68496] CHIP:DMG: {
[1686570217.594194][68496:68496] CHIP:DMG: suppressResponse = false,
[1686570217.594256][68496:68496] CHIP:DMG: timedRequest = false,
[1686570217.594314][68496:68496] CHIP:DMG: InvokeRequests =
[1686570217.594385][68496:68496] CHIP:DMG: [
[1686570217.594481][68496:68496] CHIP:DMG: CommandDataIB =
[1686570217.594545][68496:68496] CHIP:DMG: {
[1686570217.594626][68496:68496] CHIP:DMG: CommandPathIB =
[1686570217.594706][68496:68496] CHIP:DMG: {
[1686570217.594776][68496:68496] CHIP:DMG: EndpointId = 0x1,
[1686570217.594873][68496:68496] CHIP:DMG: ClusterId = 0x6,
[1686570217.594947][68496:68496] CHIP:DMG: CommandId = 0x0,
[1686570217.595037][68496:68496] CHIP:DMG: },
[1686570217.595111][68496:68496] CHIP:DMG:
[1686570217.595202][68496:68496] CHIP:DMG: CommandFields =
[1686570217.595271][68496:68496] CHIP:DMG: {
[1686570217.595360][68496:68496] CHIP:DMG: },
[1686570217.595426][68496:68496] CHIP:DMG: },
[1686570217.595494][68496:68496] CHIP:DMG:
[1686570217.595571][68496:68496] CHIP:DMG: ],
[1686570217.595640][68496:68496] CHIP:DMG:
[1686570217.595715][68496:68496] CHIP:DMG: InteractionModelRevision = 1
[1686570217.595772][68496:68496] CHIP:DMG: },
Verify DUT receives SUCCESS response from TH2(all-cluster-app)
[1686570217.617563][48796:48796] CHIP:DMG: StatusIB =
[1686570217.617622][48796:48796] CHIP:DMG: {
[1686570217.617679][48796:48796] CHIP:DMG: status = 0x00 (SUCCESS),
[1686570217.617735][48796:48796] CHIP:DMG: },
Note:
TH3 does not receive off command .
disabled: true
- label: "Step 11: TH1 reads OnOff attribute from TH2 (Endpoint 1)"
PICS: OO.C.C00.Tx
verification: |
./chip-tool onoff read on-off 2 1
On TH1 (Chip-tool) log, Verify that OnOff value is set to Off(FALSE) and below is the sample log provided for the raspi platform
[1657803168.769564][4272:4277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1968648540
[1657803168.769598][4272:4277] CHIP:TOO: OnOff: FALSE
disabled: true
- label: "Step 12: TH1 reads OnOff attribute from TH3 (Endpoint 2)"
PICS: OO.C.C01.Tx
verification: |
./chip-tool onoff read on-off 3 2
On TH1 (Chip-tool) log, Verify that OnOff value is set to On(TRUE) and below is the sample log provided for the raspi platform
[1657803609.731464][4333:4339] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3914456390
[1657803609.731521][4333:4339] CHIP:TOO: OnOff: TRUE
disabled: true