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

[Telink] Move SetRouterPromotion(false) at the end of OpenCommissioningWindow #25517

Merged
merged 2 commits into from
Mar 9, 2023

Conversation

s07641069
Copy link
Contributor

Problem

We're still doing the SetRouterPromotion(false); multiple times on commissioning failures, but doing the SetRouterPromotion(true) only once when we reset.

Change overview

Move SetRouterPromotion(false) at the end of OpenCommissioningWindow.

Testing

Tested manually.

Steps:

  • Pair FTD device with Apple Home (Apple HomePod Mini)
  • Open commissioning window before FTD device becomes Router
  • Pair device with Google Home (Google Nest Hub)
  • Device paired successfully and controllable
  • Device becomes Router after commissioning window closed (second device paired)

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

PR #25517: Size comparison from fc0e4a2 to c6387d8

Increases (10 builds for bl602, bl702, cc13x2_26x2, cc32xx, linux, psoc6)
platform target config section fc0e4a2 c6387d8 change % change
bl602 lighting-app bl602+rpc .text 1058842 1058844 2 0.0
bl702 lighting-app bl702 .debug_info 40615999 40616002 3 0.0
bl702+rpc .debug_info 45028073 45028075 2 0.0
cc13x2_26x2 pump-controller-app LP_CC2652R7 (read/write) 173844 173852 8 0.0
cc32xx lock CC3235SF_LAUNCHXL .debug_info 2026706 20267070 3 0.0
.debug_line 2659698 2659701 3 0.0
linux thermostat-no-ble arm64 (read only) 2520900 2520916 16 0.0
.text 2107712 2107728 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 27984098 27984101 3 0.0
.debug_line 3794608 3794611 3 0.0
all-clusters-minimal cy8ckit_062s2_43012 .debug_info 27528563 27528566 3 0.0
.debug_line 3802107 3802110 3 0.0
light cy8ckit_062s2_43012 .debug_info 22870338 22870342 4 0.0
.debug_line 3354986 3354989 3 0.0
lock cy8ckit_062s2_43012 .debug_info 23121994 23121998 4 0.0
.debug_line 3357131 3357134 3 0.0
Decreases (3 builds for bl702, cc13x2_26x2)
platform target config section fc0e4a2 c6387d8 change % change
bl702 lighting-app bl702 .debug_frame 492516 492512 -4 -0.0
.text 957530 957524 -6 -0.0
bl702+rpc (read/write) 1280343 1280327 -16 -0.0
.debug_frame 520204 520200 -4 -0.0
.text 1032200 1032192 -8 -0.0
cc13x2_26x2 pump-controller-app LP_CC2652R7 (read only) 675483 675475 -8 -0.0
.text 588032 588024 -8 -0.0
Full report (24 builds for bl602, bl702, cc13x2_26x2, cc32xx, cyw30739, linux, mbed, psoc6, qpg)
platform target config section fc0e4a2 c6387d8 change % change
bl602 lighting-app bl602 (read/write) 1351854 1351854 0 0.0
.bss 94690 94690 0 0.0
.data 9744 9744 0 0.0
.text 1027910 1027910 0 0.0
bl602+rpc (read/write) 1397302 1397302 0 0.0
.bss 102738 102738 0 0.0
.data 10136 10136 0 0.0
.text 1058842 1058844 2 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1190459 1190459 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 69793 69793 0 0.0
.bss_psram 30064 30064 0 0.0
.comment 48 48 0 0.0
.data 4072 4072 0 0.0
.debug_abbrev 1552063 1552063 0 0.0
.debug_aranges 134312 134312 0 0.0
.debug_frame 492516 492512 -4 -0.0
.debug_info 40615999 40616002 3 0.0
.debug_line 5283137 5283137 0 0.0
.debug_loc 3420402 3420402 0 0.0
.debug_ranges 372976 372976 0 0.0
.debug_str 3581498 3581498 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 107904 107904 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 575121 575121 0 0.0
.symtab 173776 173776 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
957530 957524 -6 -0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1280343 1280327 -16 -0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 77841 77841 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4616 4616 0 0.0
.debug_abbrev 1700366 1700366 0 0.0
.debug_aranges 142552 142552 0 0.0
.debug_frame 520204 520200 -4 -0.0
.debug_info 45028073 45028075 2 0.0
.debug_line 5681899 5681899 0 0.0
.debug_loc 3617055 3617055 0 0.0
.debug_ranges 396752 396752 0 0.0
.debug_str 3985035 3985035 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 122016 122016 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 636010 636010 0 0.0
.symtab 192096 192096 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1032200 1032192 -8 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 680935 680935 0 0.0
(read/write) 170136 170136 0 0.0
.bss 80764 80764 0 0.0
.data 3352 3352 0 0.0
.rodata 88527 88527 0 0.0
.text 592092 592092 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 644063 644063 0 0.0
(read/write) 157432 157432 0 0.0
.bss 79964 79964 0 0.0
.data 3352 3352 0 0.0
.rodata 78399 78399 0 0.0
.text 565344 565344 0 0.0
lock-ftd LP_CC2652R7 (read only) 677343 677343 0 0.0
(read/write) 171104 171104 0 0.0
.bss 78228 78228 0 0.0
.data 3316 3316 0 0.0
.rodata 76711 76711 0 0.0
.text 600152 600152 0 0.0
lock-mtd LP_CC2652R7 (read only) 663931 663931 0 0.0
(read/write) 179764 179764 0 0.0
.bss 73476 73476 0 0.0
.data 3316 3316 0 0.0
.rodata 103523 103523 0 0.0
.text 559928 559928 0 0.0
pump-app LP_CC2652R7 (read only) 690531 690531 0 0.0
(read/write) 158660 158660 0 0.0
.bss 78204 78204 0 0.0
.data 3280 3280 0 0.0
.rodata 91083 91083 0 0.0
.text 598968 598968 0 0.0
pump-controller-app LP_CC2652R7 (read only) 675483 675475 -8 -0.0
(read/write) 173844 173852 8 0.0
.bss 78340 78340 0 0.0
.data 3304 3304 0 0.0
.rodata 86971 86971 0 0.0
.text 588032 588024 -8 -0.0
shell LP_CC2652R7 (read only) 672382 672382 0 0.0
(read/write) 180760 180760 0 0.0
.bss 82836 82836 0 0.0
.data 3348 3348 0 0.0
.rodata 85430 85430 0 0.0
.text 586640 586640 0 0.0
cc32xx lock CC3235SF_LAUNCHXL (read only) 644425 644425 0 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930235 930235 0 0.0
.debug_aranges 87336 87336 0 0.0
.debug_frame 300028 300028 0 0.0
.debug_info 2026706 20267070 3 0.0
.debug_line 2659698 2659701 3 0.0
.debug_loc 2802749 2802749 0 0.0
.debug_ranges 282952 282952 0 0.0
.debug_str 3023892 3023892 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 378514 378514 0 0.0
.symtab 256624 256624 0 0.0
.text 0 0 0 0.0
536372 536372 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 586810 586810 0 0.0
.app_xip_area 463692 463692 0 0.0
.bss 65560 65560 0 0.0
.data 740 740 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590778 590778 0 0.0
.app_xip_area 462364 462364 0 0.0
.bss 70848 70848 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 551822 551822 0 0.0
.app_xip_area 434208 434208 0 0.0
.bss 60096 60096 0 0.0
.data 696 696 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
linux chip-tool-ipv6only arm64 (read only) 12159732 12159732 0 0.0
(read/write) 733448 733448 0 0.0
.bss 34296 34296 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 675552 675552 0 0.0
.dynamic 560 560 0 0.0
.got 15376 15376 0 0.0
.init 24 24 0 0.0
.init_array 216 216 0 0.0
.rodata 588308 588308 0 0.0
.text 9830804 9830804 0 0.0
thermostat-no-ble arm64 (read only) 2520900 2520916 16 0.0
(read/write) 145224 145224 0 0.0
.bss 56344 56344 0 0.0
.data 1784 1784 0 0.0
.data.rel.ro 77688 77688 0 0.0
.dynamic 560 560 0 0.0
.got 5360 5360 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 150800 150800 0 0.0
.text 2107712 2107728 16 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2467600 2467600 0 0.0
.bss 215804 215804 0 0.0
.data 5880 5880 0 0.0
.text 1430244 1430244 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 0 0 0 0.0
(read only) 841000 841000 0 0.0
(read/write) 1762844 1762844 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189704 189704 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2640 2640 0 0.0
.debug_abbrev 1253593 1253593 0 0.0
.debug_aranges 111456 111456 0 0.0
.debug_frame 374632 374632 0 0.0
.debug_info 27984098 27984101 3 0.0
.debug_line 3794608 3794611 3 0.0
.debug_loc 3698465 3698465 0 0.0
.debug_ranges 364848 364848 0 0.0
.debug_str 3533116 3533116 0 0.0
.heap 841000 841000 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 581588 581588 0 0.0
.symtab 426032 426032 0 0.0
.text 1562112 1562112 0 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 0 0 0 0.0
(read only) 841808 841808 0 0.0
(read/write) 1703028 1703028 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188904 188904 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2632 2632 0 0.0
.debug_abbrev 1238926 1238926 0 0.0
.debug_aranges 110688 110688 0 0.0
.debug_frame 376968 376968 0 0.0
.debug_info 27528563 27528566 3 0.0
.debug_line 3802107 3802110 3 0.0
.debug_loc 3681667 3681667 0 0.0
.debug_ranges 362784 362784 0 0.0
.debug_str 3520238 3520238 0 0.0
.heap 841808 841808 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 541297 541297 0 0.0
.symtab 410944 410944 0 0.0
.text 1503104 1503104 0 0.0
.zero.table 8 8 0 0.0
light cy8ckit_062s2_43012 0 0 0 0.0
(read only) 850072 850072 0 0.0
(read/write) 1616804 1616804 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180808 180808 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2464 2464 0 0.0
.debug_abbrev 1074281 1074281 0 0.0
.debug_aranges 102896 102896 0 0.0
.debug_frame 347252 347252 0 0.0
.debug_info 22870338 22870342 4 0.0
.debug_line 3354986 3354989 3 0.0
.debug_loc 3357137 3357137 0 0.0
.debug_ranges 321304 321304 0 0.0
.debug_str 3319009 3319009 0 0.0
.heap 850072 850072 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 477014 477014 0 0.0
.symtab 378928 378928 0 0.0
.text 1425144 1425144 0 0.0
.zero.table 8 8 0 0.0
lock cy8ckit_062s2_43012 0 0 0 0.0
(read only) 845096 845096 0 0.0
(read/write) 1650620 1650620 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 185768 185768 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2480 2480 0 0.0
.debug_abbrev 1076225 1076225 0 0.0
.debug_aranges 103296 103296 0 0.0
.debug_frame 349016 349016 0 0.0
.debug_info 23121994 23121998 4 0.0
.debug_line 3357131 3357134 3 0.0
.debug_loc 3381645 3381645 0 0.0
.debug_ranges 323856 323856 0 0.0
.debug_str 3337811 3337811 0 0.0
.heap 845096 845096 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 480738 480738 0 0.0
.symtab 381104 381104 0 0.0
.text 1453984 1453984 0 0.0
.zero.table 8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1152020 1152020 0 0.0
.bss 99812 99812 0 0.0
.data 852 852 0 0.0
.text 599116 599116 0 0.0
lock-app qpg6105+debug (read/write) 1119084 1119084 0 0.0
.bss 96292 96292 0 0.0
.data 864 864 0 0.0
.text 566184 566184 0 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

