connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

add ScanNetworks step to CHIPDeviceController

Open woody-apple opened this issue 2 years ago • 3 comments

Problem

  • There is no way to trigger a scanNetworks during commissioning
  • There is no way for apps using the iOS/Android libraries to access the network type of the client (ReadCommissioningInfo data), or access the scan results in order to choose the best network credentials for the device.
  • There is no way to pause the commissioning flow in the event that async processing (user or cloud) is needed to select and input the best network info.

Change overview

  • Added an optional commissioning step for performing the ScanNetworks
  • Added PairingDelegate callbacks for receiving the ReadCommissioningInfo and Scan results
  • Added pauseCommissioning/resumeCommissioning commands to DeviceCommissioner
  • Added glue to make this functionality available to Android
  • TODO: glue to make this functionality available to iOS

Testing

  • Tested using chip-tool and sample apps.
  • Tested with efr32

woody-apple avatar Jul 28 '22 15:07 woody-apple

PR #21358: Size comparison from c5e7ab69fbd893b29174e5f3118fe56b10be8f3b to 5c211bde954e1e7fa2b576167625b57502d4ed16

Decreases (1 build for nrfconnect)
platform target config section c5e7ab69 5c211bde change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180935 1180919 -16 -0.0
text 815508 815504 -4 -0.0
Full report (12 builds for efr32, mbed, nrfconnect, p6)
platform target config section c5e7ab69 5c211bde change % change
efr32 lighting-app BRD4161A (read/write) 1088960 1088960 0 0.0
.bss 133268 133268 0 0.0
.data 2064 2064 0 0.0
.text 953608 953608 0 0.0
window-app BRD4161A (read/write) 1082252 1082252 0 0.0
.bss 134748 134748 0 0.0
.data 2092 2092 0 0.0
.text 945388 945388 0 0.0
lighting-app BRD4161A+rpc (read/write) 1143300 1143300 0 0.0
.bss 149948 149948 0 0.0
.data 2276 2276 0 0.0
.text 991056 991056 0 0.0
BRD4161A+rs911x (read/write) 974256 974256 0 0.0
.bss 161744 161744 0 0.0
.data 2048 2048 0 0.0
.text 810444 810444 0 0.0
lock-app BRD4161A+wf200 (read/write) 1130096 1130096 0 0.0
.bss 144400 144400 0 0.0
.data 2056 2056 0 0.0
.text 983620 983620 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453224 2453224 0 0.0
.bss 214548 214548 0 0.0
.data 5872 5872 0 0.0
.text 1415868 1415868 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180935 1180919 -16 -0.0
bss 143224 143224 0 0.0
rodata 143344 143344 0 0.0
text 815508 815504 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1160811 1160811 0 0.0
bss 142460 142460 0 0.0
rodata 134876 134876 0 0.0
text 804656 804656 0 0.0
p6 all-clusters-app default (read only) 881528 881528 0 0.0
(read/write) 1689268 1689268 0 0.0
.bss 149168 149168 0 0.0
.data 2648 2648 0 0.0
.text 1529064 1529064 0 0.0
all-clusters-minimal-app default (read only) 882248 882248 0 0.0
(read/write) 1633300 1633300 0 0.0
.bss 148448 148448 0 0.0
.data 2648 2648 0 0.0
.text 1473816 1473816 0 0.0
light-app default (read only) 890568 890568 0 0.0
(read/write) 1553348 1553348 0 0.0
.bss 140336 140336 0 0.0
.data 2440 2440 0 0.0
.text 1402184 1402184 0 0.0
lock-app default (read only) 886072 886072 0 0.0
(read/write) 1591988 1591988 0 0.0
.bss 144816 144816 0 0.0
.data 2456 2456 0 0.0
.text 1436328 1436328 0 0.0

github-actions[bot] avatar Aug 01 '22 23:08 github-actions[bot]

PR #21358: Size comparison from 3a3fa935f0fc2ad638be673f06803966634fedbc to 955cef3599dfe59661409cad6f2b9c5b7394984a

Full report (8 builds for efr32, esp32, mbed)
platform target config section 3a3fa935 955cef35 change % change
efr32 lighting-app BRD4161A (read/write) 1088992 1088992 0 0.0
.bss 133268 133268 0 0.0
.data 2064 2064 0 0.0
.text 953640 953640 0 0.0
BRD4161A+rpc (read/write) 1143348 1143348 0 0.0
.bss 149948 149948 0 0.0
.data 2276 2276 0 0.0
.text 991104 991104 0 0.0
BRD4161A+rs911x (read/write) 974288 974288 0 0.0
.bss 161744 161744 0 0.0
.data 2048 2048 0 0.0
.text 810476 810476 0 0.0
lock-app BRD4161A+wf200 (read/write) 1130112 1130112 0 0.0
.bss 144400 144400 0 0.0
.data 2056 2056 0 0.0
.text 983636 983636 0 0.0
window-app BRD4161A (read/write) 1082284 1082284 0 0.0
.bss 134748 134748 0 0.0
.data 2092 2092 0 0.0
.text 945420 945420 0 0.0
esp32 all-clusters-app c3devkit (read only) 1024428 1024428 0 0.0
(read/write) 1487042 1487042 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216672 216672 0 0.0
.flash.text 1024428 1024428 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1077871 1077871 0 0.0
(read/write) 489064 489064 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247084 247084 0 0.0
.flash.text 1072487 1072487 0 0.0
.iram0.text 123267 123267 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453224 2453224 0 0.0
.bss 214548 214548 0 0.0
.data 5872 5872 0 0.0
.text 1415868 1415868 0 0.0

github-actions[bot] avatar Aug 02 '22 05:08 github-actions[bot]

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Aug 10 '22 01:08 stale[bot]