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

require OperationalCredentialsDelegate refactor #7951

Closed
msandstedt opened this issue Jun 28, 2021 · 4 comments
Closed

require OperationalCredentialsDelegate refactor #7951

msandstedt opened this issue Jun 28, 2021 · 4 comments

Comments

@msandstedt
Copy link
Contributor

msandstedt commented Jun 28, 2021

Problem

Related: #5055, #6656, #7859

The current OperationalCredentialsDelegate interface has a number of limitations that block integration into many designs. Some examples:

  • some interfaces are still synchronous; all must be async
  • end-to-end attestation from the certificate authority is not well-supported
  • the single instance delegate with separate root / ICA / NOC getters implies a single root and ICA for the entire ecosystem
  • the commissioning state machine is driven by the sdk; it needs to be driven by apps that call into the sdk
  • we need a way to pass in session-specific context for each node to be commissioned
  • the current design includes some non-spec-mandated behaviors, such as commissioners proposing fabric IDs and node IDs to signing infrastructure; such behaviors need to be moved out of the chip::controller::deviceCommissioner object and into apps

Proposed Solution

In meetings with stakeholders, it has become clear that the problems with the OpCreds delegate interface are actually a symptom of a more fundamental problem.  The chip::controller::DeviceCommissioner design is missing a necessary layer of abstraction.  Consider the DeviceComissioner object's internal states:

enum CommissioningStage : uint8_t
{
    kError,
    kSecurePairing,
    kArmFailsafe,
    // kConfigTime,  // NOT YET IMPLEMENTED
    // kConfigTimeZone,  // NOT YET IMPLEMENTED
    // kConfigDST,  // NOT YET IMPLEMENTED
    kConfigRegulatory,
    kCheckCertificates,
    kConfigACL,
    kNetworkSetup,
    kScanNetworks, // optional stage if network setup fails (not yet implemented)
    kNetworkEnable,
    kFindOperational,
    kSendComplete,
    kCleanup,
};

These shouldn't exist here in the first place. The sdk's chip::controller::DeviceCommissioner object is preempting what should be the role of the commissioner app proper.  Instead of driving its own state machine, we need the sdk to provide stateless commissioning methods that map to transactions in the spec's commissioning sequence.  These are the edges in the commissioning state machine, not the states themselves.

