Matter NXP Lighting Example Application#

Overview#

This reference application implements an On/Off Light device type. It uses board buttons or matter-cli for user input and LEDs for state feedback. You can use this example as a reference for creating your own application.

The example is based on Project CHIP and NXP SDK, and provides a prototype application that demonstrates device commissioning and different cluster control.

The light bulb device communicates with clients over a low-power, 802.15.4 Thread network. It can be commissioned into an existing Matter network using a controller such as chip-tool.

This example implements a User-Intent Commissioning Flow, meaning that the user is required to press a button on the device in order to get it ready for commissioning. The initial commissioning is usually performed using the ble-thread pairing method.

The Thread network dataset will be transferred on the device using a secure session over Bluetooth LE. In order to start the commissioning process, the user must enable BLE advertising on the device manually. To pair successfully, the commissioner must know the commissioning information corresponding to the device: setup passcode and/or discriminator. This data is usually encoded within a QR code or printed to the device’s UART console.

Supported Platforms#

The On/Off Light example is supported on the following platforms:

NXP platform

Dedicated readme

MCXW71

NXP MCXW71 Guide

MCXW72

NXP MCXW72 Guide

For details on platform-specific requirements and configurations, please refer to the respective platform’s readme.

A list of popular standard lighting app targets is presented below. These targets can be used with the build_example.py tool.

Target name

Description

nxp-<device>-freertos-lighting-thread-cmake-frdm

Default lighting app

nxp-<device>-freertos-lighting-thread-factory-cmake-frdm

Default lighting app with factory data

nxp-<device>-freertos-lighting-thread-rotating-id-cmake-frdm

Lighting app with rotating device id support

nxp-<device>-freertos-lighting-thread-factory-dac-conversion-cmake-frdm

Lighting app that leverages a secure enclave to secure the DAC private key

nxp-<device>-freertos-lighting-thread-sw-v2-cmake-frdm

Lighting app with software version 2 (can be used to test OTA)

nxp-<device>-freertos-lighting-thread-factory-sw-v2-cmake-frdm

Lighting app with factory data and software version 2 (can be used to test OTA)

where device is be one of the supported platforms.

Environment Setup, Building, and Testing#

All the information required to set up the environment, build the application, and test it can be found in the common readme for NXP platforms:

Data Model#

The application uses an NXP specific data model file:

Path

Description

zap/lighting-on-off.zap

Data model for On/Off Light device type

Manufacturing Data#

The support for manufacturing data is enabled at build time when you use the appropriate build configuration files for this feature. Please refer to the NXP Matter examples guide for FreeRTOS for details on the build process and available build configurations. Manufacturing data can also be forced in the build command line by using the CONFIG_CHIP_FACTORY_DATA=y build option or by using the appropriate build_examples.py targets.

For a full guide on the manufacturing flow, please refer to the Guide for writing manufacturing data on NXP devices.