diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index d5b0401b662269..76dbbcb721cad0 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -111,6 +111,11 @@ CommissioningParameters PairingCommand::GetCommissioningParameters() break; } + if (mCountryCode.HasValue()) + { + params.SetCountryCode(CharSpan::fromCharString(mCountryCode.Value())); + } + return params; } diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index a92ec4d1c67172..0e3dd8024d09cb 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -158,6 +158,12 @@ class PairingCommand : public CHIPCommand, break; } + if (mode != PairingMode::None) + { + AddArgument("country-code", &mCountryCode, + "Country code to use to set the Basic Information cluster's Location attribute"); + } + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -203,6 +209,7 @@ class PairingCommand : public CHIPCommand, chip::Optional mSkipCommissioningComplete; chip::Optional mBypassAttestationVerifier; chip::Optional> mCASEAuthTags; + chip::Optional mCountryCode; uint16_t mRemotePort; uint16_t mDiscriminator; uint32_t mSetupPINCode;