Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Return InvalidCommand instead of UnsupportedCluster if the command is not handled in CHI #37166

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

yufengwangca
Copy link
Contributor

Currently, after switching to CHI, any unhandled command is returning Protocols::InteractionModel::Status::UnsupportedCluster. Previously, when Ember handled these commands, we would return Protocols::InteractionModel::Status::InvalidCommand. We should preserve that behavior and continue returning InvalidCommand for runhandled commands in CHI.

Testing

Verified by manually disable command Commands::ResetCounts in WiFiDiagnosticsServer

1737591036.077317][170120:170120] CHIP:EM: Rxd Ack; Removing MessageCounter:189047319 from Retrans Table on exchange 6982r
[1737591036.077854][170120:170120] CHIP:EM: >>> [E:6983r S:15406 M:134670837] (S) Msg RX from 1:000000000001B669 [C8E0] to 0000000012344321 --- Type 0001:08 (IM:InvokeCommandRequest) (B:59)
[1737591036.077865][170120:170120] CHIP:EM: Handling via exchange: 6983r, Delegate: 0x555556e35508
[1737591036.077906][170120:170120] CHIP:DMG: InvokeRequestMessage =
[1737591036.077911][170120:170120] CHIP:DMG: {
[1737591036.077915][170120:170120] CHIP:DMG: 	suppressResponse = false, 
[1737591036.077918][170120:170120] CHIP:DMG: 	timedRequest = false, 
[1737591036.077921][170120:170120] CHIP:DMG: 	InvokeRequests =
[1737591036.077936][170120:170120] CHIP:DMG: 	[
[1737591036.077940][170120:170120] CHIP:DMG: 		CommandDataIB =
[1737591036.077946][170120:170120] CHIP:DMG: 		{
[1737591036.077949][170120:170120] CHIP:DMG: 			CommandPathIB =
[1737591036.077955][170120:170120] CHIP:DMG: 			{
[1737591036.077960][170120:170120] CHIP:DMG: 				EndpointId = 0x0,
[1737591036.077965][170120:170120] CHIP:DMG: 				ClusterId = 0x36,
[1737591036.077970][170120:170120] CHIP:DMG: 				CommandId = 0x0,
[1737591036.077973][170120:170120] CHIP:DMG: 			},
[1737591036.077981][170120:170120] CHIP:DMG: 			
[1737591036.077985][170120:170120] CHIP:DMG: 			CommandFields = 
[1737591036.077990][170120:170120] CHIP:DMG: 			{
[1737591036.077995][170120:170120] CHIP:DMG: 			},
[1737591036.077998][170120:170120] CHIP:DMG: 		},
[1737591036.078009][170120:170120] CHIP:DMG: 		
[1737591036.078013][170120:170120] CHIP:DMG: 	],
[1737591036.078027][170120:170120] CHIP:DMG: 	
[1737591036.078031][170120:170120] CHIP:DMG: 	InteractionModelRevision = 11
[1737591036.078034][170120:170120] CHIP:DMG: },
[1737591036.078133][170120:170120] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t=0x00010001 c=0x0000_0036 e=0 p=o r=i
[1737591036.078141][170120:170120] CHIP:DMG: AccessControl: allowed
[1737591036.078150][170120:170120] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_0036 Command=0x0000_0000
[1737591036.078168][170120:170120] CHIP:DMG: Endpoint=0 Cluster=0x0000_0036 Command=0x0000_0000 status 0x85 (INVALID_COMMAND) (no additional context)
[1737591036.078183][170120:170120] CHIP:DMG: Command handler moving to [NewRespons]
[1737591036.078187][170120:170120] CHIP:DMG: Command handler moving to [ Preparing]
[1737591036.078198][170120:170120] CHIP:DMG: Command handler moving to [AddingComm]
[1737591036.078206][170120:170120] CHIP:DMG: Command handler moving to [AddedComma]

Copy link

Review changes with  SemanticDiff

@yufengwangca yufengwangca force-pushed the pr/cluster/dggen branch 2 times, most recently from c7022c9 to 5c36f8c Compare January 23, 2025 16:07
Copy link

github-actions bot commented Jan 31, 2025