It seems then that the functionality provided by `chip::controller::DeviceCommissionert must be divided into two halves:

  • one half should be a stateless collection of helpers to provide apps the means to drive a commissioning flow
  • the other half is the remainder of stateful logic that in the DeviceCommissioner object; it is fine for in-tree examples to embrace this approach; it is not good that the sdk imposes this approach on any app that attempts to leverage existing code; this therefore needs to be separated and moved to a different location
@msandstedt msandstedt self-assigned this Jun 28, 2021
@msandstedt
Copy link
Contributor Author

msandstedt commented Jun 28, 2021

@msandstedt
Copy link
Contributor Author

Despite additions and refinements, we do not believe the sdk commissioner implementation can currently meet our product needs. To this end, and per the proposed solution above, I have developed a prototype that would meet our needs. See the prototype here: https://github.com/msandstedt/connectedhomeip/tree/com-fsm.

Leveraging the recently added src/lib/support/StateMachine class, this defines commissioning states and transition events as object types, and allows app implementations to add and remove states and events as needed. Reordering is also readily achievable. And because states and events are types, not values, both can have an arbitrarily sophisticated interfaces. This keeps most transient state data out of any sort of long-lived top-level object, and so the peak memory footprint should be lower.

Core sdk commissioning states can be seen here:

https://github.com/msandstedt/connectedhomeip/blob/com-fsm/src/controller/CommissioningStates.h

An example application implementation can be seen here. This is minimally tied into chip-tool:

https://github.com/msandstedt/connectedhomeip/blob/com-fsm/src/controller/ExampleCommissioningStateMachine.h

I would welcome any feedback people might have.

msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 22, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 22, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 22, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 22, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 22, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 22, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 22, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 23, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 23, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 23, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 23, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 23, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 30, 2021
The commissioning state machine operates without dependence on the
chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy,
CASEClient or CASESessionManager objects.  And using the recently
introduced StateMachine utility in src/lib, the needed flexibility
for ecosystem-specific commissioning flows is available.

The state machine is separated into two primary resources:

* CommissioningStates.h with templates that can support all commissioners
* ExampleCommissioningStateMachine.h, a concrete implementation that
  uses the states and provides an example that apps can copy, modify,
  and extend

App implementations can add, remove and reorder states as necessary.
Arbitrarily complex async UI logic is also easily achieved without the
need to define any callback delegate interfaces.  This implicitly fixes
issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async
interface).

ExampleCommissioningStateMachine takes the place of DeviceCommissioner
in chip-tool, providing feature parity.  chip-tool now uses the new code
to commission devices, and on success then places them into a
DeviceController for persistence and subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 31, 2021
The commissioning state machine is a short-lived object that is
instantiated to commission a given device, and then may be disposed when
this succeeds or fails.

The design uses the StateMachine utility in src/lib to provide an
extensible framework to consuming apps.  And it minimizes memory
footprint by maintaining only that state in memory that is currently
needed.

The state machine is provided as these primary resources:

* State.h, Event.h: common state and event templates
* Discoverer: a commissionable node discoverer
* ExampleCommissioningStateMachine.h: a concrete implementation that
  uses the states, events and discoverer to provide an example that apps
  can copy, modify, and extend

App implementations can add, remove and reorder states as needed.
Arbitrarily complex async UI logic can be realized with this design
without the need to define callback delegate interfaces in the sdk.

ExampleCommissioningStateMachine is integrated into chip-tool, providing
feature parity.  chip-tool uses the code to commission devices, and on
success then places them into a DeviceController for persistence and
subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 31, 2021
The commissioning state machine is a short-lived object that is
instantiated to commission a given device, and then may be disposed when
this succeeds or fails.

The design uses the StateMachine utility in src/lib to provide an
extensible framework to consuming apps.  And it minimizes memory
footprint by maintaining only that state in memory that is currently
needed.

The state machine is provided as these primary resources:

* State.h, Event.h: common state and event templates
* Discoverer: a commissionable node discoverer
* ExampleCommissioningStateMachine.h: a concrete implementation that
  uses the states, events and discoverer to provide an example that apps
  can copy, modify, and extend

App implementations can add, remove and reorder states as needed.
Arbitrarily complex async UI logic can be realized with this design
without the need to define callback delegate interfaces in the sdk.

ExampleCommissioningStateMachine is integrated into chip-tool, providing
feature parity.  chip-tool uses the code to commission devices, and on
success then places them into a DeviceController for persistence and
subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 31, 2021
The commissioning state machine is a short-lived object that is
instantiated to commission a given device, and then may be disposed when
this succeeds or fails.

The design uses the StateMachine utility in src/lib to provide an
extensible framework to consuming apps.  And it minimizes memory
footprint by maintaining only that state in memory that is currently
needed.

The state machine is provided as these primary resources:

* State.h, Event.h: common state and event templates
* Discoverer: a commissionable node discoverer
* ExampleCommissioningStateMachine.h: a concrete implementation that
  uses the states, events and discoverer to provide an example that apps
  can copy, modify, and extend

App implementations can add, remove and reorder states as needed.
Arbitrarily complex async UI logic can be realized with this design
without the need to define callback delegate interfaces in the sdk.

ExampleCommissioningStateMachine is integrated into chip-tool, providing
feature parity.  chip-tool uses the code to commission devices, and on
success then places them into a DeviceController for persistence and
subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Dec 31, 2021
The commissioning state machine is a short-lived object that is
instantiated to commission a given device, and then may be disposed when
this succeeds or fails.

The design uses the StateMachine utility in src/lib to provide an
extensible framework to consuming apps.  And it minimizes memory
footprint by maintaining only that state in memory that is currently
needed.

The state machine is provided as these primary resources:

* State.h, Event.h: common state and event templates
* Discoverer: a commissionable node discoverer
* ExampleCommissioningStateMachine.h: a concrete implementation that
  uses the states, events and discoverer to provide an example that apps
  can copy, modify, and extend

App implementations can add, remove and reorder states as needed.
Arbitrarily complex async UI logic can be realized with this design
without the need to define callback delegate interfaces in the sdk.

ExampleCommissioningStateMachine is integrated into chip-tool, providing
feature parity.  chip-tool uses the code to commission devices, and on
success then places them into a DeviceController for persistence and
subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Jan 4, 2022
The commissioning state machine is a short-lived object that is
instantiated to commission a given device, and then may be disposed when
this succeeds or fails.

The design uses the StateMachine utility in src/lib to provide an
extensible framework to consuming apps.  And it minimizes memory
footprint by maintaining only that state in memory that is currently
needed.

The state machine is provided as these primary resources:

* State.h, Event.h: common state and event templates
* Discoverer: a commissionable node discoverer
* ExampleCommissioningStateMachine.h: a concrete implementation that
  uses the states, events and discoverer to provide an example that apps
  can copy, modify, and extend

App implementations can add, remove and reorder states as needed.
Arbitrarily complex async UI logic can be realized with this design
without the need to define callback delegate interfaces in the sdk.

ExampleCommissioningStateMachine is integrated into chip-tool, providing
feature parity.  chip-tool uses the code to commission devices, and on
success then places them into a DeviceController for persistence and
subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Jan 27, 2022
The commissioning state machine is a short-lived object that is
instantiated to commission a given device, and then may be disposed when
this succeeds or fails.

The design uses the StateMachine utility in src/lib to provide an
extensible framework to consuming apps.  And it minimizes memory
footprint by maintaining only that state in memory that is currently
needed.

The state machine is provided as these primary resources:

* State.h, Event.h: common state and event templates
* Discoverer: a commissionable node discoverer
* ExampleCommissioningStateMachine.h: a concrete implementation that
  uses the states, events and discoverer to provide an example that apps
  can copy, modify, and extend

App implementations can add, remove and reorder states as needed.
Arbitrarily complex async UI logic can be realized with this design
without the need to define callback delegate interfaces in the sdk.

ExampleCommissioningStateMachine is integrated into chip-tool, providing
feature parity.  chip-tool uses the code to commission devices, and on
success then places them into a DeviceController for persistence and
subsequent interaction.

Fixes project-chip#7951
msandstedt added a commit to msandstedt/connectedhomeip that referenced this issue Feb 3, 2022
The commissioning state machine is a short-lived object that is
instantiated to commission a given device, and then may be disposed when
this succeeds or fails.

The design uses the StateMachine utility in src/lib to provide an
extensible framework to consuming apps.  And it minimizes memory
footprint by maintaining only that state in memory that is currently
needed.

The state machine is provided as these primary resources:

* State.h, Event.h: common state and event templates
* Discoverer: a commissionable node discoverer
* ExampleCommissioningStateMachine.h: a concrete implementation that
  uses the states, events and discoverer to provide an example that apps
  can copy, modify, and extend

App implementations can add, remove and reorder states as needed.
Arbitrarily complex async UI logic can be realized with this design
without the need to define callback delegate interfaces in the sdk.

ExampleCommissioningStateMachine is integrated into chip-tool, providing
feature parity.  chip-tool uses the code to commission devices, and on
success then places them into a DeviceController for persistence and
subsequent interaction.

Fixes project-chip#7951
@woody-apple
Copy link
Contributor

@msandstedt What work remains here?

@msandstedt
Copy link
Contributor Author

There are two things here. While originally the discussion started with the operational credentials delegate interface being insufficient, that now has been addressed.

The other thing that came up in discussions was general non-extensibility of the commissioner. I had proposed one solution to this. The AutoCommissioner is another.

I think at this point we are considering the current commissioner implementation to be acceptable, and therefore this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants