Skip to content

Commit

Permalink
Add port config in App Lauch with define flag. (#13073)
Browse files Browse the repository at this point in the history
* Add port config in App Lauch with define flag.

* Update examples/placeholder/linux/apps/app1/include/CHIPProjectConfig.h

Co-authored-by: Boris Zbarsky <[email protected]>

Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Feb 4, 2022
1 parent 1c83ca9 commit 95bb018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion examples/platform/linux/AppMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 95bb018

Please sign in to comment.