PR #37166: Size comparison from 435583e to 289c07d

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 435583e 289c07d change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093546 1093554 8 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650158 650158 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828066 828066 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056626 1056626 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888060 888060 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971046 971046 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838000 838024 24 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823420 823428 8 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770644 770668 24 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754888 754912 24 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538445 538453 8 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572309 572317 8 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679409 679433 24 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699261 699277 16 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699261 699277 16 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656189 656213 24 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615793 615809 16 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635421 635437 16 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635421 635437 16 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635273 635281 8 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654981 654989 8 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654981 654989 8 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611709 611717 8 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631569 631577 8 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631569 631577 8 0.0
RAM 71252 71252 0 0.0
esp32 all-clusters-app c3devkit DRAM 97296 97296 0 0.0
FLASH 1577036 1577050 14 0.0
IRAM 83820 83820 0 0.0
m5stack DRAM 116092 116092 0 0.0
FLASH 1544978 1544998 20 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2708941 2708967 26 0.0
RAM 132816 132816 0 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5974964 5974988 24 0.0
RAM 531632 531632 0 0.0
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5323650 5323674 24 0.0
RAM 242744 242744 0 0.0
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4681838 4681864 26 0.0
RAM 221480 221480 0 0.0
chip-tool debug unknown 6120 6120 0 0.0
FLASH 13096150 13096176 26 0.0
RAM 596770 596770 0 0.0
chip-tool-ipv6only arm64 unknown 21848 21848 0 0.0
FLASH 11162144 11162192 48 0.0
RAM 648496 648496 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11388197 11388223 26 0.0
RAM 596554 596554 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4506436 4506460 24 0.0
RAM 208664 208664 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5612821 5612837 16 0.0
RAM 483536 483536 0 0.0
lighting-app debug+rpc+ui unknown 6144 6144 0 0.0
FLASH 5624593 5624625 32 0.0
RAM 231760 231760 0 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4730952 4730976 24 0.0
RAM 207728 207728 0 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4359496 4359520 24 0.0
RAM 201368 201368 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4496968 4496994 26 0.0
RAM 205952 205952 0 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3004861 3004893 32 0.0
RAM 160504 160504 0 0.0
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4098736 4098784 48 0.0
RAM 246144 246144 0 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5952405 5952437 32 0.0
RAM 606936 606936 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11269757 11269789 32 0.0
RAM 710896 710896 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 906972 906988 16 0.0
RAM 142395 142395 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 901532 901472 -60 -0.0
RAM 124739 124739 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845696 845708 12 0.0
RAM 141323 141323 0 0.0
nxp contact k32w0+release FLASH 584288 584304 16 0.0
RAM 70860 70860 0 0.0
mcxw71+release FLASH 599632 599656 24 0.0
RAM 63080 63080 0 0.0
light k32w0+release FLASH 610732 610732 0 0.0
RAM 70252 70252 0 0.0
k32w1+release FLASH 685192 685200 8 0.0
RAM 48664 48664 0 0.0
lock mcxw71+release FLASH 748664 748672 8 0.0
RAM 67476 67476 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646372 1646372 0 0.0
RAM 211560 211560 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553148 1553164 16 0.0
RAM 208376 208376 0 0.0
light cy8ckit_062s2_43012 FLASH 1468828 1468828 0 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466860 1466876 16 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 661984 662016 32 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619788 619796 8 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482600 482616 16 0.0
RAM 144672 144672 0 0.0
telink bridge-app tl7218x FLASH 664748 664762 14 0.0
RAM 90812 90812 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621506 621520 14 0.0
RAM 31484 31484 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 770258 770272 14 0.0
RAM 43552 43552 0 0.0
tl7218x FLASH 778790 778804 14 0.0
RAM 98688 98688 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 680124 680138 14 0.0
RAM 52176 52176 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708678 708692 14 0.0
RAM 73384 73384 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625592 625606 14 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812974 812988 14 0.0
RAM 99560 99560 0 0.0
tizen all-clusters-app arm unknown 5116 5116 0 0.0
FLASH 1751892 1751916 24 0.0
RAM 93524 93524 0 0.0
chip-tool-ubsan arm unknown 11408 11408 0 0.0
FLASH 18696094 18696118 24 0.0
RAM 8183744 8183744 0 0.0

Copy link

PR #37166: Size comparison from 435583e to 25cb68d

Full report (3 builds for cc32xx, stm32)
platform target config section 435583e 25cb68d change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538445 538453 8 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572309 572317 8 0.0
RAM 205344 205344 0 0.0
stm32 light STM32WB5MM-DK FLASH 482600 482616 16 0.0
RAM 144672 144672 0 0.0

Copy link

github-actions bot commented Jan 31, 2025

