Skip to content

Commit

Permalink
[chip-tool] Add --commissioner-fabricid parameter (#17309)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored Apr 19, 2022
1 parent 55a3a14 commit 728adc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/chip-tool/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ CHIP_ERROR CHIPCommand::InitializeCommissioner(std::string key, chip::FabricId f

ReturnLogErrorOnFailure(ephemeralKey.Initialize());
chip::NodeId nodeId = mCommissionerNodeId.ValueOr(mCommissionerStorage.GetLocalNodeId());
fabricId = mCommissionerFabricId.ValueOr(fabricId);

ReturnLogErrorOnFailure(mCredIssuerCmds->GenerateControllerNOCChain(
nodeId, fabricId, mCommissionerStorage.GetCommissionerCATs(), ephemeralKey, rcacSpan, icacSpan, nocSpan));
commissionerParams.operationalKeypair = &ephemeralKey;
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 @@ -62,6 +62,7 @@ class CHIPCommand : public Command
AddArgument("paa-trust-store-path", &mPaaTrustStorePath);
AddArgument("commissioner-name", &mCommissionerName);
AddArgument("commissioner-nodeid", 0, UINT64_MAX, &mCommissionerNodeId);
AddArgument("commissioner-fabricid", 0, UINT64_MAX, &mCommissionerNodeId);
#if CHIP_CONFIG_TRANSPORT_TRACE_ENABLED
AddArgument("trace_file", &mTraceFile);
AddArgument("trace_log", 0, 1, &mTraceLog);
Expand Down Expand Up @@ -118,6 +119,7 @@ class CHIPCommand : public Command
static std::map<std::string, std::unique_ptr<ChipDeviceCommissioner>> mCommissioners;
chip::Optional<char *> mCommissionerName;
chip::Optional<chip::NodeId> mCommissionerNodeId;
chip::Optional<chip::FabricId> mCommissionerFabricId;
chip::Optional<uint16_t> mBleAdapterId;
chip::Optional<char *> mPaaTrustStorePath;

Expand Down

0 comments on commit 728adc0

Please sign in to comment.