Skip to content

Commit

Permalink
Update lock-app ZAP file to contain Group Key Management cluster and …
Browse files Browse the repository at this point in the history
…expose mandatory attribute in the Identify cluster (#19684)

* [#18532, #19181] Update lock-app ZAP file to contain Group Key Management cluster and expose mandatory attribute in the Identify cluster

* Temporary disable CHIP logging for lock-app in K32W and cc13x2x7 examples
  • Loading branch information
Morozov-5F authored Jun 23, 2022
1 parent 5469b44 commit f62daff
Show file tree
Hide file tree
Showing 10 changed files with 441 additions and 28 deletions.
2 changes: 1 addition & 1 deletion examples/lock-app/cc13x2x7_26x2x7/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ lwip_debug = false
chip_enable_ota_requestor = true

# Disable CHIP Logging
#chip_progress_logging = false
chip_progress_logging = false
chip_detail_logging = false
chip_automation_logging = false

Expand Down
78 changes: 78 additions & 0 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ server cluster Identify = 3 {
}

attribute int16u identifyTime = 0;
readonly attribute enum8 identifyType = 1;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down Expand Up @@ -1261,6 +1262,73 @@ server cluster OperationalCredentials = 62 {
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
}

server cluster GroupKeyManagement = 63 {
enum GroupKeySecurityPolicy : ENUM8 {
kTrustFirst = 0;
kCacheAndSync = 1;
}

struct GroupKeyMapStruct {
group_id groupId = 1;
int16u groupKeySetID = 2;
fabric_idx fabricIndex = 254;
}

struct GroupInfoMapStruct {
group_id groupId = 1;
endpoint_no endpoints[] = 2;
optional char_string<16> groupName = 3;
fabric_idx fabricIndex = 254;
}

struct GroupKeySetStruct {
int16u groupKeySetID = 0;
GroupKeySecurityPolicy groupKeySecurityPolicy = 1;
nullable octet_string<16> epochKey0 = 2;
nullable epoch_us epochStartTime0 = 3;
nullable octet_string<16> epochKey1 = 4;
nullable epoch_us epochStartTime1 = 5;
nullable octet_string<16> epochKey2 = 6;
nullable epoch_us epochStartTime2 = 7;
}

attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0;
readonly attribute GroupInfoMapStruct groupTable[] = 1;
readonly attribute int16u maxGroupsPerFabric = 2;
readonly attribute int16u maxGroupKeysPerFabric = 3;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct KeySetWriteRequest {
GroupKeySetStruct groupKeySet = 0;
}

request struct KeySetReadRequest {
INT16U groupKeySetID = 0;
}

request struct KeySetRemoveRequest {
INT16U groupKeySetID = 0;
}

request struct KeySetReadAllIndicesRequest {
INT16U groupKeySetIDs[] = 0;
}

response struct KeySetReadResponse = 2 {
GroupKeySetStruct groupKeySet = 0;
}

response struct KeySetReadAllIndicesResponse = 5 {
INT16U groupKeySetIDs[] = 0;
}

command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4;
}

server cluster FixedLabel = 64 {
readonly attribute LabelStruct labelList[] = 0;
readonly attribute bitmap32 featureMap = 65532;
Expand Down Expand Up @@ -2104,6 +2172,15 @@ endpoint 0 {
ram attribute clusterRevision default = 1;
}

server cluster GroupKeyManagement {
callback attribute groupKeyMap;
callback attribute groupTable;
callback attribute maxGroupsPerFabric;
callback attribute maxGroupKeysPerFabric default = 1;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster FixedLabel {
callback attribute labelList;
ram attribute featureMap;
Expand All @@ -2121,6 +2198,7 @@ endpoint 1 {

server cluster Identify {
ram attribute identifyTime;
ram attribute identifyType;
ram attribute featureMap;
ram attribute clusterRevision default = 4;
}
Expand Down
199 changes: 199 additions & 0 deletions examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5133,6 +5133,189 @@
}
]
},
{
"name": "Group Key Management",
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
{
"name": "KeySetWrite",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "KeySetRead",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "KeySetRemove",
"code": 3,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "KeySetReadAllIndices",
"code": 4,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": []
},
{
"name": "Group Key Management",
"code": 63,
"mfgCode": null,
"define": "GROUP_KEY_MANAGEMENT_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
{
"name": "KeySetReadResponse",
"code": 2,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "KeySetReadAllIndicesResponse",
"code": 5,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
}
],
"attributes": [
{
"name": "GroupKeyMap",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GroupTable",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "MaxGroupsPerFabric",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "MaxGroupKeysPerFabric",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 0,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Fixed Label",
"code": 64,
Expand Down Expand Up @@ -5598,6 +5781,22 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "identify type",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "enum8",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down
2 changes: 2 additions & 0 deletions examples/lock-app/nxp/k32w/k32w0/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ k32w0_sdk_target = get_label_info(":sdk", "label_no_toolchain")

chip_stack_lock_tracking = "fatal"
chip_enable_ble = true

chip_progress_logging = false
Loading

0 comments on commit f62daff

Please sign in to comment.