diff --git a/examples/all-clusters-app/linux/args.gni b/examples/all-clusters-app/linux/args.gni index 41ec0cfcca9cb4..831db672b67f5d 100644 --- a/examples/all-clusters-app/linux/args.gni +++ b/examples/all-clusters-app/linux/args.gni @@ -51,4 +51,4 @@ openthread_project_core_config_file = rebase_path( get_path_info( "${chip_root}/third_party/openthread/repo/examples/platforms/simulation/openthread-core-simulation-config.h", "abspath")) -chip_config_enable_groupcast = true +chip_config_enable_groupcast = false diff --git a/examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.cpp b/examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.cpp index 973bf943ba333d..19076988f39896 100644 --- a/examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.cpp +++ b/examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.cpp @@ -93,14 +93,17 @@ CHIP_ERROR RootNodeDevice::Register(EndpointId endpointId, CodeDrivenDataModelPr ReturnErrorOnFailure(provider.AddCluster(mGroupKeyManagementCluster.Registration())); #if CHIP_CONFIG_ENABLE_GROUPCAST - mGroupcastCluster.Create(GroupcastContext{ .fabricTable = mContext.fabricTable, - .groupDataProvider = mContext.groupDataProvider, - .timerDelegate = mContext.timerDelegate, - .accessControl = mContext.accessControl }, - BitFlags(Clusters::Groupcast::Feature::kListener, - Clusters::Groupcast::Feature::kSender, - Clusters::Groupcast::Feature::kPerGroup)); - ReturnErrorOnFailure(provider.AddCluster(mGroupcastCluster.Registration())); + if (mContext.groupDataProvider.IsGroupcastEnabled()) + { + mGroupcastCluster.Create(GroupcastContext{ .fabricTable = mContext.fabricTable, + .groupDataProvider = mContext.groupDataProvider, + .timerDelegate = mContext.timerDelegate, + .accessControl = mContext.accessControl }, + BitFlags(Clusters::Groupcast::Feature::kListener, + Clusters::Groupcast::Feature::kSender, + Clusters::Groupcast::Feature::kPerGroup)); + ReturnErrorOnFailure(provider.AddCluster(mGroupcastCluster.Registration())); + } #endif // CHIP_CONFIG_ENABLE_GROUPCAST mSoftwareDiagnosticsServerCluster.Create(SoftwareDiagnosticsServerCluster::OptionalAttributeSet{}, diff --git a/examples/all-devices-app/posix/app_options/AppOptions.cpp b/examples/all-devices-app/posix/app_options/AppOptions.cpp index 6b6533988fecb0..e993b88befa6a7 100644 --- a/examples/all-devices-app/posix/app_options/AppOptions.cpp +++ b/examples/all-devices-app/posix/app_options/AppOptions.cpp @@ -37,6 +37,7 @@ constexpr uint16_t kOptionProductId = 0xffd6; constexpr uint16_t kOptionPort = 0xffd7; constexpr uint16_t kOptionInterfaceId = 0xffd8; constexpr uint16_t kOptionBLE = 0xffd9; +constexpr uint16_t kOptionGroupcast = 0xffda; DeviceTypeParser AppOptions::sParser; AppOptions::AppConfig AppOptions::mConfig; @@ -113,6 +114,10 @@ bool AppOptions::AllDevicesAppOptionHandler(const char * program, OptionSet * op case kOptionInterfaceId: mConfig.interfaceId = static_cast(strtoul(value, nullptr, 0)); return true; + case kOptionGroupcast: + mConfig.enableGroupcast = true; + ChipLogProgress(AppServer, "Groupcast usage enabled"); + return true; default: ChipLogError(Support, "%s: INTERNAL ERROR: Unhandled option: %s\n", program, name); return false; @@ -137,6 +142,7 @@ OptionSet * AppOptions::GetOptions() { "product-id", kArgumentRequired, kOptionProductId }, { "port", kArgumentRequired, kOptionPort }, { "interface-id", kArgumentRequired, kOptionInterfaceId }, + { "groupcast", kNoArgument, kOptionGroupcast }, {}, // need empty terminator }; diff --git a/examples/all-devices-app/posix/app_options/AppOptions.h b/examples/all-devices-app/posix/app_options/AppOptions.h index 4e13e16b680505..a30d9228347ad8 100644 --- a/examples/all-devices-app/posix/app_options/AppOptions.h +++ b/examples/all-devices-app/posix/app_options/AppOptions.h @@ -41,6 +41,7 @@ class AppOptions std::optional productId; std::optional port; std::optional interfaceId; + bool enableGroupcast = false; }; static chip::ArgParser::OptionSet * GetOptions(); diff --git a/examples/all-devices-app/posix/main.cpp b/examples/all-devices-app/posix/main.cpp index 0270656a9ce3df..3bc78cf1eab9f0 100644 --- a/examples/all-devices-app/posix/main.cpp +++ b/examples/all-devices-app/posix/main.cpp @@ -204,10 +204,14 @@ void RunApplication(AppMainLoopImplementation * mainLoop = nullptr) SuccessOrDie(initParams.InitializeStaticResourcesBeforeServerInit()); #if CHIP_CONFIG_ENABLE_GROUPCAST - static chip::Access::Examples::GroupAuxiliaryAccessControlDelegate groupAuxDelegate(&gGroupDataProvider, - &Server::GetInstance().GetFabricTable()); - initParams.groupAuxiliaryAccessControlDelegate = &groupAuxDelegate; - gGroupDataProvider.SetGroupcastEnabled(true); + // TODO(#72056): Once groupcast is enabled by default, this should not be dependent on the app argument. + if (AppOptions::GetConfig().enableGroupcast) + { + static chip::Access::Examples::GroupAuxiliaryAccessControlDelegate groupAuxDelegate( + &gGroupDataProvider, &Server::GetInstance().GetFabricTable()); + initParams.groupAuxiliaryAccessControlDelegate = &groupAuxDelegate; + gGroupDataProvider.SetGroupcastEnabled(true); + } #endif // CHIP_CONFIG_ENABLE_GROUPCAST gGroupDataProvider.SetStorageDelegate(initParams.persistentStorageDelegate); diff --git a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter index a6b9fcbb370f75..4cfb6fd9c16355 100644 --- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter +++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter @@ -2398,116 +2398,6 @@ provisional cluster ScenesManagement = 98 { fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } -/** The Groupcast cluster manages the content of the node-wide multicast Group membership that is part of the underlying interaction layer. */ -provisional cluster Groupcast = 101 { - revision 1; - - enum GroupcastTestResultEnum : enum8 { - kSuccess = 0; - kGeneralError = 1; - kMessageReplay = 2; - kFailedAuth = 3; - kNoAvailableKey = 4; - kSendFailure = 5; - } - - enum GroupcastTestingEnum : enum8 { - kDisableTesting = 0; - kEnableListenerTesting = 1; - kEnableSenderTesting = 2; - } - - enum MulticastAddrPolicyEnum : enum8 { - kIanaAddr = 0; - kPerGroup = 1; - } - - bitmap Feature : bitmap32 { - kListener = 0x1; - kSender = 0x2; - kPerGroup = 0x4; - } - - fabric_scoped struct MembershipStruct { - group_id groupID = 0; - optional endpoint_no endpoints[] = 1; - fabric_sensitive int16u keySetID = 2; - optional boolean hasAuxiliaryACL = 3; - MulticastAddrPolicyEnum mcastAddrPolicy = 4; - fabric_idx fabricIndex = 254; - } - - provisional fabric_sensitive info event access(read: administer) GroupcastTesting = 0 { - optional octet_string sourceIpAddress = 0; - optional octet_string destinationIpAddress = 1; - optional group_id groupID = 2; - optional endpoint_no endpointID = 3; - optional cluster_id clusterID = 4; - optional int32u elementID = 5; - optional boolean accessAllowed = 6; - GroupcastTestResultEnum groupcastTestResult = 7; - fabric_idx fabricIndex = 254; - } - - provisional readonly attribute MembershipStruct membership[] = 0; - provisional readonly attribute int16u maxMembershipCount = 1; - provisional readonly attribute int16u maxMcastAddrCount = 2; - provisional readonly attribute int16u usedMcastAddrCount = 3; - provisional readonly attribute fabric_idx fabricUnderTest = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct JoinGroupRequest { - group_id groupID = 0; - endpoint_no endpoints[] = 1; - int16u keySetID = 2; - optional octet_string<16> key = 3; - optional boolean useAuxiliaryACL = 4; - optional boolean replaceEndpoints = 5; - optional MulticastAddrPolicyEnum mcastAddrPolicy = 6; - } - - request struct LeaveGroupRequest { - group_id groupID = 0; - optional endpoint_no endpoints[] = 1; - } - - response struct LeaveGroupResponse = 2 { - group_id groupID = 0; - endpoint_no endpoints[] = 1; - } - - request struct UpdateGroupKeyRequest { - group_id groupID = 0; - int16u keySetID = 1; - optional octet_string<16> key = 2; - } - - request struct ConfigureAuxiliaryACLRequest { - group_id groupID = 0; - boolean useAuxiliaryACL = 1; - } - - request struct GroupcastTestingRequest { - GroupcastTestingEnum testOperation = 0; - optional int16u durationSeconds = 1; - } - - /** This command SHALL be used to instruct the server to join a multicast group. */ - fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0; - /** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */ - fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1; - /** This command SHALL allow a fabric administrator to update the OperationalGroupKey associated with the existing group identified by GroupID, which is already joined. */ - fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3; - /** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */ - fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4; - /** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */ - fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5; -} - /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 9; @@ -3145,26 +3035,6 @@ endpoint 0 { callback attribute featureMap; callback attribute clusterRevision; } - - server cluster Groupcast { - emits event GroupcastTesting; - callback attribute membership; - callback attribute maxMembershipCount; - callback attribute maxMcastAddrCount; - callback attribute usedMcastAddrCount; - callback attribute fabricUnderTest; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - callback attribute clusterRevision default = 1; - - handle command JoinGroup; - handle command LeaveGroup; - handle command UpdateGroupKey; - handle command ConfigureAuxiliaryACL; - handle command GroupcastTesting; - } } endpoint 1 { device type ma_dimmablelight = 257, version 1; diff --git a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap index 938c14a2faa275..03cf417e740fd0 100644 --- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap +++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap @@ -3918,7 +3918,7 @@ "mfgCode": null, "define": "GROUPCAST_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "apiMaturity": "provisional", "commands": [ { diff --git a/examples/lighting-app-data-mode-no-unique-id/linux/args.gni b/examples/lighting-app-data-mode-no-unique-id/linux/args.gni index 5dfeb83469fa49..a08112e9fa4857 100644 --- a/examples/lighting-app-data-mode-no-unique-id/linux/args.gni +++ b/examples/lighting-app-data-mode-no-unique-id/linux/args.gni @@ -34,4 +34,4 @@ chip_enable_rotating_device_id = true chip_enable_read_client = false -chip_config_enable_groupcast = true +chip_config_enable_groupcast = false diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index fa41f24242c2de..ee3849cdc387dd 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2189,116 +2189,6 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } -/** The Groupcast cluster manages the content of the node-wide multicast Group membership that is part of the underlying interaction layer. */ -provisional cluster Groupcast = 101 { - revision 1; - - enum GroupcastTestResultEnum : enum8 { - kSuccess = 0; - kGeneralError = 1; - kMessageReplay = 2; - kFailedAuth = 3; - kNoAvailableKey = 4; - kSendFailure = 5; - } - - enum GroupcastTestingEnum : enum8 { - kDisableTesting = 0; - kEnableListenerTesting = 1; - kEnableSenderTesting = 2; - } - - enum MulticastAddrPolicyEnum : enum8 { - kIanaAddr = 0; - kPerGroup = 1; - } - - bitmap Feature : bitmap32 { - kListener = 0x1; - kSender = 0x2; - kPerGroup = 0x4; - } - - fabric_scoped struct MembershipStruct { - group_id groupID = 0; - optional endpoint_no endpoints[] = 1; - fabric_sensitive int16u keySetID = 2; - optional boolean hasAuxiliaryACL = 3; - MulticastAddrPolicyEnum mcastAddrPolicy = 4; - fabric_idx fabricIndex = 254; - } - - provisional fabric_sensitive info event access(read: administer) GroupcastTesting = 0 { - optional octet_string sourceIpAddress = 0; - optional octet_string destinationIpAddress = 1; - optional group_id groupID = 2; - optional endpoint_no endpointID = 3; - optional cluster_id clusterID = 4; - optional int32u elementID = 5; - optional boolean accessAllowed = 6; - GroupcastTestResultEnum groupcastTestResult = 7; - fabric_idx fabricIndex = 254; - } - - provisional readonly attribute MembershipStruct membership[] = 0; - provisional readonly attribute int16u maxMembershipCount = 1; - provisional readonly attribute int16u maxMcastAddrCount = 2; - provisional readonly attribute int16u usedMcastAddrCount = 3; - provisional readonly attribute fabric_idx fabricUnderTest = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct JoinGroupRequest { - group_id groupID = 0; - endpoint_no endpoints[] = 1; - int16u keySetID = 2; - optional octet_string<16> key = 3; - optional boolean useAuxiliaryACL = 4; - optional boolean replaceEndpoints = 5; - optional MulticastAddrPolicyEnum mcastAddrPolicy = 6; - } - - request struct LeaveGroupRequest { - group_id groupID = 0; - optional endpoint_no endpoints[] = 1; - } - - response struct LeaveGroupResponse = 2 { - group_id groupID = 0; - endpoint_no endpoints[] = 1; - } - - request struct UpdateGroupKeyRequest { - group_id groupID = 0; - int16u keySetID = 1; - optional octet_string<16> key = 2; - } - - request struct ConfigureAuxiliaryACLRequest { - group_id groupID = 0; - boolean useAuxiliaryACL = 1; - } - - request struct GroupcastTestingRequest { - GroupcastTestingEnum testOperation = 0; - optional int16u durationSeconds = 1; - } - - /** This command SHALL be used to instruct the server to join a multicast group. */ - fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0; - /** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */ - fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1; - /** This command SHALL allow a fabric administrator to update the OperationalGroupKey associated with the existing group identified by GroupID, which is already joined. */ - fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3; - /** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */ - fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4; - /** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */ - fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5; -} - /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 9; @@ -2958,26 +2848,6 @@ endpoint 0 { callback attribute featureMap; callback attribute clusterRevision; } - - server cluster Groupcast { - emits event GroupcastTesting; - callback attribute membership; - callback attribute maxMembershipCount; - callback attribute maxMcastAddrCount; - callback attribute usedMcastAddrCount; - callback attribute fabricUnderTest; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - callback attribute clusterRevision default = 1; - - handle command JoinGroup; - handle command LeaveGroup; - handle command UpdateGroupKey; - handle command ConfigureAuxiliaryACL; - handle command GroupcastTesting; - } } endpoint 1 { device type ma_colortemperaturelight = 268, version 4; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index a45e09cf014463..09a6e87ba7b68f 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4316,7 +4316,7 @@ "mfgCode": null, "define": "GROUPCAST_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "JoinGroup", diff --git a/examples/lighting-app/linux/args.gni b/examples/lighting-app/linux/args.gni index 0a97dffc3f700c..15118d37b96a5b 100644 --- a/examples/lighting-app/linux/args.gni +++ b/examples/lighting-app/linux/args.gni @@ -33,4 +33,4 @@ chip_enable_rotating_device_id = true chip_enable_read_client = false -chip_config_enable_groupcast = true +chip_config_enable_groupcast = false diff --git a/examples/lighting-app/silabs/build_for_wifi_args.gni b/examples/lighting-app/silabs/build_for_wifi_args.gni index 4ea8580b445e2b..9ddfe65104bc31 100644 --- a/examples/lighting-app/silabs/build_for_wifi_args.gni +++ b/examples/lighting-app/silabs/build_for_wifi_args.gni @@ -26,4 +26,4 @@ chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/lighting-app/silabs/data_model:silabs-lighting" -chip_config_enable_groupcast = true +chip_config_enable_groupcast = false diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 06f2d84acc9f67..f3ccfab00a3d30 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -2127,116 +2127,6 @@ provisional cluster ScenesManagement = 98 { fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } -/** The Groupcast cluster manages the content of the node-wide multicast Group membership that is part of the underlying interaction layer. */ -provisional cluster Groupcast = 101 { - revision 1; - - enum GroupcastTestResultEnum : enum8 { - kSuccess = 0; - kGeneralError = 1; - kMessageReplay = 2; - kFailedAuth = 3; - kNoAvailableKey = 4; - kSendFailure = 5; - } - - enum GroupcastTestingEnum : enum8 { - kDisableTesting = 0; - kEnableListenerTesting = 1; - kEnableSenderTesting = 2; - } - - enum MulticastAddrPolicyEnum : enum8 { - kIanaAddr = 0; - kPerGroup = 1; - } - - bitmap Feature : bitmap32 { - kListener = 0x1; - kSender = 0x2; - kPerGroup = 0x4; - } - - fabric_scoped struct MembershipStruct { - group_id groupID = 0; - optional endpoint_no endpoints[] = 1; - fabric_sensitive int16u keySetID = 2; - optional boolean hasAuxiliaryACL = 3; - MulticastAddrPolicyEnum mcastAddrPolicy = 4; - fabric_idx fabricIndex = 254; - } - - provisional fabric_sensitive info event access(read: administer) GroupcastTesting = 0 { - optional octet_string sourceIpAddress = 0; - optional octet_string destinationIpAddress = 1; - optional group_id groupID = 2; - optional endpoint_no endpointID = 3; - optional cluster_id clusterID = 4; - optional int32u elementID = 5; - optional boolean accessAllowed = 6; - GroupcastTestResultEnum groupcastTestResult = 7; - fabric_idx fabricIndex = 254; - } - - provisional readonly attribute MembershipStruct membership[] = 0; - provisional readonly attribute int16u maxMembershipCount = 1; - provisional readonly attribute int16u maxMcastAddrCount = 2; - provisional readonly attribute int16u usedMcastAddrCount = 3; - provisional readonly attribute fabric_idx fabricUnderTest = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct JoinGroupRequest { - group_id groupID = 0; - endpoint_no endpoints[] = 1; - int16u keySetID = 2; - optional octet_string<16> key = 3; - optional boolean useAuxiliaryACL = 4; - optional boolean replaceEndpoints = 5; - optional MulticastAddrPolicyEnum mcastAddrPolicy = 6; - } - - request struct LeaveGroupRequest { - group_id groupID = 0; - optional endpoint_no endpoints[] = 1; - } - - response struct LeaveGroupResponse = 2 { - group_id groupID = 0; - endpoint_no endpoints[] = 1; - } - - request struct UpdateGroupKeyRequest { - group_id groupID = 0; - int16u keySetID = 1; - optional octet_string<16> key = 2; - } - - request struct ConfigureAuxiliaryACLRequest { - group_id groupID = 0; - boolean useAuxiliaryACL = 1; - } - - request struct GroupcastTestingRequest { - GroupcastTestingEnum testOperation = 0; - optional int16u durationSeconds = 1; - } - - /** This command SHALL be used to instruct the server to join a multicast group. */ - fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0; - /** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */ - fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1; - /** This command SHALL allow a fabric administrator to update the OperationalGroupKey associated with the existing group identified by GroupID, which is already joined. */ - fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3; - /** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */ - fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4; - /** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */ - fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5; -} - /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 9; @@ -2826,26 +2716,6 @@ endpoint 0 { handle command KeySetRemove; handle command KeySetReadAllIndices; } - - server cluster Groupcast { - emits event GroupcastTesting; - callback attribute membership; - callback attribute maxMembershipCount; - callback attribute maxMcastAddrCount; - callback attribute usedMcastAddrCount; - callback attribute fabricUnderTest; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - callback attribute clusterRevision default = 1; - - handle command JoinGroup; - handle command LeaveGroup; - handle command UpdateGroupKey; - handle command ConfigureAuxiliaryACL; - handle command GroupcastTesting; - } } endpoint 1 { device type ma_extendedcolorlight = 269, version 5; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 857bc2895d268c..46b5728e950e2d 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -3576,7 +3576,7 @@ "mfgCode": null, "define": "GROUPCAST_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "JoinGroup", diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index faf25850e7a86e..29915b2aab21dc 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -2393,116 +2393,6 @@ provisional cluster ScenesManagement = 98 { fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64; } -/** The Groupcast cluster manages the content of the node-wide multicast Group membership that is part of the underlying interaction layer. */ -provisional cluster Groupcast = 101 { - revision 1; - - enum GroupcastTestResultEnum : enum8 { - kSuccess = 0; - kGeneralError = 1; - kMessageReplay = 2; - kFailedAuth = 3; - kNoAvailableKey = 4; - kSendFailure = 5; - } - - enum GroupcastTestingEnum : enum8 { - kDisableTesting = 0; - kEnableListenerTesting = 1; - kEnableSenderTesting = 2; - } - - enum MulticastAddrPolicyEnum : enum8 { - kIanaAddr = 0; - kPerGroup = 1; - } - - bitmap Feature : bitmap32 { - kListener = 0x1; - kSender = 0x2; - kPerGroup = 0x4; - } - - fabric_scoped struct MembershipStruct { - group_id groupID = 0; - optional endpoint_no endpoints[] = 1; - fabric_sensitive int16u keySetID = 2; - optional boolean hasAuxiliaryACL = 3; - MulticastAddrPolicyEnum mcastAddrPolicy = 4; - fabric_idx fabricIndex = 254; - } - - provisional fabric_sensitive info event access(read: administer) GroupcastTesting = 0 { - optional octet_string sourceIpAddress = 0; - optional octet_string destinationIpAddress = 1; - optional group_id groupID = 2; - optional endpoint_no endpointID = 3; - optional cluster_id clusterID = 4; - optional int32u elementID = 5; - optional boolean accessAllowed = 6; - GroupcastTestResultEnum groupcastTestResult = 7; - fabric_idx fabricIndex = 254; - } - - provisional readonly attribute MembershipStruct membership[] = 0; - provisional readonly attribute int16u maxMembershipCount = 1; - provisional readonly attribute int16u maxMcastAddrCount = 2; - provisional readonly attribute int16u usedMcastAddrCount = 3; - provisional readonly attribute fabric_idx fabricUnderTest = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct JoinGroupRequest { - group_id groupID = 0; - endpoint_no endpoints[] = 1; - int16u keySetID = 2; - optional octet_string<16> key = 3; - optional boolean useAuxiliaryACL = 4; - optional boolean replaceEndpoints = 5; - optional MulticastAddrPolicyEnum mcastAddrPolicy = 6; - } - - request struct LeaveGroupRequest { - group_id groupID = 0; - optional endpoint_no endpoints[] = 1; - } - - response struct LeaveGroupResponse = 2 { - group_id groupID = 0; - endpoint_no endpoints[] = 1; - } - - request struct UpdateGroupKeyRequest { - group_id groupID = 0; - int16u keySetID = 1; - optional octet_string<16> key = 2; - } - - request struct ConfigureAuxiliaryACLRequest { - group_id groupID = 0; - boolean useAuxiliaryACL = 1; - } - - request struct GroupcastTestingRequest { - GroupcastTestingEnum testOperation = 0; - optional int16u durationSeconds = 1; - } - - /** This command SHALL be used to instruct the server to join a multicast group. */ - fabric command access(invoke: manage) JoinGroup(JoinGroupRequest): DefaultSuccess = 0; - /** This command SHALL allow a maintainer to request that the server withdraws itself or specific endpoints from a specific group or from all groups of this client's fabric. */ - fabric command access(invoke: manage) LeaveGroup(LeaveGroupRequest): LeaveGroupResponse = 1; - /** This command SHALL allow a fabric administrator to update the OperationalGroupKey associated with the existing group identified by GroupID, which is already joined. */ - fabric command access(invoke: manage) UpdateGroupKey(UpdateGroupKeyRequest): DefaultSuccess = 3; - /** This command SHALL allow an Administrator to enable or disable the generation of AuxiliaryACL entries in the Access Control Cluster based on the groups joined (see Groupcast Auxiliary ACL Handling). */ - fabric command access(invoke: administer) ConfigureAuxiliaryACL(ConfigureAuxiliaryACLRequest): DefaultSuccess = 4; - /** This command SHALL allow an Administrator to configure test modes that allow validation of Groupcast communication. */ - fabric command access(invoke: administer) GroupcastTesting(GroupcastTestingRequest): DefaultSuccess = 5; -} - /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 9; @@ -3066,26 +2956,6 @@ endpoint 0 { callback attribute featureMap; callback attribute clusterRevision; } - - server cluster Groupcast { - emits event GroupcastTesting; - callback attribute membership; - callback attribute maxMembershipCount; - callback attribute maxMcastAddrCount; - callback attribute usedMcastAddrCount; - callback attribute fabricUnderTest; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - callback attribute clusterRevision default = 1; - - handle command JoinGroup; - handle command LeaveGroup; - handle command UpdateGroupKey; - handle command ConfigureAuxiliaryACL; - handle command GroupcastTesting; - } } endpoint 1 { device type ma_powersource = 17, version 1; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index 84754c058837bf..59c447dae6a304 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -2995,7 +2995,7 @@ "mfgCode": null, "define": "GROUPCAST_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "JoinGroup", diff --git a/examples/lighting-app/silabs/openthread.gni b/examples/lighting-app/silabs/openthread.gni index f69232e26c2430..38af65ca34cb7c 100644 --- a/examples/lighting-app/silabs/openthread.gni +++ b/examples/lighting-app/silabs/openthread.gni @@ -30,4 +30,4 @@ chip_enable_read_client = false openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" -chip_config_enable_groupcast = true +chip_config_enable_groupcast = false diff --git a/src/app/clusters/groups-server/GroupsCluster.cpp b/src/app/clusters/groups-server/GroupsCluster.cpp index 1200bf5b15438a..4bc10fa7c5c7f4 100644 --- a/src/app/clusters/groups-server/GroupsCluster.cpp +++ b/src/app/clusters/groups-server/GroupsCluster.cpp @@ -46,8 +46,6 @@ using chip::Protocols::InteractionModel::Status; namespace chip::app::Clusters { namespace { -[[maybe_unused]] constexpr uint32_t kGroupsClusterRevisionBeforeGroupcast = 4; - void NotifyGroupTableChanged(ServerClusterContext * context) { // TODO: This seems a bit coupled: we are notifying in this cluster that ANOTHER cluster @@ -217,7 +215,7 @@ DataModel::ActionReturnStatus GroupsCluster::ReadAttribute(const DataModel::Read switch (request.path.mAttributeId) { case ClusterRevision::Id: - return encoder.Encode(mGroupDataProvider.IsGroupcastEnabled() ? kRevision : kGroupsClusterRevisionBeforeGroupcast); + return encoder.Encode(kRevision); case FeatureMap::Id: // Group names is hardcoded (feature is M conformance in the spec) return encoder.Encode(Feature::kGroupNames); diff --git a/src/credentials/GroupDataProvider.h b/src/credentials/GroupDataProvider.h index b7735ed5cdb010..b6206ea36d8b9c 100644 --- a/src/credentials/GroupDataProvider.h +++ b/src/credentials/GroupDataProvider.h @@ -257,7 +257,12 @@ class GroupDataProvider GroupDataProvider(const GroupDataProvider &) = delete; GroupDataProvider & operator=(const GroupDataProvider &) = delete; - uint16_t GetMaxGroupsPerFabric() const { return mMaxGroupsPerFabric; } + // TODO(#72056): Once groupcast is enabled by default, this should just return mMaxGroupsPerFabric. See GroupDataProviderImpl() + // constructor. + uint16_t GetMaxGroupsPerFabric() + { + return static_cast(IsGroupcastEnabled() ? (getMaxMembershipCount() / 2) : mMaxGroupsPerFabric); + } uint16_t GetMaxGroupKeysPerFabric() const { return mMaxGroupKeysPerFabric; } /** diff --git a/src/credentials/GroupDataProviderImpl.cpp b/src/credentials/GroupDataProviderImpl.cpp index 02475af687996c..66a4e73e6eedb6 100644 --- a/src/credentials/GroupDataProviderImpl.cpp +++ b/src/credentials/GroupDataProviderImpl.cpp @@ -955,7 +955,7 @@ CHIP_ERROR GroupDataProviderImpl::SetGroupInfoAt(chip::FabricIndex fabric_index, { // Insert last VerifyOrReturnError(fabric.group_count == index, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(fabric.group_count < mMaxGroupsPerFabric, CHIP_ERROR_INVALID_LIST_LENGTH); + VerifyOrReturnError(fabric.group_count < GetMaxGroupsPerFabric(), CHIP_ERROR_INVALID_LIST_LENGTH); fabric.group_count++; } @@ -1077,7 +1077,7 @@ CHIP_ERROR GroupDataProviderImpl::AddEndpoint(chip::FabricIndex fabric_index, ch if (!group.Find(mStorage, fabric, group_id)) { // New group - VerifyOrReturnError(fabric.group_count < mMaxGroupsPerFabric, CHIP_ERROR_INVALID_LIST_LENGTH); + VerifyOrReturnError(fabric.group_count < GetMaxGroupsPerFabric(), CHIP_ERROR_INVALID_LIST_LENGTH); ReturnErrorOnFailure(EndpointData(fabric_index, group_id, endpoint_id).Save(mStorage)); // Save the new group into the fabric group.group_id = group_id; @@ -1477,7 +1477,7 @@ CHIP_ERROR GroupDataProviderImpl::SetGroupKeyAt(chip::FabricIndex fabric_index, // Insert last VerifyOrReturnError(fabric.map_count == index, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(fabric.map_count < mMaxGroupsPerFabric, CHIP_ERROR_INVALID_LIST_LENGTH); + VerifyOrReturnError(fabric.map_count < GetMaxGroupsPerFabric(), CHIP_ERROR_INVALID_LIST_LENGTH); map.next = 0; ReturnErrorOnFailure(map.Save(mStorage)); diff --git a/src/credentials/GroupDataProviderImpl.h b/src/credentials/GroupDataProviderImpl.h index 3d8e89660a8ad8..af647a22d8f7c0 100644 --- a/src/credentials/GroupDataProviderImpl.h +++ b/src/credentials/GroupDataProviderImpl.h @@ -36,7 +36,8 @@ class GroupDataProviderImpl : public GroupDataProvider // TODO Make this configurable. Note: if PGA feature is enabled it SHALL be >= 4. else it SHALL = 1. static constexpr uint16_t kMaxMcastAddrCount = 4; - GroupDataProviderImpl() : GroupDataProvider(kMaxMembershipPerFabric, kMaxGroupKeysPerFabric) {} + // TODO(#72056): When groupcast is enabled by default, maxGroupsPerFabric passed in should be kMaxMembershipPerFabric + GroupDataProviderImpl() : GroupDataProvider(CHIP_CONFIG_MAX_GROUPS_PER_FABRIC, kMaxGroupKeysPerFabric) {} GroupDataProviderImpl(uint16_t maxGroupsPerFabric, uint16_t maxGroupKeysPerFabric) : GroupDataProvider(maxGroupsPerFabric, maxGroupKeysPerFabric) {} diff --git a/src/python_testing/TC_ACE_1_6.py b/src/python_testing/TC_ACE_1_6.py index 92e3c52465accd..b2338f7ce34130 100644 --- a/src/python_testing/TC_ACE_1_6.py +++ b/src/python_testing/TC_ACE_1_6.py @@ -50,7 +50,7 @@ # quiet: true # run3: # app: ${ALL_DEVICES_APP} -# app-args: --device on-off-light:1 --discriminator 1234 +# app-args: --device on-off-light:1 --discriminator 1234 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_GC_2_1.py b/src/python_testing/TC_GC_2_1.py index 6cc8bd2a374de4..0f347ccb657eaf 100644 --- a/src/python_testing/TC_GC_2_1.py +++ b/src/python_testing/TC_GC_2_1.py @@ -20,8 +20,8 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# app: ${ALL_DEVICES_APP} +# app-args: --device on-off-light:1 --discriminator 1234 --KVS kvs1 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_GC_2_2.py b/src/python_testing/TC_GC_2_2.py index 94708523469597..c57566911ae043 100644 --- a/src/python_testing/TC_GC_2_2.py +++ b/src/python_testing/TC_GC_2_2.py @@ -20,8 +20,8 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# app: ${ALL_DEVICES_APP} +# app-args: --device on-off-light:1 --discriminator 1234 --KVS kvs1 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_GC_2_3.py b/src/python_testing/TC_GC_2_3.py index 86362e04d0936a..6a52d6c230fbb6 100644 --- a/src/python_testing/TC_GC_2_3.py +++ b/src/python_testing/TC_GC_2_3.py @@ -20,8 +20,8 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# app: ${ALL_DEVICES_APP} +# app-args: --device on-off-light:1 --discriminator 1234 --KVS kvs1 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_GC_2_4.py b/src/python_testing/TC_GC_2_4.py index 5a3f96e10ef815..87c4e44f1baba0 100644 --- a/src/python_testing/TC_GC_2_4.py +++ b/src/python_testing/TC_GC_2_4.py @@ -20,8 +20,8 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# app: ${ALL_DEVICES_APP} +# app-args: --device on-off-light:1 --discriminator 1234 --KVS kvs1 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_GC_2_5.py b/src/python_testing/TC_GC_2_5.py index a3c0596ee2b06d..942952c9898f66 100644 --- a/src/python_testing/TC_GC_2_5.py +++ b/src/python_testing/TC_GC_2_5.py @@ -20,8 +20,8 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# app: ${ALL_DEVICES_APP} +# app-args: --device on-off-light:1 --discriminator 1234 --KVS kvs1 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_GC_2_6.py b/src/python_testing/TC_GC_2_6.py index 11a62fc64b509a..947d580d5cbb85 100644 --- a/src/python_testing/TC_GC_2_6.py +++ b/src/python_testing/TC_GC_2_6.py @@ -20,8 +20,8 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# app: ${ALL_DEVICES_APP} +# app-args: --device on-off-light:1 --discriminator 1234 --KVS kvs1 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_GC_2_7.py b/src/python_testing/TC_GC_2_7.py index f3550ad27fcac0..55da11db8f1e33 100644 --- a/src/python_testing/TC_GC_2_7.py +++ b/src/python_testing/TC_GC_2_7.py @@ -20,8 +20,8 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# app: ${ALL_DEVICES_APP} +# app-args: --device on-off-light:1 --discriminator 1234 --KVS kvs1 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_GC_2_8.py b/src/python_testing/TC_GC_2_8.py index edf336dc08f343..246242adde096f 100644 --- a/src/python_testing/TC_GC_2_8.py +++ b/src/python_testing/TC_GC_2_8.py @@ -20,8 +20,8 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: -# app: ${ALL_CLUSTERS_APP} -# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# app: ${ALL_DEVICES_APP} +# app-args: --device on-off-light:1 --discriminator 1234 --KVS kvs1 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_SC_5_1.py b/src/python_testing/TC_SC_5_1.py index f44366cb79beb2..e0bba4d49d091e 100644 --- a/src/python_testing/TC_SC_5_1.py +++ b/src/python_testing/TC_SC_5_1.py @@ -50,7 +50,7 @@ # quiet: true # run3: # app: ${ALL_DEVICES_APP} -# app-args: --device on-off-light:1 --discriminator 1234 +# app-args: --device on-off-light:1 --discriminator 1234 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network diff --git a/src/python_testing/TC_SC_5_2.py b/src/python_testing/TC_SC_5_2.py index f1b6646bc1747c..728a5be4ce74d2 100644 --- a/src/python_testing/TC_SC_5_2.py +++ b/src/python_testing/TC_SC_5_2.py @@ -50,7 +50,7 @@ # quiet: true # run3: # app: ${ALL_DEVICES_APP} -# app-args: --device on-off-light:1 --discriminator 1234 +# app-args: --device on-off-light:1 --discriminator 1234 --groupcast # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network