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

[controller] Network commissioning support on Controller #4622

Merged

Conversation

erjiaqing
Copy link
Contributor

@erjiaqing erjiaqing commented Feb 3, 2021

Problem

Add network provisioning cluster define for provisioning use, also adds support on controller side.

Support on end device side will be a seperate PR later.

This PR also fixs support for ByteString in encoder for interaction model.

Summary of Changes

See above.

Fixes #3945

Copy link
Contributor

@LuDuda LuDuda left a comment

Choose a reason for hiding this comment

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

@erjiaqing thank you for doing this! LGTM 👍

Few questions - more about specification..:

  • How controller obtains Thread Operational Credentials (is it out of the spec, and we should use MeshCop connection to Thread Border Router)?
  • How Controller will know if the device operates on WiFi or Thread? Or the user will always need to know that and configure it manually?

.Put8(kSeqNum)
.Put8(ZCL_ADD_THREAD_NETWORK_COMMAND_ID)
.Put(static_cast<uint8_t>(operationalDatasetStrLen))
.Put(reinterpret_cast<char *>(operationalDataset))
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a question.. Why we send Operational Dataset in a form of a string and not in the binary form of Operational Dataset TLV?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vivien-apple I think we need BYTE_STRING type support in encoder and dispatcher. (item 1 in #4503 )

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. String are not a first class citizen of the encoder at the moment. I need to have a look at them at some point, since I think I have seen some bugs even for regular strings...

@todo
Copy link

todo bot commented Feb 4, 2021

</description>

<description>TODO</description>
<code>0xaaaa</code>
<define>NWPROV_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<command source="client" code="0x00" name="ScanNetworks" optional="false" cli="chip nwprov scannetworks">
<description>TODO</description>
<arg name="SSID" type="OCTET_STRING"/>
<arg name="Breadcrumb" type="INT64U"/>
<arg name="TimeoutMs" type="INT32U"/>
</command>


This comment was generated by todo based on a TODO comment in f1b7b31 in #4622. cc @erjiaqing.

@todo
Copy link

todo bot commented Feb 4, 2021

</description>

<description>TODO</description>
<arg name="SSID" type="OCTET_STRING"/>
<arg name="Breadcrumb" type="INT64U"/>
<arg name="TimeoutMs" type="INT32U"/>
</command>
<command source="server" code="0x01" name="ScanNetworksResp" optional="false" cli="chip nwprov scannetworksresponse">
<description>TODO</description>
<arg name="ErrorCode" type="INT8U"/>
<arg name="DebugText" type="CHAR_STRING"/>
<arg name="WiFiScanResults" type="WiFiInterfaceScanResult" array="true"/>
<arg name="ThreadScanResults" type="ThreadInterfaceScanResult" array="true"/>


This comment was generated by todo based on a TODO comment in f1b7b31 in #4622. cc @erjiaqing.

@todo
Copy link

todo bot commented Feb 4, 2021

</description>

<description>TODO</description>
<arg name="ErrorCode" type="INT8U"/>
<arg name="DebugText" type="CHAR_STRING"/>
<arg name="WiFiScanResults" type="WiFiInterfaceScanResult" array="true"/>
<arg name="ThreadScanResults" type="ThreadInterfaceScanResult" array="true"/>
</command>
<command source="client" code="0x02" name="AddWiFiNetwork" optional="false" cli="chip nwprov addwifinetwork">
<description>TODO</description>
<arg name="SSID" type="OCTET_STRING"/>
<arg name="Credentials" type="OCTET_STRING"/>
<arg name="Breadcrumb" type="INT64U"/>


This comment was generated by todo based on a TODO comment in f1b7b31 in #4622. cc @erjiaqing.

@erjiaqing erjiaqing force-pushed the network_provisioning_controller branch from f277155 to 8c124a3 Compare February 7, 2021 03:02
@erjiaqing
Copy link
Contributor Author

@vivien-apple All comment resolved, PTAL.

@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from e76ed54

File Section File VM
chip-shell.elf text 480 480
chip-shell.elf rodata 72 68
chip-shell.elf bss 0 27
chip-shell.elf log_const_sections 12 12
chip-shell.elf init_array 4 4
chip-shell.elf [LOAD #3 [RW]] 0 -27
chip-lighting.elf text 416 416
chip-lighting.elf rodata 72 68
chip-lighting.elf [LOAD #3 [RW]] 0 19
chip-lighting.elf bss 0 13
chip-lighting.elf init_array 4 4
chip-lighting.elf shell_root_cmds_sections -4 -4
chip-lock.elf text 420 420
chip-lock.elf rodata 64 68
chip-lock.elf [LOAD #3 [RW]] 0 23
chip-lock.elf bss 0 9
chip-lock.elf init_array 4 4
chip-lock.elf shell_root_cmds_sections -8 -8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,36436
.debug_line,0,5482
.debug_abbrev,0,5010
.debug_str,0,2513
.debug_loc,0,1475
.strtab,0,1442
.symtab,0,1008
text,480,480
.debug_frame,0,452
.debug_ranges,0,296
.debug_aranges,0,216
rodata,68,72
bss,27,0
log_const_sections,12,12
init_array,4,4
.shstrtab,0,-2
[LOAD #3 [RW]],-27,0

Comparing ./master_artifact/chip-lighting.elf and ./pull_artifact/chip-lighting.elf:

sections,vmsize,filesize
.debug_info,0,37146
.debug_line,0,5508
.debug_abbrev,0,5270
.debug_str,0,2566
.debug_loc,0,1466
.strtab,0,1425
.symtab,0,976
.debug_frame,0,436
text,416,416
.debug_ranges,0,328
.debug_aranges,0,216
rodata,68,72
[LOAD #3 [RW]],19,0
bss,13,0
init_array,4,4
.shstrtab,0,-1
shell_root_cmds_sections,-4,-4

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,37146
.debug_line,0,5508
.debug_abbrev,0,5270
.debug_str,0,2566
.debug_loc,0,1458
.strtab,0,1425
.symtab,0,976
.debug_frame,0,436
text,420,420
.debug_ranges,0,328
.debug_aranges,0,216
rodata,68,64
[LOAD #3 [RW]],23,0
bss,9,0
init_array,4,4
.shstrtab,0,-1
shell_root_cmds_sections,-8,-8


@erjiaqing erjiaqing changed the title [controller] Network provisioning support on Controller [controller] Network commissioning support on Controller Feb 18, 2021
@github-actions
Copy link

Size increase report for "esp32-example-build" from e76ed54

File Section File VM
chip-all-clusters-app.elf .flash.text 328 328
chip-all-clusters-app.elf .flash.rodata 64 64
chip-all-clusters-app.elf .dram0.bss 0 8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,75369
.debug_line,0,10368
.debug_abbrev,0,6259
.debug_str,0,2755
.strtab,0,1335
.debug_loc,0,836
.symtab,0,512
.debug_frame,0,480
.shstrtab,0,369
.flash.text,328,328
.debug_aranges,0,216
.xt.prop._ZN4chip11DeviceLayer8Internal31GenericConfigurationManagerImplINS0_24ConfigurationManagerImplEE25_IncrementLifetimeCounterEv,0,76
.flash.rodata,64,64
.xt.prop._ZTVN4chip24LifetimePersistedCounterE,0,52
.xt.prop._ZTVN4chip30MonotonicallyIncreasingCounterE,0,52
.xt.prop._ZN4chip11DeviceLayer8Internal31GenericConfigurationManagerImplINS0_24ConfigurationManagerImplEE12_GetVendorIdERt,0,40
.dram0.bss,8,0
.xt.prop._ZTVN4chip11DeviceLayer37DeviceNetworkProvisioningDelegateImplE,0,1
[Unmapped],0,-64
.debug_ranges,0,-160


@erjiaqing
Copy link
Contributor Author

erjiaqing commented Feb 22, 2021

@woody-apple PTAL
BTW, the pullapprove says "CLA must be agreed to by all contributors", but why?

@jelderton jelderton merged commit 1a78a5f into project-chip:master Feb 22, 2021
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Mar 17, 2021
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.

Add network provisioning cluster to CHIP
9 participants