Skip to content

Commit

Permalink
Initialize chip-tool vendor ID with Test Vendor1 (#11166)
Browse files Browse the repository at this point in the history
* Initialize chip-tool vendor ID with Test Vendor1

* address review comments

* Apply suggestions from code review

Co-authored-by: Evgeny Margolis <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Feb 8, 2022
1 parent 7b7a5d5 commit 0f9e1a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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 @@ -23,6 +23,7 @@
#include <credentials/DeviceAttestationVerifier.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
#include <credentials/examples/DeviceAttestationVerifierExample.h>
#include <lib/core/CHIPVendorIdentifiers.hpp>
#include <lib/support/CodeUtils.h>
#include <lib/support/ScopedBuffer.h>

Expand Down Expand Up @@ -74,6 +75,7 @@ CHIP_ERROR CHIPCommand::Run()
commissionerParams.controllerRCAC = rcacSpan;
commissionerParams.controllerICAC = icacSpan;
commissionerParams.controllerNOC = nocSpan;
commissionerParams.controllerVendorId = chip::VendorId::TestVendor1;

ReturnLogErrorOnFailure(DeviceControllerFactory::GetInstance().Init(factoryInitParams));
ReturnLogErrorOnFailure(DeviceControllerFactory::GetInstance().SetupCommissioner(commissionerParams, mController));
Expand Down
7 changes: 6 additions & 1 deletion src/lib/core/CHIPVendorIdentifiers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ namespace chip {
// CHIP Vendor Identifiers (16 bits max)
//

// As per specifications (section 2.5.2 Vendor Identifier)
enum VendorId : uint16_t
{
Common = 0x0000u,
NestLabs = 0x235Au,
GoogleNest = 0x235Au,
TestVendor1 = 0xFFF1u,
TestVendor2 = 0xFFF2u,
TestVendor3 = 0xFFF3u,
TestVendor4 = 0xFFF4u,
NotSpecified = 0xFFFFu
};

Expand Down

0 comments on commit 0f9e1a0

Please sign in to comment.