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

[chip-tool] Update chip-tool such that the device scanner is able to directly gives the discovered CommissionNodeData to the SetUpCodePairer #26164

Conversation

vivien-apple
Copy link
Contributor

Problem

This PR adds methods such that the SetUpCodePairer can consume a CommissionNodeDatathas has been previously discovered.

In order to discover the commissioning info over mdns, this PR also adds 2 new method for mdns resolver platform implementations. Those methods are ChipDnssdBrowse and ChipDnssdResolvebut instead of taking a callback they takes a delegate.

I have added the darwin implementation for those, and I have updated `chip-tool- to use them directly.

@vivien-apple vivien-apple self-assigned this Apr 19, 2023
@vivien-apple vivien-apple changed the title Chip tool discover with commission node data [chip-tool] Update chip-tool such that the device scanner is able to directly gives the discovered CommissionNodeData to the SetUpCodePairer Apr 19, 2023
@vivien-apple vivien-apple marked this pull request as ready for review April 19, 2023 14:07
@vivien-apple vivien-apple force-pushed the ChipTool_DiscoverWithCommissionNodeData branch from a3f4161 to fa96533 Compare April 19, 2023 14:11
@github-actions
Copy link

PR #26164: Size comparison from b8368a1 to fa96533

Decreases (1 build for cc32xx)
platform target config section b8368a1 fa96533 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20330829 20330828 -1 -0.0
Full report (1 build for cc32xx)
platform target config section b8368a1 fa96533 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330829 20330828 -1 -0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 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 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@vivien-apple vivien-apple force-pushed the ChipTool_DiscoverWithCommissionNodeData branch from fa96533 to 0a00e4b Compare April 19, 2023 14:58
@github-actions
Copy link

PR #26164: Size comparison from b8368a1 to 0a00e4b

Full report (1 build for cc32xx)
platform target config section b8368a1 0a00e4b change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330829 20330829 0 0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 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 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@vivien-apple vivien-apple force-pushed the ChipTool_DiscoverWithCommissionNodeData branch from 0a00e4b to e535e22 Compare April 20, 2023 09:30
@github-actions
Copy link

PR #26164: Size comparison from b187c3e to e535e22

Increases (1 build for cc32xx)
platform target config section b187c3e e535e22 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20330828 20330829 1 0.0
Full report (1 build for cc32xx)
platform target config section b187c3e e535e22 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330828 20330829 1 0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 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 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

examples/chip-tool/commands/common/DeviceScanner.cpp Outdated Show resolved Hide resolved
examples/chip-tool/commands/pairing/PairingCommand.cpp Outdated Show resolved Hide resolved
examples/chip-tool/commands/pairing/PairingCommand.cpp Outdated Show resolved Hide resolved
examples/chip-tool/commands/pairing/PairingCommand.cpp Outdated Show resolved Hide resolved
examples/chip-tool/commands/pairing/PairingCommand.cpp Outdated Show resolved Hide resolved
src/controller/SetUpCodePairer.cpp Outdated Show resolved Hide resolved
src/controller/CHIPDeviceController.h Outdated Show resolved Hide resolved
src/lib/dnssd/Discovery_ImplPlatform.cpp Outdated Show resolved Hide resolved
@vivien-apple vivien-apple force-pushed the ChipTool_DiscoverWithCommissionNodeData branch 5 times, most recently from 753e555 to 199e4b7 Compare May 9, 2023 09:39
@vivien-apple vivien-apple force-pushed the ChipTool_DiscoverWithCommissionNodeData branch from 199e4b7 to 80c5f35 Compare May 9, 2023 09:41
@github-actions
Copy link

github-actions bot commented May 9, 2023

PR #26164: Size comparison from 05d9050 to 7d07a63

Increases (5 builds for bl702, k32w)
platform target config section 05d9050 7d07a63 change % change
bl702 lighting-app bl702 (read/write) 1185759 1185791 32 0.0
.debug_abbrev 1550204 1550249 45 0.0
.debug_aranges 132944 132952 8 0.0
.debug_frame 488804 488852 48 0.0
.debug_info 40943088 40961485 18397 0.0
.debug_line 5301455 5302289 834 0.0
.debug_loc 3424613 3424696 83 0.0
.debug_ranges 372344 372352 8 0.0
.debug_str 3708223 3708354 131 0.0
.strtab 580786 580896 110 0.0
.symtab 175264 175280 16 0.0
.text 965470 965502 32 0.0
bl702+rpc (read/write) 1273571 1273587 16 0.0
.debug_abbrev 1706954 1706999 45 0.0
.debug_aranges 141224 141232 8 0.0
.debug_frame 516776 516824 48 0.0
.debug_info 45848903 45869037 20134 0.0
.debug_line 5716360 5717194 834 0.0
.debug_loc 3626917 3627055 138 0.0
.debug_ranges 397648 397656 8 0.0
.debug_str 4133328 4133459 131 0.0
.strtab 641456 641566 110 0.0
.symtab 193600 193616 16 0.0
.text 1038098 1038126 28 0.0
k32w contact k32w0+release (read only) 583444 583460 16 0.0
.text 582908 582924 16 0.0
light k32w0+release (read only) 582300 582316 16 0.0
.text 581764 581780 16 0.0
lock k32w0+release (read only) 555820 555836 16 0.0
.text 555284 555300 16 0.0
Decreases (1 build for bl602)
platform target config section 05d9050 7d07a63 change % change
bl602 lighting-app bl602 (read/write) 1354998 1354990 -8 -0.0
.text 1035978 1035974 -4 -0.0
Full report (7 builds for bl602, bl702, k32w)
platform target config section 05d9050 7d07a63 change % change
bl602 lighting-app bl602 (read/write) 1354998 1354990 -8 -0.0
.bss 87886 87886 0 0.0
.data 9648 9648 0 0.0
.text 1035978 1035974 -4 -0.0
bl602+rpc (read/write) 1401266 1401266 0 0.0
.bss 95934 95934 0 0.0
.data 10040 10040 0 0.0
.text 1067332 1067332 0 0.0
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1185759 1185791 32 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 67585 67585 0 0.0
.bss_psram 24368 24368 0 0.0
.comment 48 48 0 0.0
.data 3952 3952 0 0.0
.debug_abbrev 1550204 1550249 45 0.0
.debug_aranges 132944 132952 8 0.0
.debug_frame 488804 488852 48 0.0
.debug_info 40943088 40961485 18397 0.0
.debug_line 5301455 5302289 834 0.0
.debug_loc 3424613 3424696 83 0.0
.debug_ranges 372344 372352 8 0.0
.debug_str 3708223 3708354 131 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 140 140 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 106304 106304 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 580786 580896 110 0.0
.symtab 175264 175280 16 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 965470 965502 32 0.0
bl702+rpc 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1273571 1273587 16 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 75633 75633 0 0.0
.bss_psram 24768 24768 0 0.0
.comment 48 48 0 0.0
.data 4504 4504 0 0.0
.debug_abbrev 1706954 1706999 45 0.0
.debug_aranges 141224 141232 8 0.0
.debug_frame 516776 516824 48 0.0
.debug_info 45848903 45869037 20134 0.0
.debug_line 5716360 5717194 834 0.0
.debug_loc 3626917 3627055 138 0.0
.debug_ranges 397648 397656 8 0.0
.debug_str 4133328 4133459 131 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 156 156 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 120144 120144 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 641456 641566 110 0.0
.symtab 193600 193616 16 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 1038098 1038126 28 0.0
k32w contact k32w0+release (read only) 583444 583460 16 0.0
(read/write) 82704 82704 0 0.0
.bss 65888 65888 0 0.0
.data 2192 2192 0 0.0
.text 582908 582924 16 0.0
light k32w0+release (read only) 582300 582316 16 0.0
(read/write) 82356 82356 0 0.0
.bss 65552 65552 0 0.0
.data 2180 2180 0 0.0
.text 581764 581780 16 0.0
lock k32w0+release (read only) 555820 555836 16 0.0
(read/write) 80352 80352 0 0.0
.bss 63624 63624 0 0.0
.data 2104 2104 0 0.0
.text 555284 555300 16 0.0

@woody-apple woody-apple merged commit 9f93a41 into project-chip:master Jun 8, 2023
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