APP Configuration
Our samples come with default configurations. If you wish to modify the default configuration, you have three main options:
Modify build.py
This script is located at
./subsys/matter/samples/build.py
, where you can add support for new samples.The following code snippet shows the default configuration for the samples, you can modify it to switch between FTD (Full Thread Device) and MTD (Minimal Thread Device).
def TargetName(self): if self == RealtekApp.ALL_CLUSTERS: return 'matter-cli-ftd' if self == RealtekApp.LIGHT: return 'matter-cli-ftd' elif self == RealtekApp.LIGHT_SWITCH: return 'matter-cli-mtd' elif self == RealtekApp.LOCK: return 'matter-cli-mtd' elif self == RealtekApp.OTA_REQUESTOR: return 'matter-cli-ftd' elif self == RealtekApp.THERMOSTAT: return 'matter-cli-mtd' elif self == RealtekApp.WINDOW: return 'matter-cli-mtd' else: raise Exception('Unknown app type: %r' % self)
Modify CHIPProjectConfig.h
This configuration file is located at
./subsys/matter/connectedhomeip/examples/<app_name>/realtek_bee/main/include
underCHIPProjectConfig.h
and is specific to each application, whereapp_name
refers to the name of the application, such aslighting-app
.Here are some configurable options:
CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
: Spake2p keyCHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR
: Device DiscriminatorCHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
: Vendor IDCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
: Unique ID assigned by the vendor, used to identify the product or device typeCHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME
: Vendor NameCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME
: Device Model NameCHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
: Serial NumberCHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION
: Default Hardware Version NumberCHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING
: Default Hardware Version StringCHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
: Software Version Running on the DeviceCHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
: Software Version String Running on the DeviceCHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION
: Whether to use the Certification Declaration stored in the firmware; by default, it is not used.
If your device is an MTD (default is SED, which means Sleepy End Device), and needs to be configured as an SSED (Synchronized Sleepy End Device), add the following configuration item:
CHIP_DEVICE_CONFIG_THREAD_SSED
: Enable support for Thread SSED device behavior
Adjust DLPS (Deep Low Power Sleep) Configuration
For FTD devices, DLPS related configurations are invalid; for MTD devices, DLPS is enabled by default.
If you need to disable DLPS, you can change
ENABLE_DLPS
toOFF
in./subsys/openthread/CMakePresets.json
.