diff --git a/examples/placeholder/linux/apps/app1/include/CHIPProjectConfig.h b/examples/placeholder/linux/apps/app1/include/CHIPProjectConfig.h index 39c726c4005419..fb211fc25f4d95 100644 --- a/examples/placeholder/linux/apps/app1/include/CHIPProjectConfig.h +++ b/examples/placeholder/linux/apps/app1/include/CHIPProjectConfig.h @@ -31,3 +31,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF02 #define CHIP_PORT 5542 + +// Allows app options (ports) to be configured on launch of app. +#define CHIP_DEVICE_ENABLE_PORT_PARAMS 1 diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 9030459ed7d7b9..e6fbd495fb2ee9 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -401,7 +401,7 @@ void ChipLinuxAppMainLoop() uint16_t securePort = CHIP_PORT; uint16_t unsecurePort = CHIP_UDC_PORT; -#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE +#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE || CHIP_DEVICE_ENABLE_PORT_PARAMS // use a different service port to make testing possible with other sample devices running on same host securePort = LinuxDeviceOptions::GetInstance().securedDevicePort; unsecurePort = LinuxDeviceOptions::GetInstance().unsecuredCommissionerPort;