diff --git a/examples/thermostat/nxp/zap/thermostat_matter_br.matter b/examples/thermostat/nxp/zap/thermostat_matter_br.matter index bb72c0caceaf27..03d13fd74700b6 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_br.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_br.matter @@ -444,27 +444,6 @@ cluster Descriptor = 29 { readonly attribute int16u clusterRevision = 65533; } -/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -cluster Binding = 30 { - revision 1; // NOTE: Default/not specifically set - - fabric_scoped struct TargetStruct { - optional node_id node = 1; - optional group_id group = 2; - optional endpoint_no endpoint = 3; - optional cluster_id cluster = 4; - fabric_idx fabricIndex = 254; - } - - attribute access(write: manage) TargetStruct binding[] = 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; -} - /** The Access Control Cluster exposes a data model view of a Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated @@ -841,93 +820,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - 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; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - 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; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for the units in which values are conveyed in communication to a - user. As such, Nodes that visually or audibly convey measurable values to the user need a - mechanism by which they can be configured to use a user’s preferred unit. */ -cluster UnitLocalization = 45 { - revision 1; - - enum TempUnitEnum : enum8 { - kFahrenheit = 0; - kCelsius = 1; - kKelvin = 2; - } - - bitmap Feature : bitmap32 { - kTemperatureUnit = 0x1; - } - - attribute access(write: manage) optional TempUnitEnum temperatureUnit = 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; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1377,6 +1269,43 @@ cluster GeneralDiagnostics = 51 { command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ cluster ThreadNetworkDiagnostics = 53 { revision 2; @@ -2384,37 +2313,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster UnitLocalization { - ram attribute temperatureUnit; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0x1; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2492,19 +2390,41 @@ endpoint 0 { handle command TimeSnapshotResponse; } + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster WiFiNetworkDiagnostics { callback attribute bssid; callback attribute securityType; callback attribute wiFiVersion; callback attribute channelNumber; callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; callback attribute currentMaxRate; + callback attribute overrunCount; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; + + handle command ResetCounts; } server cluster AdministratorCommissioning { @@ -2603,16 +2523,6 @@ endpoint 1 { callback attribute clusterRevision; } - server cluster Binding { - callback attribute binding; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster FixedLabel { callback attribute labelList; callback attribute eventList; @@ -2655,6 +2565,7 @@ endpoint 1 { } endpoint 2 { device type ma_thread_border_router = 145, version 1; + device type ma_secondary_network_interface = 25, version 1; server cluster Descriptor { @@ -2670,13 +2581,44 @@ endpoint 2 { callback attribute clusterRevision; } + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute supportedThreadFeatures; + ram attribute threadVersion; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + server cluster ThreadNetworkDiagnostics { + emits event ConnectionStatus; + emits event NetworkFaultChange; callback attribute channel; callback attribute routingRole; callback attribute networkName; callback attribute panId; callback attribute extendedPanId; callback attribute meshLocalPrefix; + callback attribute overrunCount; callback attribute neighborTable; callback attribute routeTable; callback attribute partitionId; @@ -2684,6 +2626,51 @@ endpoint 2 { callback attribute dataVersion; callback attribute stableDataVersion; callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute activeTimestamp; + callback attribute pendingTimestamp; + callback attribute delay; callback attribute securityPolicy; callback attribute channelPage0Mask; callback attribute operationalDatasetComponents; @@ -2694,6 +2681,8 @@ endpoint 2 { callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; + + handle command ResetCounts; } server cluster ThreadBorderRouterManagement { @@ -2717,50 +2706,5 @@ endpoint 2 { handle command SetPendingDatasetRequest; } } -endpoint 3 { - device type ma_secondary_network_interface = 25, version 1; - - - server cluster Descriptor { - callback attribute deviceTypeList; - callback attribute serverList; - callback attribute clientList; - callback attribute partsList; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - callback attribute featureMap; - callback attribute clusterRevision; - } - - server cluster NetworkCommissioning { - ram attribute maxNetworks; - callback attribute networks; - ram attribute scanMaxTimeSeconds; - ram attribute connectMaxTimeSeconds; - ram attribute interfaceEnabled; - ram attribute lastNetworkingStatus; - ram attribute lastNetworkID; - ram attribute lastConnectErrorValue; - ram attribute supportedThreadFeatures; - ram attribute threadVersion; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - - handle command ScanNetworks; - handle command ScanNetworksResponse; - handle command AddOrUpdateThreadNetwork; - handle command RemoveNetwork; - handle command NetworkConfigResponse; - handle command ConnectNetwork; - handle command ConnectNetworkResponse; - handle command ReorderNetwork; - } -} diff --git a/examples/thermostat/nxp/zap/thermostat_matter_br.zap b/examples/thermostat/nxp/zap/thermostat_matter_br.zap index 3586eeb6b2320d..ea67cd00667610 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_br.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_br.zap @@ -976,67 +976,101 @@ ] }, { - "name": "Localization Configuration", - "code": 43, + "name": "General Commissioning", + "code": 48, "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "define": "GENERAL_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, - "attributes": [ + "commands": [ { - "name": "ActiveLocale", + "name": "ArmFailSafe", "code": 0, "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "SupportedLocales", + "name": "ArmFailSafeResponse", "code": 1, "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "BasicCommissioningInfo", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "BasicCommissioningInfo", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "RegulatoryConfig", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -1048,11 +1082,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "LocationCapability", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -1064,11 +1098,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "SupportsConcurrentConnection", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, @@ -1107,39 +1141,113 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Time Format Localization", - "code": 44, + "name": "Network Commissioning", + "code": 49, "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "define": "NETWORK_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], "attributes": [ { - "name": "HourFormat", + "name": "MaxNetworks", "code": 0, "mfgCode": null, "side": "server", - "type": "HourFormatEnum", + "type": "int8u", "included": 1, - "storageOption": "NVM", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "Networks", + "code": 1, "mfgCode": null, "side": "server", "type": "array", @@ -1154,101 +1262,91 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "ScanMaxTimeSeconds", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "ConnectMaxTimeSeconds", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "InterfaceEnabled", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "LastNetworkingStatus", + "code": 5, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "NetworkCommissioningStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "LastNetworkID", + "code": 6, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "octet_string", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "TemperatureUnit", - "code": 0, + "name": "LastConnectErrorValue", + "code": 7, "mfgCode": null, "side": "server", - "type": "TempUnitEnum", + "type": "int32s", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1260,8 +1358,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "SupportedWiFiBands", + "code": 8, "mfgCode": null, "side": "server", "type": "array", @@ -1276,8 +1374,24 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "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", @@ -1333,7 +1447,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x1", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1351,22 +1465,22 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "General Commissioning", - "code": 48, + "name": "Diagnostic Logs", + "code": 50, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", + "define": "DIAGNOSTIC_LOGS_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "ArmFailSafe", + "name": "RetrieveLogsRequest", "code": 0, "mfgCode": null, "source": "client", @@ -1374,85 +1488,37 @@ "isEnabled": 1 }, { - "name": "ArmFailSafeResponse", + "name": "RetrieveLogsResponse", "code": 1, "mfgCode": null, "source": "server", "isIncoming": 0, "isEnabled": 1 - }, - { - "name": "SetRegulatoryConfig", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "CommissioningCompleteResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 } ], "attributes": [ { - "name": "Breadcrumb", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BasicCommissioningInfo", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "BasicCommissioningInfo", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RegulatoryConfig", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1464,11 +1530,11 @@ "reportableChange": 0 }, { - "name": "LocationCapability", - "code": 3, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1480,11 +1546,11 @@ "reportableChange": 0 }, { - "name": "SupportsConcurrentConnection", - "code": 4, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1523,22 +1589,22 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "General Diagnostics", + "code": 51, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "ScanNetworks", + "name": "TestEventTrigger", "code": 0, "mfgCode": null, "source": "client", @@ -1546,202 +1612,154 @@ "isEnabled": 1 }, { - "name": "ScanNetworksResponse", + "name": "TimeSnapshot", "code": 1, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "AddOrUpdateWiFiNetwork", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveNetwork", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "NetworkConfigResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ConnectNetwork", - "code": 6, - "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "ConnectNetworkResponse", - "code": 7, + "name": "TimeSnapshotResponse", + "code": 2, "mfgCode": null, "source": "server", "isIncoming": 0, "isEnabled": 1 - }, - { - "name": "ReorderNetwork", - "code": 8, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 } ], "attributes": [ { - "name": "MaxNetworks", + "name": "NetworkInterfaces", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Networks", + "name": "RebootCount", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ScanMaxTimeSeconds", + "name": "UpTime", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ConnectMaxTimeSeconds", + "name": "TotalOperationalHours", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "InterfaceEnabled", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "BootReasonEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkingStatus", - "code": 5, + "name": "TestEventTriggersEnabled", + "code": 8, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatusEnum", + "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "false", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkID", - "code": 6, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastConnectErrorValue", - "code": 7, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int32s", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedWiFiBands", - "code": 8, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -1756,9 +1774,9 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, + "name": "AttributeList", + "code": 65531, + "mfgCode": null, "side": "server", "type": "array", "included": 1, @@ -1772,11 +1790,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, "storageOption": "External", "singleton": 0, @@ -1788,8 +1806,43 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, "mfgCode": null, "side": "server", "type": "array", @@ -1804,11 +1857,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "CurrentHeapFree", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -1820,65 +1873,37 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "CurrentHeapUsed", + "code": 2, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CurrentHeapHighWatermark", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Diagnostic Logs", - "code": 50, - "mfgCode": null, - "define": "DIAGNOSTIC_LOGS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "RetrieveLogsRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 }, - { - "name": "RetrieveLogsResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ { "name": "GeneratedCommandList", "code": 65528, @@ -1950,10 +1975,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1978,45 +2003,29 @@ ] }, { - "name": "General Diagnostics", - "code": 51, + "name": "Wi-Fi Network Diagnostics", + "code": 54, "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "TestEventTrigger", + "name": "ResetCounts", "code": 0, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, - { - "name": "TimeSnapshot", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TimeSnapshotResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 } ], "attributes": [ { - "name": "NetworkInterfaces", + "name": "BSSID", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, @@ -2028,11 +2037,11 @@ "reportableChange": 0 }, { - "name": "RebootCount", + "name": "SecurityType", "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2044,75 +2053,75 @@ "reportableChange": 0 }, { - "name": "UpTime", + "name": "WiFiVersion", "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TotalOperationalHours", + "name": "ChannelNumber", "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BootReason", + "name": "RSSI", "code": 4, "mfgCode": null, "side": "server", - "type": "BootReasonEnum", + "type": "int8s", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TestEventTriggersEnabled", - "code": 8, + "name": "BeaconLostCount", + "code": 5, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "false", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "BeaconRxCount", + "code": 6, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2124,11 +2133,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "PacketMulticastRxCount", + "code": 7, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2140,11 +2149,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "PacketMulticastTxCount", + "code": 8, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2156,11 +2165,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "PacketUnicastRxCount", + "code": 9, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2172,11 +2181,11 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "PacketUnicastTxCount", + "code": 10, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2188,11 +2197,11 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CurrentMaxRate", + "code": 11, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2202,168 +2211,69 @@ "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ], - "events": [ - { - "name": "BootReason", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, - { - "name": "Wi-Fi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "BSSID", - "code": 0, + "name": "OverrunCount", + "code": 12, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SecurityType", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "SecurityTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiFiVersion", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "WiFiVersionEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChannelNumber", - "code": 3, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RSSI", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int8s", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentMaxRate", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "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, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3373,128 +3283,6 @@ } ] }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Binding", - "code": 0, - "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": "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": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Fixed Label", "code": 64, @@ -4005,12 +3793,18 @@ "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "code": 145, + "code": 25, "profileId": 259, - "label": "MA-thread-border-router", - "name": "MA-thread-border-router" + "label": "MA-secondary-network-interface", + "name": "MA-secondary-network-interface" }, "deviceTypes": [ + { + "code": 25, + "profileId": 259, + "label": "MA-secondary-network-interface", + "name": "MA-secondary-network-interface" + }, { "code": 145, "profileId": 259, @@ -4019,13 +3813,15 @@ } ], "deviceVersions": [ + 1, 1 ], "deviceIdentifiers": [ + 25, 145 ], - "deviceTypeName": "MA-thread-border-router", - "deviceTypeCode": 145, + "deviceTypeName": "MA-secondary-network-interface", + "deviceTypeCode": 25, "deviceTypeProfileId": 259, "clusters": [ { @@ -4041,7 +3837,743 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "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": "ClientList", + "code": 2, + "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": "PartsList", + "code": 3, + "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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "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": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedThreadFeatures", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "ThreadCapabilitiesBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThreadVersion", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "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": "RouteTable", + "code": 8, + "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": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4053,11 +4585,11 @@ "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "ChildRoleCount", + "code": 15, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4069,11 +4601,11 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "RouterRoleCount", + "code": 16, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4085,11 +4617,11 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "LeaderRoleCount", + "code": 17, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4101,11 +4633,11 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AttachAttemptCount", + "code": 18, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4117,11 +4649,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "PartitionIdChangeCount", + "code": 19, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4133,11 +4665,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "BetterPartitionAttachAttemptCount", + "code": 20, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4149,11 +4681,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ParentChangeCount", + "code": 21, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4165,11 +4697,11 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "TxTotalCount", + "code": 22, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4181,11 +4713,11 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "TxUnicastCount", + "code": 23, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4195,23 +4727,13 @@ "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "Channel", - "code": 0, + "name": "TxBroadcastCount", + "code": 24, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4223,11 +4745,11 @@ "reportableChange": 0 }, { - "name": "RoutingRole", - "code": 1, + "name": "TxAckRequestedCount", + "code": 25, "mfgCode": null, "side": "server", - "type": "RoutingRoleEnum", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4239,11 +4761,11 @@ "reportableChange": 0 }, { - "name": "NetworkName", - "code": 2, + "name": "TxAckedCount", + "code": 26, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4255,11 +4777,11 @@ "reportableChange": 0 }, { - "name": "PanId", - "code": 3, + "name": "TxNoAckRequestedCount", + "code": 27, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4271,11 +4793,11 @@ "reportableChange": 0 }, { - "name": "ExtendedPanId", - "code": 4, + "name": "TxDataCount", + "code": 28, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4287,11 +4809,11 @@ "reportableChange": 0 }, { - "name": "MeshLocalPrefix", - "code": 5, + "name": "TxDataPollCount", + "code": 29, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4303,11 +4825,11 @@ "reportableChange": 0 }, { - "name": "NeighborTable", - "code": 7, + "name": "TxBeaconCount", + "code": 30, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4319,11 +4841,11 @@ "reportableChange": 0 }, { - "name": "RouteTable", - "code": 8, + "name": "TxBeaconRequestCount", + "code": 31, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4335,8 +4857,8 @@ "reportableChange": 0 }, { - "name": "PartitionId", - "code": 9, + "name": "TxOtherCount", + "code": 32, "mfgCode": null, "side": "server", "type": "int32u", @@ -4351,11 +4873,11 @@ "reportableChange": 0 }, { - "name": "Weighting", - "code": 10, + "name": "TxRetryCount", + "code": 33, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4367,11 +4889,11 @@ "reportableChange": 0 }, { - "name": "DataVersion", - "code": 11, + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4383,11 +4905,11 @@ "reportableChange": 0 }, { - "name": "StableDataVersion", - "code": 12, + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4399,11 +4921,11 @@ "reportableChange": 0 }, { - "name": "LeaderRouterId", - "code": 13, + "name": "TxErrCcaCount", + "code": 36, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4415,11 +4937,11 @@ "reportableChange": 0 }, { - "name": "SecurityPolicy", - "code": 59, + "name": "TxErrAbortCount", + "code": 37, "mfgCode": null, "side": "server", - "type": "SecurityPolicy", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4431,11 +4953,11 @@ "reportableChange": 0 }, { - "name": "ChannelPage0Mask", - "code": 60, + "name": "TxErrBusyChannelCount", + "code": 38, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4447,11 +4969,11 @@ "reportableChange": 0 }, { - "name": "OperationalDatasetComponents", - "code": 61, + "name": "RxTotalCount", + "code": 39, "mfgCode": null, "side": "server", - "type": "OperationalDatasetComponents", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4463,11 +4985,11 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaultsList", - "code": 62, + "name": "RxUnicastCount", + "code": 40, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4479,11 +5001,11 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "RxBroadcastCount", + "code": 41, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4495,11 +5017,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "RxDataCount", + "code": 42, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4511,11 +5033,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "RxDataPollCount", + "code": 43, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4527,11 +5049,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "RxBeaconCount", + "code": 44, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4543,96 +5065,43 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "RxBeaconRequestCount", + "code": 45, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "RxOtherCount", + "code": 46, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Thread Border Router Management", - "code": 1106, - "mfgCode": null, - "define": "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "GetActiveDatasetRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetPendingDatasetRequest", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "DatasetResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "SetActiveDatasetRequest", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 }, { - "name": "SetPendingDatasetRequest", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "BorderRouterName", - "code": 0, + "name": "RxAddressFilteredCount", + "code": 47, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4644,11 +5113,11 @@ "reportableChange": 0 }, { - "name": "BorderAgentID", - "code": 1, + "name": "RxDestAddrFilteredCount", + "code": 48, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4660,11 +5129,11 @@ "reportableChange": 0 }, { - "name": "ThreadVersion", - "code": 2, + "name": "RxDuplicatedCount", + "code": 49, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4676,11 +5145,11 @@ "reportableChange": 0 }, { - "name": "InterfaceEnabled", - "code": 3, + "name": "RxErrNoFrameCount", + "code": 50, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4692,11 +5161,11 @@ "reportableChange": 0 }, { - "name": "ActiveDatasetTimestamp", - "code": 4, + "name": "RxErrUnknownNeighborCount", + "code": 51, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4708,11 +5177,11 @@ "reportableChange": 0 }, { - "name": "PendingDatasetTimestamp", - "code": 5, + "name": "RxErrInvalidSrcAddrCount", + "code": 52, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4724,11 +5193,11 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "RxErrSecCount", + "code": 53, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4740,11 +5209,11 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "RxErrFcsCount", + "code": 54, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4756,11 +5225,11 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "RxErrOtherCount", + "code": 55, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4772,11 +5241,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ActiveTimestamp", + "code": 56, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4788,11 +5257,11 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "PendingTimestamp", + "code": 57, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4804,66 +5273,27 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "Delay", + "code": 58, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - } - ] - }, - { - "id": 4, - "name": "Anonymous Endpoint Type", - "deviceTypeRef": { - "code": 25, - "profileId": 259, - "label": "MA-secondary-network-interface", - "name": "MA-secondary-network-interface" - }, - "deviceTypes": [ - { - "code": 25, - "profileId": 259, - "label": "MA-secondary-network-interface", - "name": "MA-secondary-network-interface" - } - ], - "deviceVersions": [ - 1 - ], - "deviceIdentifiers": [ - 25 - ], - "deviceTypeName": "MA-secondary-network-interface", - "deviceTypeCode": 25, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "DeviceTypeList", - "code": 0, + "name": "SecurityPolicy", + "code": 59, "mfgCode": null, "side": "server", - "type": "array", + "type": "SecurityPolicy", "included": 1, "storageOption": "External", "singleton": 0, @@ -4875,11 +5305,11 @@ "reportableChange": 0 }, { - "name": "ServerList", - "code": 1, + "name": "ChannelPage0Mask", + "code": 60, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, @@ -4891,11 +5321,11 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "OperationalDatasetComponents", + "code": 61, "mfgCode": null, "side": "server", - "type": "array", + "type": "OperationalDatasetComponents", "included": 1, "storageOption": "External", "singleton": 0, @@ -4907,8 +5337,8 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "ActiveNetworkFaultsList", + "code": 62, "mfgCode": null, "side": "server", "type": "array", @@ -4993,10 +5423,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5009,27 +5439,44 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "ConnectionStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "Thread Border Router Management", + "code": 1106, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { - "name": "ScanNetworks", + "name": "GetActiveDatasetRequest", "code": 0, "mfgCode": null, "source": "client", @@ -5037,56 +5484,32 @@ "isEnabled": 1 }, { - "name": "ScanNetworksResponse", + "name": "GetPendingDatasetRequest", "code": 1, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveNetwork", - "code": 4, - "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "NetworkConfigResponse", - "code": 5, + "name": "DatasetResponse", + "code": 2, "mfgCode": null, "source": "server", "isIncoming": 0, "isEnabled": 1 }, { - "name": "ConnectNetwork", - "code": 6, + "name": "SetActiveDatasetRequest", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "ConnectNetworkResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ReorderNetwork", - "code": 8, + "name": "SetPendingDatasetRequest", + "code": 4, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -5095,27 +5518,27 @@ ], "attributes": [ { - "name": "MaxNetworks", + "name": "BorderRouterName", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "char_string", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Networks", + "name": "BorderAgentID", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, @@ -5127,128 +5550,64 @@ "reportableChange": 0 }, { - "name": "ScanMaxTimeSeconds", + "name": "ThreadVersion", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ConnectMaxTimeSeconds", + "name": "InterfaceEnabled", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "InterfaceEnabled", + "name": "ActiveDatasetTimestamp", "code": 4, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkingStatus", + "name": "PendingDatasetTimestamp", "code": 5, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastNetworkID", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "octet_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastConnectErrorValue", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int32s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedThreadFeatures", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "ThreadCapabilitiesBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ThreadVersion", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5325,10 +5684,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5379,14 +5738,6 @@ "endpointId": 2, "networkId": 0, "parentEndpointIdentifier": null - }, - { - "endpointTypeName": "Anonymous Endpoint Type", - "endpointTypeIndex": 3, - "profileId": 259, - "endpointId": 3, - "networkId": 0, - "parentEndpointIdentifier": null } ] } \ No newline at end of file diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index d53a2dda721d28..9794e3672e0be9 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1269,6 +1269,43 @@ cluster GeneralDiagnostics = 51 { command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ cluster ThreadNetworkDiagnostics = 53 { revision 2; @@ -2233,7 +2270,22 @@ endpoint 0 { handle command TimeSnapshotResponse; } + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster ThreadNetworkDiagnostics { + emits event ConnectionStatus; + emits event NetworkFaultChange; callback attribute channel; callback attribute routingRole; callback attribute networkName; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 36e6c051158e73..21241a6625c7cb 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -1848,6 +1848,176 @@ } ] }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "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": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "Thread Network Diagnostics", "code": 53, @@ -2954,6 +3124,22 @@ "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "ConnectionStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index a185b298747570..4e3cd330043f6c 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1269,6 +1269,43 @@ cluster GeneralDiagnostics = 51 { command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + /** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster WiFiNetworkDiagnostics = 54 { revision 1; // NOTE: Default/not specifically set @@ -2143,19 +2180,44 @@ endpoint 0 { handle command TimeSnapshotResponse; } + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; callback attribute bssid; callback attribute securityType; callback attribute wiFiVersion; callback attribute channelNumber; callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; callback attribute currentMaxRate; + callback attribute overrunCount; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; + + handle command ResetCounts; } server cluster AdministratorCommissioning { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index 1884f45a5f8b73..9a50852ab54462 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -1832,6 +1832,176 @@ } ] }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "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": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "Wi-Fi Network Diagnostics", "code": 54, @@ -1839,6 +2009,16 @@ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], "attributes": [ { "name": "BSSID", @@ -1920,6 +2100,102 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "CurrentMaxRate", "code": 11, @@ -1936,6 +2212,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -2032,6 +2324,29 @@ "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.cpp b/src/platform/nxp/common/ConnectivityManagerImpl.cpp index 3473fc7515e640..938dc07f74fa5e 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/common/ConnectivityManagerImpl.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -74,6 +75,10 @@ using namespace ::chip::System; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::DeviceLayer::DeviceEventType; +// Table 9-50 "Status codes" of IEEE 802.11-2020: Unspecified failure +// Temporary default status code before SDK API to map wlan_event_reason to IEEE Status codes +#define WLAN_REFUSED_REASON_UNSPECIFIED 1 + namespace chip { namespace DeviceLayer { @@ -234,6 +239,10 @@ bool ConnectivityManagerImpl::_IsWiFiStationApplicationControlled() void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) { + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + uint8_t associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kUnknown); + #if CHIP_DETAIL_LOGGING enum wlan_connection_state state; int result; @@ -270,6 +279,12 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) case WLAN_REASON_CONNECT_FAILED: ChipLogError(DeviceLayer, "WLAN (re)connect failed"); sInstance._SetWiFiStationState(kWiFiStationState_NotConnected); + associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAssociationFailed); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } UpdateInternetConnectivityState(); break; @@ -277,6 +292,12 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) ChipLogError(DeviceLayer, "WLAN network not found"); NetworkCommissioning::NXPWiFiDriver::GetInstance().OnConnectWiFiNetwork(NetworkCommissioning::Status::kNetworkNotFound, CharSpan(), wlanEvent); + associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kSsidNotFound); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } break; case WLAN_REASON_NETWORK_AUTH_FAILED: @@ -284,6 +305,12 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) NetworkCommissioning::NXPWiFiDriver::GetInstance().OnConnectWiFiNetwork(NetworkCommissioning::Status::kAuthFailure, CharSpan(), wlanEvent); ChipLogError(DeviceLayer, "Authentication to WLAN network failed end"); + associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAuthenticationFailed); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } break; case WLAN_REASON_LINK_LOST: @@ -292,6 +319,10 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) { sInstance._SetWiFiStationState(kWiFiStationState_NotConnected); sInstance.OnStationDisconnected(); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } } break; @@ -299,6 +330,10 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent) ChipLogProgress(DeviceLayer, "Disconnected from WLAN network"); sInstance._SetWiFiStationState(kWiFiStationState_NotConnected); sInstance.OnStationDisconnected(); + if (delegate) + { + delegate->OnAssociationFailureDetected(associationFailureCause, WLAN_REFUSED_REASON_UNSPECIFIED); + } break; case WLAN_REASON_INITIALIZED: @@ -330,6 +365,13 @@ void ConnectivityManagerImpl::OnStationConnected() /* Update the connectivity state in case the connected event has been received after getting an IP addr */ UpdateInternetConnectivityState(); + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + + if (delegate) + { + delegate->OnConnectionStatusChanged( + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kConnected)); + } } void ConnectivityManagerImpl::OnStationDisconnected() @@ -340,6 +382,14 @@ void ConnectivityManagerImpl::OnStationDisconnected() event.WiFiConnectivityChange.Result = kConnectivity_Lost; (void) PlatformMgr().PostEvent(&event); + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + + if (delegate) + { + delegate->OnConnectionStatusChanged( + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kNotConnected)); + } + /* Update the connectivity state in case the connected event has been received after getting an IP addr */ UpdateInternetConnectivityState(); } @@ -613,7 +663,11 @@ CHIP_ERROR ConnectivityManagerImpl::ProvisionWiFiNetwork(const char * ssid, uint // Need to enable the WIFI interface here when Thread is enabled as a secondary network interface. We don't want to enable // WIFI from the init phase anymore and we will only do it in case the commissioner is provisioning the device with // the WIFI credentials. - StartWiFiManagement(); + if (mWifiManagerInit == false) + { + StartWiFiManagement(); + mWifiManagerInit = true; + } memset(pNetworkData, 0, sizeof(struct wlan_network)); diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.h b/src/platform/nxp/common/ConnectivityManagerImpl.h index a187d0baf39e60..159dff2c72bf10 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.h +++ b/src/platform/nxp/common/ConnectivityManagerImpl.h @@ -138,6 +138,8 @@ class ConnectivityManagerImpl final : public ConnectivityManager, bool mBorderRouterInit = false; #if CHIP_DEVICE_CONFIG_ENABLE_WPA + bool mWifiManagerInit = false; + enum WiFiEventGroup{ kWiFiEventGroup_WiFiStationModeBit = (1 << 0), }; diff --git a/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp index 93a73d2767b8d3..5158b6ac21f26d 100644 --- a/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp @@ -36,10 +36,14 @@ #if CHIP_DEVICE_CONFIG_ENABLE_WPA extern "C" { +#include "wlan.h" #include } #endif +// Not implement into the SDK +// extern "C" void xPortResetHeapMinimumEverFreeHeapSize(void); + namespace chip { namespace DeviceLayer { @@ -49,6 +53,103 @@ DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance() return sInstance; } +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeapFree) +{ + size_t freeHeapSize; + + freeHeapSize = xPortGetFreeHeapSize(); + currentHeapFree = static_cast(freeHeapSize); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeapUsed) +{ + size_t freeHeapSize; + size_t usedHeapSize; + + freeHeapSize = xPortGetFreeHeapSize(); + usedHeapSize = configTOTAL_HEAP_SIZE - freeHeapSize; + + currentHeapUsed = static_cast(usedHeapSize); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) +{ + size_t highWatermarkHeapSize; + + highWatermarkHeapSize = configTOTAL_HEAP_SIZE - xPortGetMinimumEverFreeHeapSize(); + currentHeapHighWatermark = static_cast(highWatermarkHeapSize); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() +{ + // If implemented, the server SHALL set the value of the CurrentHeapHighWatermark attribute to the + // value of the CurrentHeapUsed. + + // Not implement into the SDK + // xPortResetHeapMinimumEverFreeHeapSize(); + + // return CHIP_NO_ERROR; + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadMetricsOut) +{ + /* Obtain all available task information */ + TaskStatus_t * taskStatusArray; + ThreadMetrics * head = nullptr; + unsigned long arraySize, x, dummy; + + arraySize = uxTaskGetNumberOfTasks(); + + taskStatusArray = (TaskStatus_t *) pvPortMalloc(arraySize * sizeof(TaskStatus_t)); + + if (taskStatusArray != NULL) + { + /* Generate raw status information about each task. */ + arraySize = uxTaskGetSystemState(taskStatusArray, arraySize, &dummy); + /* For each populated position in the taskStatusArray array, + format the raw data as human readable ASCII data. */ + + for (x = 0; x < arraySize; x++) + { + ThreadMetrics * thread = (ThreadMetrics *) pvPortMalloc(sizeof(ThreadMetrics)); + + Platform::CopyString(thread->NameBuf, taskStatusArray[x].pcTaskName); + thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); + thread->id = taskStatusArray[x].xTaskNumber; + + thread->stackFreeMinimum.Emplace(taskStatusArray[x].usStackHighWaterMark); + + /* Unsupported metrics */ + thread->stackFreeCurrent.ClearValue(); + thread->stackSize.ClearValue(); + + thread->Next = head; + head = thread; + } + + *threadMetricsOut = head; + /* The array is no longer needed, free the memory it consumes. */ + vPortFree(taskStatusArray); + } + + return CHIP_NO_ERROR; +} + +void DiagnosticDataProviderImpl::ReleaseThreadMetrics(ThreadMetrics * threadMetrics) +{ + while (threadMetrics) + { + ThreadMetrics * del = threadMetrics; + threadMetrics = threadMetrics->Next; + vPortFree(del); + } +} + CHIP_ERROR DiagnosticDataProviderImpl::GetRebootCount(uint16_t & rebootCount) { uint32_t count = 0; @@ -250,15 +351,14 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi) return CHIP_NO_ERROR; } -#if DGWIFI_RESET_COUNTS_SUPPORTED CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconLostCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - beaconLostCount = stats.bcn_miss_cnt; + beaconLostCount = stats.bcn_miss_cnt - mBeaconLostCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ @@ -268,11 +368,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconL CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - beaconRxCount = stats.bcn_rcv_cnt; + beaconRxCount = stats.bcn_rcv_cnt - mBeaconRxCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ @@ -282,11 +382,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxC CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - packetMulticastRxCount = stats.mcast_rx_frame; + packetMulticastRxCount = stats.mcast_rx_frame - mPacketMulticastRxCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ @@ -296,11 +396,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - packetMulticastTxCount = stats.mcast_tx_frame; + packetMulticastTxCount = stats.mcast_tx_frame - mPacketMulticastTxCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ @@ -310,18 +410,69 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) { #ifdef CONFIG_WIFI_GET_LOG - wifi_pkt_stats_t stats; - int ret = wifi_get_log(&stats, MLAN_BSS_TYPE_STA); + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); + if (ret == WM_SUCCESS) + { + packetUnicastTxCount = stats.tx_frame - mPacketUnicastTxCount; + return CHIP_NO_ERROR; + } +#endif /* CONFIG_WIFI_GET_LOG */ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +#if SDK_2_16_100 +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) +{ +#ifdef CONFIG_WIFI_GET_LOG + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); if (ret == WM_SUCCESS) { - packetUnicastTxCount = stats.tx_frame; + packetUnicastRxCount = stats.rx_unicast_cnt - mPacketUnicastRxCount; return CHIP_NO_ERROR; } #endif /* CONFIG_WIFI_GET_LOG */ return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } -#endif /* DGWIFI_RESET_COUNTS_SUPPORTED */ +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCount) +{ +#ifdef CONFIG_WIFI_GET_LOG + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); + if (ret == WM_SUCCESS) + { + overrunCount = (stats.tx_overrun_cnt + stats.rx_overrun_cnt) - mOverrunCount; + return CHIP_NO_ERROR; + } +#endif /* CONFIG_WIFI_GET_LOG */ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +#endif + +CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts(void) +{ +#ifdef CONFIG_WIFI_GET_LOG + wlan_pkt_stats_t stats; + int ret = wlan_get_log(&stats); + if (ret == WM_SUCCESS) + { + mPacketUnicastTxCount = stats.tx_frame; + mPacketMulticastTxCount = stats.mcast_tx_frame; + mPacketMulticastRxCount = stats.mcast_rx_frame; + mBeaconRxCount = stats.bcn_rcv_cnt; + mBeaconLostCount = stats.bcn_miss_cnt; +#if SDK_2_16_100 + mPacketUnicastRxCount = stats.rx_unicast_cnt; + mOverrunCount = stats.tx_overrun_cnt + stats.rx_overrun_cnt; +#endif + return CHIP_NO_ERROR; + } +#endif /* CONFIG_WIFI_GET_LOG */ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} #endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ diff --git a/src/platform/nxp/common/DiagnosticDataProviderImpl.h b/src/platform/nxp/common/DiagnosticDataProviderImpl.h index 1f6af84e267f34..5b9fc4c9ae894b 100644 --- a/src/platform/nxp/common/DiagnosticDataProviderImpl.h +++ b/src/platform/nxp/common/DiagnosticDataProviderImpl.h @@ -27,16 +27,6 @@ #include -/** - * DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() is - * currently not supported due to missing reset feature from SDK's wifi driver. - * For this reason, the PKTCNT (beaconRxCount, packetMulticastRxCount, - * packetMulticastTxCount, packetUnicastRxCount, packetUnicastTxCount) - * and ERRCNT (beaconLostCount, overrunCount) features of DGWIFI cluster - * are currently not supported. - */ -#define DGWIFI_RESET_COUNTS_SUPPORTED 0 - namespace chip { namespace DeviceLayer { @@ -49,7 +39,12 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider static DiagnosticDataProviderImpl & GetDefaultInstance(); // ===== Methods that implement the PlatformManager abstract interface. - + CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override; + CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override; + CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; + CHIP_ERROR ResetWatermarks() override; + CHIP_ERROR GetThreadMetrics(ThreadMetrics ** threadMetricsOut) override; + void ReleaseThreadMetrics(ThreadMetrics * threadMetrics) override; CHIP_ERROR GetRebootCount(uint16_t & rebootCount) override; CHIP_ERROR GetUpTime(uint64_t & upTime) override; CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; @@ -64,18 +59,26 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider CHIP_ERROR GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; -#if DGWIFI_RESET_COUNTS_SUPPORTED CHIP_ERROR GetWiFiBeaconLostCount(uint32_t & beaconLostCount) override; CHIP_ERROR GetWiFiBeaconRxCount(uint32_t & beaconRxCount) override; CHIP_ERROR GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) override; CHIP_ERROR GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) override; CHIP_ERROR GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) override; - /** - * TODO : This should reset BeaconLostCount, BeaconRxCount, PacketMulticastRxCount, - * PacketMulticastTxCount, PacketUnicastRxCount, PacketUnicastTxCount - */ - // CHIP_ERROR ResetWiFiNetworkDiagnosticsCounts() override; -#endif /* DGWIFI_RESET_COUNTS_SUPPORTED */ + CHIP_ERROR ResetWiFiNetworkDiagnosticsCounts() override; +#if SDK_2_16_100 + CHIP_ERROR GetWiFiOverrunCount(uint64_t & overrunCount) override; + CHIP_ERROR GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastTxCount) override; +#endif + + uint32_t mBeaconRxCount = 0; + uint32_t mBeaconLostCount = 0; + uint32_t mPacketMulticastRxCount = 0; + uint32_t mPacketMulticastTxCount = 0; + uint32_t mPacketUnicastTxCount = 0; +#if SDK_2_16_100 + uint32_t mPacketUnicastRxCount = 0; + uint64_t mOverrunCount = 0; +#endif #endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ }; diff --git a/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp b/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp index e1348f946c1865..f1f35937d8b24e 100644 --- a/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp @@ -142,38 +142,10 @@ Status NXPWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, Mu Status NXPWiFiDriver::RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) { - int err_code = 0; - outDebugText.reduce_size(0); outNetworkIndex = 0; - VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); - - err_code = wlan_remove_network((char *) networkId.data()); - - switch (err_code) - { - case -WM_E_INVAL: - ChipLogError(DeviceLayer, "Error: Network not found"); - break; - - case WM_SUCCESS: - /* Use empty ssid for representing invalid network */ - mStagingNetwork.ssidLen = 0; - memset(mStagingNetwork.ssid, 0, DeviceLayer::Internal::kMaxWiFiSSIDLength); - memset(mStagingNetwork.credentials, 0, DeviceLayer::Internal::kMaxWiFiKeyLength); - /* Save to persistent memory */ - CommitConfiguration(); - ChipLogProgress(DeviceLayer, "Successfully removed network"); - break; - - case WLAN_ERROR_STATE: - ChipLogError(DeviceLayer, "Error: Can't remove network in this state"); - break; - - default: - ChipLogError(DeviceLayer, "Error: Unable to remove network"); - break; - } + // Use empty ssid for representing invalid network + mStagingNetwork.ssidLen = 0; return Status::kSuccess; }