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

Fix ThreadNetworkDiagnostics read network-name response #14426

Merged
merged 3 commits into from
Jan 28, 2022

Conversation

jmartinez-silabs
Copy link
Member

Problem

Thread diag's network-name attribute is not encoded in the expected format on read
TOO: Default Failure Response: ../../examples/chip-tool/third_party/connectedhomeip/src/app/data-model/Decode.h:69: CHIP Error 0x0000002B: Unexpected TLV element
Fixes #13822

Change overview

Correct Thread NetworkName attribute type to char_string.

Testing

Send command with chip-tool to efr32 light app. The command response is now valid

[1643300792.505591][4414:4419] CHIP:DMG: ReportDataMessage =
[1643300792.505657][4414:4419] CHIP:DMG: {
[1643300792.505705][4414:4419] CHIP:DMG: 	AttributeReportIBs =
[1643300792.505781][4414:4419] CHIP:DMG: 	[
[1643300792.505843][4414:4419] CHIP:DMG: 		AttributeReportIB =
[1643300792.505918][4414:4419] CHIP:DMG: 		{
[1643300792.505983][4414:4419] CHIP:DMG: 			AttributeDataIB =
[1643300792.506069][4414:4419] CHIP:DMG: 			{
[1643300792.506150][4414:4419] CHIP:DMG: 				DataVersion = 0x0,
[1643300792.506227][4414:4419] CHIP:DMG: 				AttributePathIB =
[1643300792.506321][4414:4419] CHIP:DMG: 				{
[1643300792.506405][4414:4419] CHIP:DMG: 					Endpoint = 0x0,
[1643300792.506502][4414:4419] CHIP:DMG: 					Cluster = 0x35,
[1643300792.506583][4414:4419] CHIP:DMG: 					Attribute = 0x0000_0002,
[1643300792.506672][4414:4419] CHIP:DMG: 				}
[1643300792.506915][4414:4419] CHIP:DMG:
[1643300792.506999][4414:4419] CHIP:DMG: 					Data = "OpenThread",
[1643300792.507081][4414:4419] CHIP:DMG: 			},
[1643300792.507155][4414:4419] CHIP:DMG:
[1643300792.507216][4414:4419] CHIP:DMG: 		},
[1643300792.507282][4414:4419] CHIP:DMG:
[1643300792.507334][4414:4419] CHIP:DMG: 	],
[1643300792.507396][4414:4419] CHIP:DMG:
[1643300792.507446][4414:4419] CHIP:DMG: 	SuppressResponse = true,
[1643300792.507493][4414:4419] CHIP:DMG: }
[1643300792.507860][4414:4419] CHIP:TOO: ThreadNetworkDiagnostics.NetworkName response: OpenThread

@github-actions
Copy link

github-actions bot commented Jan 27, 2022

PR #14426: Size comparison from 0cbff2c to f7dcaf9

