Skip to content

Commit

Permalink
[chip-tool] Add flag to enable server interactions
Browse files Browse the repository at this point in the history
Add "--server-interactions" flag to chip-tool which enables
server features, including advertising operational services.
This feature is needed to test persistent subscriptions
using chip-tool, which requires that chip-tool be
discoverable after the publisher node reboots.
  • Loading branch information
Damian-Nordic committed Jan 27, 2023
1 parent 4820cbd commit b3ed134
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/chip-tool/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
factoryInitParams.fabricIndependentStorage = &mDefaultStorage;
factoryInitParams.operationalKeystore = &mOperationalKeystore;
factoryInitParams.opCertStore = &mOpCertStore;
factoryInitParams.enableServerInteractions = mEnableServerInteractions.ValueOr(false);

// Init group data provider that will be used for all group keys and IPKs for the
// chip-tool-configured fabrics. This is OK to do once since the fabric tables
Expand Down
2 changes: 2 additions & 0 deletions examples/chip-tool/commands/common/CHIPCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class CHIPCommand : public Command
AddArgument("trace_decode", 0, 1, &mTraceDecode);
#endif // CHIP_CONFIG_TRANSPORT_TRACE_ENABLED
AddArgument("ble-adapter", 0, UINT16_MAX, &mBleAdapterId);
AddArgument("server-interactions", 0, 1, &mEnableServerInteractions);
}

/////////// Command Interface /////////
Expand Down Expand Up @@ -183,6 +184,7 @@ class CHIPCommand : public Command
chip::Optional<char *> mCDTrustStorePath;
chip::Optional<bool> mUseMaxSizedCerts;
chip::Optional<bool> mOnlyAllowTrustedCdKeys;
chip::Optional<bool> mEnableServerInteractions;

// Cached trust store so commands other than the original startup command
// can spin up commissioners as needed.
Expand Down

0 comments on commit b3ed134

Please sign in to comment.