Skip to content

Commit

Permalink
Enable Aliro bits in example lock-app. (project-chip#34657)
Browse files Browse the repository at this point in the history
* Enable Aliro bits in example lock-app.

Fixes the FeatureMap on the cluster to enable the Aliro bits as well, and correctly marks
the parts that are implemented via AttributeAccessInterface.

* Adjust Test_TC_DRLK_2_9 to not fail when Aliro is supported.

* Fix issues in test script.
  • Loading branch information
bzbarsky-apple authored and w8floosh committed Aug 4, 2024
1 parent 76d4121 commit cab0f3a
Show file tree
Hide file tree
Showing 9 changed files with 230 additions and 522 deletions.
13 changes: 12 additions & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3079,11 +3079,20 @@ endpoint 1 {
ram attribute wrongCodeEntryLimit default = 3;
ram attribute userCodeTemporaryDisableTime default = 10;
ram attribute requirePINforRemoteOperation default = 0;
callback attribute aliroReaderVerificationKey;
callback attribute aliroReaderGroupIdentifier;
callback attribute aliroReaderGroupSubIdentifier;
callback attribute aliroExpeditedTransactionSupportedProtocolVersions;
callback attribute aliroGroupResolvingKey;
callback attribute aliroSupportedBLEUWBProtocolVersions;
callback attribute aliroBLEAdvertisingVersion;
callback attribute numberOfAliroCredentialIssuerKeysSupported;
callback attribute numberOfAliroEndpointKeysSupported;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0x1DB3;
ram attribute featureMap default = 0x7DB3;
ram attribute clusterRevision default = 7;

handle command LockDoor;
Expand Down Expand Up @@ -3111,6 +3120,8 @@ endpoint 1 {
handle command GetCredentialStatusResponse;
handle command ClearCredential;
handle command UnboltDoor;
handle command SetAliroReaderConfig;
handle command ClearAliroReaderConfig;
}
}

Expand Down
162 changes: 161 additions & 1 deletion examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5851,6 +5851,22 @@
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "SetAliroReaderConfig",
"code": 40,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "ClearAliroReaderConfig",
"code": 41,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
Expand Down Expand Up @@ -6270,6 +6286,150 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AliroReaderVerificationKey",
"code": 128,
"mfgCode": null,
"side": "server",
"type": "octet_string",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AliroReaderGroupIdentifier",
"code": 129,
"mfgCode": null,
"side": "server",
"type": "octet_string",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AliroReaderGroupSubIdentifier",
"code": 130,
"mfgCode": null,
"side": "server",
"type": "octet_string",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AliroExpeditedTransactionSupportedProtocolVersions",
"code": 131,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AliroGroupResolvingKey",
"code": 132,
"mfgCode": null,
"side": "server",
"type": "octet_string",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AliroSupportedBLEUWBProtocolVersions",
"code": 133,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AliroBLEAdvertisingVersion",
"code": 134,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfAliroCredentialIssuerKeysSupported",
"code": 135,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfAliroEndpointKeysSupported",
"code": 136,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
Expand Down Expand Up @@ -6344,7 +6504,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x1DB3",
"defaultValue": "0x7DB3",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
16 changes: 12 additions & 4 deletions src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,7 @@ tests:
constraints:
type: octet_string
minLength: 65
maxLength: 65

- label:
"Step 38b: TH writes AliroReaderVerificationKey attribute as an octstr
Expand Down Expand Up @@ -1608,6 +1609,8 @@ tests:
constraints:
type: octet_string
minLength: 16
maxLength: 16

- label:
"Step 39b: TH writes AliroReaderGroupIdentifier attribute as octstr
value of length 16 which is different from aliroreadergrpidentifier"
Expand Down Expand Up @@ -1635,6 +1638,7 @@ tests:
constraints:
type: octet_string
minLength: 16
maxLength: 16

- label:
"Step 40b: TH writes AliroReaderGroupSubIdentifier attribute as octstr
Expand Down Expand Up @@ -1665,6 +1669,7 @@ tests:
constraints:
type: list
maxLength: 16

- label:
"Step 41b: TH writes
AliroExpeditedTransactionSupportedProtocolVersions attribute as list
Expand All @@ -1673,9 +1678,10 @@ tests:
command: "writeAttribute"
attribute: "AliroExpeditedTransactionSupportedProtocolVersions"
arguments:
value: ["0x1", "0x2"]
value: ["\x01", "\x02"]
response:
error: UNSUPPORTED_WRITE

- label:
"Step 41c: TH reads AliroExpeditedTransactionSupportedProtocolVersions
attribute from DUT"
Expand All @@ -1694,6 +1700,7 @@ tests:
constraints:
type: octet_string
minLength: 16
maxLength: 16

- label:
"Step 42b: TH writes AliroGroupResolvingKey attribute as octstr value
Expand All @@ -1712,6 +1719,7 @@ tests:
attribute: "AliroGroupResolvingKey"
response:
value: alirogrpresolvingkey

- label:
"Step 43a: TH reads AliroSupportedBLEUWBProtocolVersions attribute
from DUT"
Expand All @@ -1721,8 +1729,8 @@ tests:
response:
saveAs: alirobleuwbprotocolversion
constraints:
type: octet_string
minLength: 16
type: list
maxLength: 16

- label:
"Step 43b: TH writes AliroSupportedBLEUWBProtocolVersions attribute as
Expand All @@ -1731,7 +1739,7 @@ tests:
command: "writeAttribute"
attribute: "AliroSupportedBLEUWBProtocolVersions"
arguments:
value: "047a4c992d75368"
value: ["\x01", "\x02"]
response:
error: UNSUPPORTED_WRITE

Expand Down
15 changes: 14 additions & 1 deletion src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ tests:
- label:
"Step 14: TH sends Clear Credential Command to DUT with the following
fields: a)CredentialType as 8(Invalid value) b)CredentialIndex as 2"
PICS: DRLK.S.F08 && DRLK.S.C26.Rsp
PICS: DRLK.S.F08 && DRLK.S.C26.Rsp && !DRLK.S.F0d
command: "ClearCredential"
timedInteractionTimeoutMs: 10000
arguments:
Expand All @@ -441,6 +441,19 @@ tests:
response:
error: INVALID_COMMAND

- label:
"Step 14: TH sends Clear Credential Command to DUT with the following
fields: a)CredentialType as 9(Invalid value) b)CredentialIndex as 2"
PICS: DRLK.S.F08 && DRLK.S.C26.Rsp && DRLK.S.F0d
command: "ClearCredential"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "Credential"
value: { CredentialType: 9, CredentialIndex: 2 }
response:
error: INVALID_COMMAND

- label: "Cleanup the first created user"
command: "ClearUser"
timedInteractionTimeoutMs: 10000
Expand Down
26 changes: 13 additions & 13 deletions src/app/tests/suites/certification/ci-pics-values
Original file line number Diff line number Diff line change
Expand Up @@ -1519,15 +1519,15 @@ DRLK.S.A0031=1
DRLK.S.A0032=1
DRLK.S.A0033=1
DRLK.S.A0035=0
DRLK.S.A0080=0
DRLK.S.A0081=0
DRLK.S.A0082=0
DRLK.S.A0083=0
DRLK.S.A0084=0
DRLK.S.A0085=0
DRLK.S.A0086=0
DRLK.S.A0087=0
DRLK.S.A0088=0
DRLK.S.A0080=1
DRLK.S.A0081=1
DRLK.S.A0082=1
DRLK.S.A0083=1
DRLK.S.A0084=1
DRLK.S.A0085=1
DRLK.S.A0086=1
DRLK.S.A0087=1
DRLK.S.A0088=1

#ReadOnly attributes
DRLK.S.A0028.ReadOnly=1
Expand Down Expand Up @@ -1574,8 +1574,8 @@ DRLK.S.F08=1
DRLK.S.F0a=1
DRLK.S.F0b=1
DRLK.S.F0c=1
DRLK.S.F0d=0
DRLK.S.F0e=0
DRLK.S.F0d=1
DRLK.S.F0e=1

# Server Commands
DRLK.S.C00.Rsp=1
Expand All @@ -1597,8 +1597,8 @@ DRLK.S.C22.Rsp=1
DRLK.S.C24.Rsp=1
DRLK.S.C26.Rsp=1
DRLK.S.C27.Rsp=1
DRLK.S.C28.Rsp=0
DRLK.S.C29.Rsp=0
DRLK.S.C28.Rsp=1
DRLK.S.C29.Rsp=1
DRLK.S.C0c.Tx=1
DRLK.S.C0f.Tx=1
DRLK.S.C12.Tx=1
Expand Down
9 changes: 9 additions & 0 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@
"CurrentMode",
"FeatureMap"
],
"Door Lock": [
"AliroReaderVerificationKey",
"AliroReaderGroupIdentifier",
"AliroReaderGroupSubIdentifier",
"AliroGroupResolvingKey",
"AliroBLEAdvertisingVersion",
"NumberOfAliroCredentialIssuerKeysSupported",
"NumberOfAliroEndpointKeysSupported"
],
"Energy EVSE": [
"State",
"SupplyState",
Expand Down
Loading

0 comments on commit cab0f3a

Please sign in to comment.