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

[Fabric-Sync] Use aggregator endpoint instead of root endpoint for CCTRL #35977

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions examples/fabric-admin/device_manager/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ using namespace chip::app::Clusters;

namespace {

constexpr EndpointId kAggregatorEndpointId = 1;
constexpr uint16_t kWindowTimeout = 300;
constexpr uint16_t kIteration = 1000;
constexpr uint16_t kSubscribeMinInterval = 0;
Expand Down Expand Up @@ -207,7 +208,7 @@ void DeviceManager::SubscribeRemoteFabricBridge()
// Prepare and push the commissioner control subscribe command
commandBuilder.Add("commissionercontrol subscribe-event commissioning-request-result ");
commandBuilder.AddFormat("%d %d %lu %d --is-urgent true --keepSubscriptions true", kSubscribeMinInterval, kSubscribeMaxInterval,
mRemoteBridgeNodeId, kRootEndpointId);
mRemoteBridgeNodeId, kAggregatorEndpointId);
PushCommand(commandBuilder.c_str());
}

Expand All @@ -224,7 +225,7 @@ void DeviceManager::ReadSupportedDeviceCategories()

commandBuilder.Add("commissionercontrol read supported-device-categories ");
commandBuilder.AddFormat("%ld ", mRemoteBridgeNodeId);
commandBuilder.AddFormat("%d", kRootEndpointId);
commandBuilder.AddFormat("%d", kAggregatorEndpointId);

PushCommand(commandBuilder.c_str());
}
Expand Down Expand Up @@ -259,7 +260,7 @@ void DeviceManager::RequestCommissioningApproval()

StringBuilder<kMaxCommandSize> commandBuilder;
commandBuilder.Add("commissionercontrol request-commissioning-approval ");
commandBuilder.AddFormat("%lu %u %u %lu %d", requestId, vendorId, productId, mRemoteBridgeNodeId, kRootEndpointId);
commandBuilder.AddFormat("%lu %u %u %lu %d", requestId, vendorId, productId, mRemoteBridgeNodeId, kAggregatorEndpointId);

mRequestId = requestId;
PushCommand(commandBuilder.c_str());
Expand Down Expand Up @@ -398,7 +399,7 @@ void DeviceManager::SendCommissionNodeRequest(uint64_t requestId, uint16_t respo

StringBuilder<kMaxCommandSize> commandBuilder;
commandBuilder.Add("commissionercontrol commission-node ");
commandBuilder.AddFormat("%lu %u %lu %d", requestId, responseTimeoutSeconds, mRemoteBridgeNodeId, kRootEndpointId);
commandBuilder.AddFormat("%lu %u %lu %d", requestId, responseTimeoutSeconds, mRemoteBridgeNodeId, kAggregatorEndpointId);

PushCommand(commandBuilder.c_str());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2059,21 +2059,6 @@ endpoint 0 {
handle command KeySetReadAllIndices;
handle command KeySetReadAllIndicesResponse;
}

server cluster CommissionerControl {
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;
Expand Down Expand Up @@ -2103,6 +2088,21 @@ endpoint 1 {
callback attribute featureMap;
callback attribute clusterRevision;
}

server cluster CommissionerControl {
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;
}
}


Loading
Loading