PR #37166: Size comparison from c56eb2b to 7ed7fff

Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section c56eb2b 7ed7fff change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093546 1093554 8 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650158 650158 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828066 828066 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056626 1056626 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888060 888060 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971046 971046 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838032 838072 40 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823436 823476 40 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770676 770716 40 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754920 754960 40 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538461 538501 40 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572325 572365 40 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679433 679481 48 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699285 699325 40 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699285 699325 40 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656213 656261 48 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615817 615857 40 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635445 635485 40 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635445 635485 40 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635289 635329 40 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654997 655037 40 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654997 655037 40 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611725 611765 40 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631585 631625 40 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631585 631625 40 0.0
RAM 71252 71252 0 0.0
efr32 lock-app BRD4187C FLASH 936232 936264 32 0.0
RAM 159872 159872 0 0.0
BRD4338a FLASH 729884 729924 40 0.0
RAM 234700 234700 0 0.0
window-app BRD4187C FLASH 1029256 1029280 24 0.0
RAM 127976 127976 0 0.0
esp32 all-clusters-app c3devkit DRAM 97296 97296 0 0.0
FLASH 1577062 1577104 42 0.0
IRAM 83820 83820 0 0.0
m5stack DRAM 116092 116092 0 0.0
FLASH 1544978 1545010 32 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2708945 2709009 64 0.0
RAM 132816 132816 0 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5974968 5975030 62 0.0
RAM 531632 531632 0 0.0
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5323654 5323716 62 0.0
RAM 242744 242744 0 0.0
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4681842 4681906 64 0.0
RAM 221480 221480 0 0.0
chip-tool debug unknown 6120 6120 0 0.0
FLASH 13096156 13096220 64 0.0
RAM 596770 596770 0 0.0
chip-tool-ipv6only arm64 unknown 21848 21848 0 0.0
FLASH 11162176 11162288 112 0.0
RAM 648496 648496 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11388203 11388267 64 0.0
RAM 596554 596554 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4506440 4506502 62 0.0
RAM 208664 208664 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5612821 5612885 64 0.0
RAM 483536 483536 0 0.0
lighting-app debug+rpc+ui unknown 6144 6144 0 0.0
FLASH 5624593 5624657 64 0.0
RAM 231760 231760 0 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4730956 4731018 62 0.0
RAM 207728 207728 0 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4359500 4359562 62 0.0
RAM 201368 201368 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4496972 4497036 64 0.0
RAM 205952 205952 0 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3004877 3004925 48 0.0
RAM 160504 160504 0 0.0
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4098768 4098880 112 0.0
RAM 246144 246144 0 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5952421 5952485 64 0.0
RAM 606936 606936 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11269757 11269821 64 0.0
RAM 710896 710896 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 906992 907032 40 0.0
RAM 142395 142395 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 901532 901496 -36 -0.0
RAM 124739 124739 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 845716 845752 36 0.0
RAM 141323 141323 0 0.0
nxp contact k32w0+release FLASH 584304 584352 48 0.0
RAM 70860 70860 0 0.0
mcxw71+release FLASH 599664 599704 40 0.0
RAM 63080 63080 0 0.0
light k32w0+release FLASH 610748 610780 32 0.0
RAM 70252 70252 0 0.0
k32w1+release FLASH 685208 685248 40 0.0
RAM 48664 48664 0 0.0
lock mcxw71+release FLASH 748680 748720 40 0.0
RAM 67476 67476 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646356 1646388 32 0.0
RAM 211560 211560 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553148 1553180 32 0.0
RAM 208376 208376 0 0.0
light cy8ckit_062s2_43012 FLASH 1468828 1468860 32 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466860 1466892 32 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 662016 662064 48 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619804 619844 40 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482624 482664 40 0.0
RAM 144672 144672 0 0.0
telink bridge-app tl7218x FLASH 664774 664816 42 0.0
RAM 90812 90812 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621532 621574 42 0.0
RAM 31484 31484 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 770284 770326 42 0.0
RAM 43552 43552 0 0.0
tl7218x FLASH 778816 778858 42 0.0
RAM 98688 98688 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 680150 680192 42 0.0
RAM 52176 52176 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708704 708746 42 0.0
RAM 73384 73384 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625618 625660 42 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813000 813042 42 0.0
RAM 99560 99560 0 0.0
tizen all-clusters-app arm unknown 5116 5116 0 0.0
FLASH 1751916 1751984 68 0.0
RAM 93524 93524 0 0.0
chip-tool-ubsan arm unknown 11408 11408 0 0.0
FLASH 18696214 18696462 248 0.0
RAM 8183840 8183944 104 0.0

@@ -75,7 +75,7 @@ Protocols::InteractionModel::Status DispatchServerCommand(CommandHandler * apCom

} // namespace Clusters

void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj)
void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj, bool aClusterIsValid)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj, bool aClusterIsValid)
void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj, bool aClusterExists)

and similar throughout.

else
{
ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mClusterId));
errorStatus = Protocols::InteractionModel::Status::UnsupportedCluster;
Copy link
Contributor

@bzbarsky-apple bzbarsky-apple Feb 1, 2025

Choose a reason for hiding this comment

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

How do you know it's not UnsupportedEndpoint?

Again, test coverage would flush out these edge cases...

But I have to admit, now that I think this through more, that none of this is making sense to me. I would have assumed that in general we only reach this point after we have already validated that the cluster and whatnot exist (since we have to do ACL checks before we get here), no? So shouldn't the return status here just always be UnsupportedCommand, period?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants