Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements the Commissioner Control Cluster in Matter SDK #34375

Merged
merged 14 commits into from
Jul 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1334,6 +1334,57 @@ cluster GroupKeyManagement = 63 {
fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4;
}

/** Supports the ability for clients to request the commissioning of themselves or other nodes onto a fabric which the cluster server can commission onto. */
provisional cluster CommissionerControl = 1873 {
revision 1;

bitmap SupportedDeviceCategoryBitmap : bitmap32 {
kFabricSynchronization = 0x1;
}

fabric_sensitive info event access(read: manage) CommissioningRequestResult = 0 {
int64u requestId = 0;
node_id clientNodeId = 1;
enum8 statusCode = 2;
fabric_idx fabricIndex = 254;
}

readonly attribute access(read: manage) SupportedDeviceCategoryBitmap supportedDeviceCategories = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct RequestCommissioningApprovalRequest {
int64u requestId = 0;
vendor_id vendorId = 1;
int16u productId = 2;
optional char_string<64> label = 3;
}

request struct CommissionNodeRequest {
int64u requestId = 0;
int16u responseTimeoutSeconds = 1;
optional octet_string ipAddress = 2;
optional int16u port = 3;
}

response struct ReverseOpenCommissioningWindow = 2 {
int16u commissioningTimeout = 0;
octet_string PAKEPasscodeVerifier = 1;
int16u discriminator = 2;
int32u iterations = 3;
octet_string<32> salt = 4;
}

/** This command is sent by a client to request approval for a future CommissionNode call. */
command access(invoke: manage) RequestCommissioningApproval(RequestCommissioningApprovalRequest): DefaultSuccess = 0;
/** This command is sent by a client to request that the server begins commissioning a previously approved request. */
command access(invoke: manage) CommissionNode(CommissionNodeRequest): ReverseOpenCommissioningWindow = 1;
}

endpoint 0 {
device type ma_rootdevice = 22, version 1;

@@ -1647,6 +1698,21 @@ endpoint 0 {
handle command KeySetReadAllIndices;
handle command KeySetReadAllIndicesResponse;
}

server cluster CommissionerControl {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tehampson Is that OK, that the CommissionerControl is on endpoint 0? In the spec, the CommissionerControl should be on Aggregator endpoint, which is endpoint 1 here.

emits event CommissioningRequestResult;
ram attribute supportedDeviceCategories default = 0;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

handle command RequestCommissioningApproval;
handle command CommissionNode;
handle command ReverseOpenCommissioningWindow;
}
}
endpoint 1 {
device type ma_aggregator = 14, version 1;
158 changes: 158 additions & 0 deletions examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap
Original file line number Diff line number Diff line change
@@ -4003,6 +4003,164 @@
"reportableChange": 0
}
]
},
{
"name": "Commissioner Control",
"code": 1873,
"mfgCode": null,
"define": "COMMISSIONER_CONTROL_CLUSTER",
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "RequestCommissioningApproval",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "CommissionNode",
"code": 1,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "ReverseOpenCommissioningWindow",
"code": 2,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
}
],
"attributes": [
{
"name": "SupportedDeviceCategories",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "SupportedDeviceCategoryBitmap",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"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
}
],
"events": [
{
"name": "CommissioningRequestResult",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
}
]
}
]
},
Loading
Loading