Skip to content

Commit

Permalink
VID/PID override in Linux Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vijs committed Jul 21, 2022
1 parent 83deb47 commit d1b526d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 4 additions & 8 deletions examples/chip-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static_library("chip-tool-utils") {
"commands/discover/DiscoverCommand.cpp",
"commands/discover/DiscoverCommissionablesCommand.cpp",
"commands/discover/DiscoverCommissionersCommand.cpp",
"commands/pairing/PairingCommand.cpp",

# TODO - enable CommissionedListCommand once DNS Cache is implemented
# "commands/pairing/CommissionedListCommand.cpp",
Expand Down Expand Up @@ -97,6 +98,7 @@ static_library("chip-tool-utils") {
"${chip_root}/src/app/tests/suites/commands/log",
"${chip_root}/src/app/tests/suites/commands/system",
"${chip_root}/src/app/tests/suites/pics",
"${chip_root}/src/controller/data_model",
"${chip_root}/src/credentials:file_attestation_trust_store",
"${chip_root}/src/lib",
"${chip_root}/src/platform",
Expand All @@ -115,15 +117,9 @@ static_library("chip-tool-utils") {
}

executable("chip-tool") {
sources = [
"commands/pairing/PairingCommand.cpp",
"main.cpp",
]
sources = [ "main.cpp" ]

deps = [
":chip-tool-utils",
"${chip_root}/src/controller/data_model",
]
deps = [ ":chip-tool-utils" ]

output_dir = root_out_dir
}
Expand Down
3 changes: 3 additions & 0 deletions src/platform/Linux/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ CHIP_ERROR ConfigurationManagerImpl::Init()
err = Internal::GenericConfigurationManagerImpl<PosixConfig>::Init();
SuccessOrExit(err);

// undo GenericDeviceInstanceInfoProvider being set as default DeviceInstanceInfoProvider
SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl());

if (!PosixConfig::ConfigValueExists(PosixConfig::kConfigKey_VendorId))
{
err = StoreVendorId(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID);
Expand Down

0 comments on commit d1b526d

Please sign in to comment.