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

Restart operational advertisements when we get a new opcert. #7885

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Per the spec, the commissioning flow goes like this:

  1. Various steps.
  2. Install a new opcert.
  3. Optionally configure and enable a network.
  4. Discover each other on the operational network.

This means when the commissionnee gets a new opcert it needs to start
operational advertisement (if it's able to), because it doesn't know
whether the next step on the part of the commissioner will be network
config or operational discovery.

In particular, adding a new opcert adds a new fabric and node id, so
we need to redo our operational advertisements in the case when we are
already on the operational network to advertise the new operational
identity.

Problem

When doing onnetwork pairing, the device does not start advertising its new operational identity, so the commissioner can't discover what port it's using for the new fabric.

Change overview

Ensure that we start advertising once we get a new opcert.

Testing

Manually tested that:

  1. ble pairing from chip-tool to all-clusters-app on an m5stack still works correctly.
  2. onnetwork pairing from chip-tool to all-clusters-app running on the same device (so at IP ::1) still works correctly.

There is no automated testing for this yet, but if this is not done then we can't change the "tests" CI job to do operational discovery and stand up CASE. Once that happens, this PR's change will be tested in CI. Doing that depends on #7865, which is why I'm not making that change in this PR so far.

Per the spec, the commissioning flow goes like this:

1. Various steps.
2. Install a new opcert.
3. Optionally configure and enable a network.
4. Discover each other on the operational network.

This means when the commissionnee gets a new opcert it needs to start
operational advertisement (if it's able to), because it doesn't know
whether the next step on the part of the commissioner will be network
config or operational discovery.

In particular, adding a new opcert adds a new fabric and node id, so
we need to redo our operational advertisements in the case when we are
already on the operational network to advertise the new operational
identity.
@bzbarsky-apple bzbarsky-apple force-pushed the fix-onnetwork-discovery branch from 1ab28f1 to b22a7e8 Compare June 24, 2021 18:06
@github-actions
Copy link

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

File Section File VM
chip-lock.elf text 4 4
chip-lock.elf device_handles -4 -4
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

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

sections,vmsize,filesize
.debug_abbrev,0,10
.debug_info,0,7
.debug_line,0,7
text,4,4
device_handles,-4,-4
.debug_loc,0,-8


@andy31415 andy31415 merged commit b60439e into project-chip:master Jun 24, 2021
@bzbarsky-apple bzbarsky-apple deleted the fix-onnetwork-discovery branch June 25, 2021 02:51
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
…-chip#7885)

Per the spec, the commissioning flow goes like this:

1. Various steps.
2. Install a new opcert.
3. Optionally configure and enable a network.
4. Discover each other on the operational network.

This means when the commissionnee gets a new opcert it needs to start
operational advertisement (if it's able to), because it doesn't know
whether the next step on the part of the commissioner will be network
config or operational discovery.

In particular, adding a new opcert adds a new fabric and node id, so
we need to redo our operational advertisements in the case when we are
already on the operational network to advertise the new operational
identity.
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.

4 participants