Worth documenting that it's OK to do this even if AdvertiseAndListenForPASE fails, because if it does the callers of OpenCommissioningWindow will end up calling ResetState, which will reset the boolean.

@pullapprove pullapprove bot requested review from joonhaengHeo and younghak-hwang and removed request for pjzander-signify March 9, 2023 09:09
@yufengwangca yufengwangca merged commit 37c3db9 into project-chip:master Mar 9, 2023
@s07641069 s07641069 deleted the fix_SetRouterPromotion branch March 10, 2023 12:30
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
…ngWindow (project-chip#25517)

* [Telink] Move SetRouterPromotion(false) at the end of OpenCommissioningWindow

* [Telink] Add comment for AdvertiseAndListenForPASE fail case
mwswartwout pushed a commit to mwswartwout/connectedhomeip that referenced this pull request Mar 27, 2023
…ngWindow (project-chip#25517)

* [Telink] Move SetRouterPromotion(false) at the end of OpenCommissioningWindow

* [Telink] Add comment for AdvertiseAndListenForPASE fail case
woody-apple added a commit to woody-apple/connectedhomeip that referenced this pull request Aug 23, 2023
woody-apple added a commit to woody-apple/connectedhomeip that referenced this pull request Aug 23, 2023
mergify bot pushed a commit that referenced this pull request Aug 24, 2023
#28848)

* Revert "[Telink] Move SetRouterPromotion(false) at the end of OpenCommissioningWindow (#25517)"

This reverts commit 37c3db9.

* Revert "[Telink] Block device role changing into Router if commissioning window opened and device not yet Router (#25395)"

This reverts commit c126158.
abpoth pushed a commit to abpoth/connectedhomeip that referenced this pull request Aug 25, 2023
project-chip#28848)

* Revert "[Telink] Move SetRouterPromotion(false) at the end of OpenCommissioningWindow (project-chip#25517)"

This reverts commit 37c3db9.

* Revert "[Telink] Block device role changing into Router if commissioning window opened and device not yet Router (project-chip#25395)"

This reverts commit c126158.
HunsupJung pushed a commit to HunsupJung/connectedhomeip that referenced this pull request Oct 23, 2023
project-chip#28848)

* Revert "[Telink] Move SetRouterPromotion(false) at the end of OpenCommissioningWindow (project-chip#25517)"

This reverts commit 37c3db9.

* Revert "[Telink] Block device role changing into Router if commissioning window opened and device not yet Router (project-chip#25395)"

This reverts commit c126158.
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