Full report (33 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 0cbff2c f7dcaf9 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 580938 580938 0 0.0
.app_xip_area 485736 485736 0 0.0
.bss 77948 77948 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock-app CYW30739 (read/write) 538942 538942 0 0.0
.app_xip_area 445284 445284 0 0.0
.bss 76444 76444 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 844524 844524 0 0.0
(read/write) 127492 127492 0 0.0
.bss 125592 125592 0 0.0
.data 1900 1900 0 0.0
.text 844516 844516 0 0.0
BRD4161A+rpc (read only) 831896 831896 0 0.0
(read/write) 144152 144152 0 0.0
.bss 142152 142152 0 0.0
.data 2000 2000 0 0.0
.text 831888 831888 0 0.0
window-app BRD4161A (read only) 817140 817140 0 0.0
(read/write) 126148 126148 0 0.0
.bss 124292 124292 0 0.0
.data 1856 1856 0 0.0
.text 817132 817132 0 0.0
esp32 all-clusters-app c3devkit (read only) 933704 933704 0 0.0
(read/write) 1399050 1399050 0 0.0
.dram0.bss 70984 70984 0 0.0
.dram0.data 14236 14236 0 0.0
.flash.rodata 194928 194928 0 0.0
.flash.text 933704 933704 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 981311 981311 0 0.0
(read/write) 463412 463412 0 0.0
.dram0.bss 75728 75728 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 221532 221532 0 0.0
.flash.text 975927 975927 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 665732 665732 0 0.0
.bss 77724 77724 0 0.0
.data 1868 1868 0 0.0
.text 580340 580340 0 0.0
lock k32w061+release (read/write) 666684 666684 0 0.0
.bss 77988 77988 0 0.0
.data 1892 1892 0 0.0
.text 581004 581004 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6747380 6747380 0 0.0
(read/write) 278977 278977 0 0.0
.bss 55537 55537 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 175824 175824 0 0.0
.dynamic 560 560 0 0.0
.got 42736 42736 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 387692 387692 0 0.0
.text 5788612 5788612 0 0.0
thermostat-no-ble arm64 (read only) 2084532 2084532 0 0.0
(read/write) 152097 152097 0 0.0
.bss 69761 69761 0 0.0
.data 960 960 0 0.0
.data.rel.ro 74256 74256 0 0.0
.dynamic 560 560 0 0.0
.got 4144 4144 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 131940 131940 0 0.0
.text 1735200 1735200 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2383680 2383680 0 0.0
.bss 189692 189692 0 0.0
.data 5288 5288 0 0.0
.text 1346280 1346280 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2341488 2341488 0 0.0
.bss 181200 181200 0 0.0
.data 5584 5584 0 0.0
.text 1304088 1304088 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2308240 2308240 0 0.0
.bss 181096 181096 0 0.0
.data 5568 5568 0 0.0
.text 1270840 1270840 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2294500 2294500 0 0.0
.bss 177828 177828 0 0.0
.data 5384 5384 0 0.0
.text 1257072 1257072 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 984199 984199 0 0.0
bss 120956 120956 0 0.0
rodata 116492 116492 0 0.0
text 668964 668964 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 968063 968063 0 0.0
bss 118000 118000 0 0.0
rodata 108028 108028 0 0.0
text 663636 663636 0 0.0
nrf52840dongle_nrf52840 (read/write) 1000335 1000335 0 0.0
bss 122128 122128 0 0.0
rodata 115344 115344 0 0.0
text 674392 674392 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 893422 893422 0 0.0
bss 117744 117744 0 0.0
rodata 109792 109792 0 0.0
text 585144 585144 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 916815 916815 0 0.0
bss 119336 119336 0 0.0
rodata 105132 105132 0 0.0
text 614948 614948 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 826850 826850 0 0.0
bss 116152 116152 0 0.0
rodata 98356 98356 0 0.0
text 531900 531900 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 919679 919679 0 0.0
bss 119088 119088 0 0.0
rodata 105644 105644 0 0.0
text 617484 617484 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 914863 914863 0 0.0
bss 119112 119112 0 0.0
rodata 104748 104748 0 0.0
text 613524 613524 0 0.0
shell nrf52840dk_nrf52840 (read/write) 798203 798203 0 0.0
bss 109776 109776 0 0.0
rodata 78288 78288 0 0.0
text 533640 533640 0 0.0
p6 all-clusters-app default (read/write) 2443184 2443184 0 0.0
.bss 118036 118036 0 0.0
.data 2584 2584 0 0.0
.text 1401448 1401448 0 0.0
light-app default (read/write) 2340096 2340096 0 0.0
.bss 105780 105780 0 0.0
.data 2408 2408 0 0.0
.text 1298360 1298360 0 0.0
lock-app default (read/write) 2305616 2305616 0 0.0
.bss 105524 105524 0 0.0
.data 2360 2360 0 0.0
.text 1263880 1263880 0 0.0
qpg lighting-app qpg6105+debug (read only) 572432 572432 0 0.0
(read/write) 146936 146936 0 0.0
.bss 89936 89936 0 0.0
.data 1060 1060 0 0.0
.text 567112 567112 0 0.0
lock-app qpg6105+debug (read only) 518552 518552 0 0.0
(read/write) 146940 146940 0 0.0
.bss 89408 89408 0 0.0
.data 992 992 0 0.0
.text 513232 513232 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 848698 848698 0 0.0
bss 87736 87736 0 0.0
noinit 37160 37160 0 0.0
text 593364 593364 0 0.0

@bzbarsky-apple
Copy link
Contributor

Nice catch!

@github-actions
Copy link

github-actions bot commented Jan 28, 2022

PR #14426: Size comparison from 245035c to a240352

Full report (31 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 245035c a240352 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 578130 578130 0 0.0
.app_xip_area 484224 484224 0 0.0
.bss 76652 76652 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock-app CYW30739 (read/write) 536142 536142 0 0.0
.app_xip_area 443780 443780 0 0.0
.bss 75148 75148 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 842984 842984 0 0.0
(read/write) 126200 126200 0 0.0
.bss 124296 124296 0 0.0
.data 1900 1900 0 0.0
.text 842976 842976 0 0.0
BRD4161A+rpc (read only) 830336 830336 0 0.0
(read/write) 142856 142856 0 0.0
.bss 140856 140856 0 0.0
.data 2000 2000 0 0.0
.text 830328 830328 0 0.0
window-app BRD4161A (read only) 815560 815560 0 0.0
(read/write) 124852 124852 0 0.0
.bss 122996 122996 0 0.0
.data 1856 1856 0 0.0
.text 815552 815552 0 0.0
k32w light k32w061+release (read/write) 662940 662940 0 0.0
.bss 76428 76428 0 0.0
.data 1868 1868 0 0.0
.text 578844 578844 0 0.0
lock k32w061+release (read/write) 663844 663844 0 0.0
.bss 76692 76692 0 0.0
.data 1892 1892 0 0.0
.text 579460 579460 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6767748 6767748 0 0.0
(read/write) 279201 279201 0 0.0
.bss 55537 55537 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 175984 175984 0 0.0
.dynamic 560 560 0 0.0
.got 42784 42784 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 386892 386892 0 0.0
.text 5808756 5808756 0 0.0
thermostat-no-ble arm64 (read only) 2080748 2080748 0 0.0
(read/write) 149537 149537 0 0.0
.bss 67169 67169 0 0.0
.data 960 960 0 0.0
.data.rel.ro 74288 74288 0 0.0
.dynamic 560 560 0 0.0
.got 4144 4144 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 129932 129932 0 0.0
.text 1733472 1733472 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2382472 2382472 0 0.0
.bss 188588 188588 0 0.0
.data 5288 5288 0 0.0
.text 1345072 1345072 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2338200 2338200 0 0.0
.bss 179304 179304 0 0.0
.data 5584 5584 0 0.0
.text 1300800 1300800 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302240 2302240 0 0.0
.bss 179208 179208 0 0.0
.data 5552 5552 0 0.0
.text 1264840 1264840 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2292980 2292980 0 0.0
.bss 176532 176532 0 0.0
.data 5384 5384 0 0.0
.text 1255552 1255552 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 981375 981375 0 0.0
bss 119660 119660 0 0.0
rodata 115684 115684 0 0.0
text 668228 668228 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 966923 966923 0 0.0
bss 116704 116704 0 0.0
rodata 107160 107160 0 0.0
text 664672 664672 0 0.0
nrf52840dongle_nrf52840 (read/write) 997459 997459 0 0.0
bss 120832 120832 0 0.0
rodata 114516 114516 0 0.0
text 673656 673656 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 890546 890546 0 0.0
bss 116448 116448 0 0.0
rodata 108964 108964 0 0.0
text 584416 584416 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 913955 913955 0 0.0
bss 118040 118040 0 0.0
rodata 104320 104320 0 0.0
text 614212 614212 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 824006 824006 0 0.0
bss 114856 114856 0 0.0
rodata 97528 97528 0 0.0
text 531172 531172 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541779 541779 0 0.0
bss 52588 52588 0 0.0
rodata 50048 50048 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 916819 916819 0 0.0
bss 117792 117792 0 0.0
rodata 104832 104832 0 0.0
text 616748 616748 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 912003 912003 0 0.0
bss 117816 117816 0 0.0
rodata 103936 103936 0 0.0
text 612788 612788 0 0.0
shell nrf52840dk_nrf52840 (read/write) 798203 798203 0 0.0
bss 109776 109776 0 0.0
rodata 78288 78288 0 0.0
text 533640 533640 0 0.0
p6 all-clusters-app default (read/write) 2441752 2441752 0 0.0
.bss 116740 116740 0 0.0
.data 2584 2584 0 0.0
.text 1400016 1400016 0 0.0
light-app default (read/write) 2338568 2338568 0 0.0
.bss 104484 104484 0 0.0
.data 2408 2408 0 0.0
.text 1296832 1296832 0 0.0
lock-app default (read/write) 2304080 2304080 0 0.0
.bss 104228 104228 0 0.0
.data 2360 2360 0 0.0
.text 1262344 1262344 0 0.0
qpg lighting-app qpg6105+debug (read only) 570884 570884 0 0.0
(read/write) 146936 146936 0 0.0
.bss 88640 88640 0 0.0
.data 1060 1060 0 0.0
.text 565564 565564 0 0.0
lock-app qpg6105+debug (read only) 517004 517004 0 0.0
(read/write) 146940 146940 0 0.0
.bss 88112 88112 0 0.0
.data 992 992 0 0.0
.text 511684 511684 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 845786 845786 0 0.0
bss 86440 86440 0 0.0
noinit 37160 37160 0 0.0
text 592522 592522 0 0.0

@jmartinez-silabs jmartinez-silabs merged commit 08d8fd8 into project-chip:master Jan 28, 2022
@jmartinez-silabs jmartinez-silabs deleted the threadDiag branch January 28, 2022 18:54
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.

ThreadNetworkDiagnostics read network-name fail
5 participants