APP Configuration

Our samples come with default configurations. If you wish to modify the default configuration, you have three main options:

  1. 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)
    
  2. Modify CHIPProjectConfig.h

    • This configuration file is located at ./subsys/matter/connectedhomeip/examples/<app_name>/realtek_bee/main/include under CHIPProjectConfig.h and is specific to each application, where app_name refers to the name of the application, such as lighting-app.

    • Here are some configurable options:

      • CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE: Spake2p key

      • CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR: Device Discriminator

      • CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID: Vendor ID

      • CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID: Unique ID assigned by the vendor, used to identify the product or device type

      • CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME: Vendor Name

      • CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME: Device Model Name

      • CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER: Serial Number

      • CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION: Default Hardware Version Number

      • CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING: Default Hardware Version String

      • CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION: Software Version Running on the Device

      • CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING: Software Version String Running on the Device

      • CHIP_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

  3. 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 to OFF in ./subsys/openthread/CMakePresets.json.