[NXP] Add lock app example (#35536)
* [nxp][examples][platform] Add cluster-handling functions & remove RestoreState
* Add virtual cluster-handling functions that must be implemented per application
based on cluster configuration.
* Remove RestoreState as it may read attributes from cluster before the enpoints
are initialized.
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][examples][common] Implement cluster-handling functions
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][platform][mcxw71_k32w1] Add ResetInIdle functions
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][platform][common][legacy] Add SetRebootDelaySec function
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][platform][mcxw71_k32w1] Platform changes
* Add __wrap__calloc_r
* Use ProcessSetStateClusterHandler in ButtonManager
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp] Add initial lock app common files
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [nxp][examples][common][lock-app] LockApp changes needed for KW/MCX
* Add cluster-handling functions
* Put OnSubscriptionRequested override under define
* Call RestoreState in PostAttributeChangeCallback
* Call RestoreState in DoorLockClusterInitCallback
* Add FSL_OSA_MAIN_FUNC_ENABLE main_task
* Update lock-app/nxp/zap/lock-app zap files
* Include stdint
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][examples][k32w1] Remove cluster attribute and endpoint defines
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][examples][mcxw71] Remove cluster attribute and endpoint defines
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][platform][common][icd] Do not change publisher-selected maximum interval
Our code from OnSubscriptionRequested sets the publisher-selected maximum interval
to kSubscriptionMaxIntervalPublisherLimit to 60 mins which is not spec compliant,
it should be set to `Idle Mode Duration` as done in the default implementation
from src/app/ReadHandler.cpp.
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][examples][k32w1] Add LockApp examples
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp][examples][mcxw71] Add LockApp examples
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* [nxp] Add support for lock app
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* Restyled by whitespace
* Restyled by clang-format
* Restyled by gn
* Restyled by prettier-markdown
* [nxp] Fix lock app mcxw71 readme files
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* Restyled by prettier-markdown
* [nxp] Fix a typo for lighting app readme
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [nxp] Add common lock app readme file
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* Restyled by prettier-markdown
* [nxp][mcxw71] Fix lock app naming
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [nxp] Fix lock app zap files
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
---------
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
Co-authored-by: Andrei Menzopol <andrei.menzopol@nxp.com>
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml
index c0aee7f..61291fc 100644
--- a/.github/workflows/examples-nxp.yaml
+++ b/.github/workflows/examples-nxp.yaml
@@ -120,6 +120,7 @@
./scripts/build/build_examples.py \
--target nxp-k32w1-freertos-lighting \
--target nxp-k32w1-freertos-contact-sensor-low-power \
+ --target nxp-k32w1-freertos-lock-app \
build \
--copy-artifacts-to out/artifacts \
"
@@ -135,6 +136,12 @@
nxp k32w1+release contact \
out/artifacts/nxp-k32w1-freertos-contact-sensor-low-power/chip-k32w1-contact-example.elf \
/tmp/bloat_reports/
+ - name: Get lock app size stats
+ run: |
+ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
+ nxp k32w1+release lock \
+ out/artifacts/nxp-k32w1-freertos-lock-app/chip-k32w1-lock-example.elf \
+ /tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
@@ -174,6 +181,7 @@
./scripts/build/build_examples.py \
--target nxp-mcxw71-freertos-lighting \
--target nxp-mcxw71-freertos-contact-sensor-low-power \
+ --target nxp-mcxw71-freertos-lock-app \
build \
--copy-artifacts-to out/artifacts \
"
@@ -189,6 +197,12 @@
nxp mcxw71+release contact \
out/artifacts/nxp-mcxw71-freertos-contact-sensor-low-power/chip-mcxw71-contact-example.elf \
/tmp/bloat_reports/
+ - name: Get lock app size stats
+ run: |
+ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
+ nxp mcxw71+release lock \
+ out/artifacts/nxp-mcxw71-freertos-lock-app/chip-mcxw71-lock-example.elf \
+ /tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
diff --git a/examples/contact-sensor-app/nxp/common/AppTask.cpp b/examples/contact-sensor-app/nxp/common/AppTask.cpp
index f49c603..7539bc6 100644
--- a/examples/contact-sensor-app/nxp/common/AppTask.cpp
+++ b/examples/contact-sensor-app/nxp/common/AppTask.cpp
@@ -22,8 +22,15 @@
#include "PWR_Interface.h"
#endif
+#include <app-common/zap-generated/attributes/Accessors.h>
#include <platform/CHIPDeviceLayer.h>
+#ifndef APP_DEVICE_TYPE_ENDPOINT
+#define APP_DEVICE_TYPE_ENDPOINT 1
+#endif
+
+using namespace chip::app::Clusters;
+
void ContactSensorApp::AppTask::PreInitMatterStack()
{
ChipLogProgress(DeviceLayer, "Welcome to NXP Contact Sensor Demo App");
@@ -47,6 +54,24 @@
return sAppTask;
}
+bool ContactSensorApp::AppTask::CheckStateClusterHandler(void)
+{
+ bool val = false;
+ BooleanState::Attributes::StateValue::Get(APP_DEVICE_TYPE_ENDPOINT, &val);
+ return val;
+}
+
+CHIP_ERROR ContactSensorApp::AppTask::ProcessSetStateClusterHandler(void)
+{
+ bool val = false;
+ BooleanState::Attributes::StateValue::Get(APP_DEVICE_TYPE_ENDPOINT, &val);
+ auto status = BooleanState::Attributes::StateValue::Set(APP_DEVICE_TYPE_ENDPOINT, (bool) !val);
+
+ VerifyOrReturnError(status == chip::Protocols::InteractionModel::Status::Success, CHIP_ERROR_WRITE_FAILED);
+
+ return CHIP_NO_ERROR;
+}
+
chip::NXP::App::AppTaskBase & chip::NXP::App::GetAppTask()
{
return ContactSensorApp::AppTask::GetDefaultInstance();
diff --git a/examples/contact-sensor-app/nxp/common/include/AppTask.h b/examples/contact-sensor-app/nxp/common/include/AppTask.h
index 69b3ffc..407572a 100644
--- a/examples/contact-sensor-app/nxp/common/include/AppTask.h
+++ b/examples/contact-sensor-app/nxp/common/include/AppTask.h
@@ -28,6 +28,10 @@
class AppTask : public chip::NXP::App::AppTaskFreeRTOS
{
public:
+ // AppTaskBase virtual methods
+ bool CheckStateClusterHandler(void) override;
+ CHIP_ERROR ProcessSetStateClusterHandler(void) override;
+
// AppTaskFreeRTOS virtual methods
void PreInitMatterStack() override;
#if CONFIG_LOW_POWER
diff --git a/examples/contact-sensor-app/nxp/k32w1/include/config/AppConfig.h b/examples/contact-sensor-app/nxp/k32w1/include/config/AppConfig.h
index 0c8019d..89f4bf9 100644
--- a/examples/contact-sensor-app/nxp/k32w1/include/config/AppConfig.h
+++ b/examples/contact-sensor-app/nxp/k32w1/include/config/AppConfig.h
@@ -18,8 +18,6 @@
#pragma once
/* ---- App Config ---- */
-#define APP_DEVICE_TYPE_ENDPOINT 1
-#define APP_CLUSTER_ATTRIBUTE chip::app::Clusters::BooleanState::Attributes::StateValue
/* ---- Button Manager Config ---- */
#define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000
diff --git a/examples/contact-sensor-app/nxp/mcxw71/include/config/AppConfig.h b/examples/contact-sensor-app/nxp/mcxw71/include/config/AppConfig.h
index 0c8019d..89f4bf9 100644
--- a/examples/contact-sensor-app/nxp/mcxw71/include/config/AppConfig.h
+++ b/examples/contact-sensor-app/nxp/mcxw71/include/config/AppConfig.h
@@ -18,8 +18,6 @@
#pragma once
/* ---- App Config ---- */
-#define APP_DEVICE_TYPE_ENDPOINT 1
-#define APP_CLUSTER_ATTRIBUTE chip::app::Clusters::BooleanState::Attributes::StateValue
/* ---- Button Manager Config ---- */
#define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000
diff --git a/examples/lighting-app/nxp/README.md b/examples/lighting-app/nxp/README.md
index 67444a9..d611b24 100644
--- a/examples/lighting-app/nxp/README.md
+++ b/examples/lighting-app/nxp/README.md
@@ -119,9 +119,9 @@
The application uses an NXP specific data model file:
-| path | description |
-| ----------------------------- | --------------------------------------- |
-| `zap-lit/lighting-on-off.zap` | Data model for On/Off Light device type |
+| path | description |
+| ------------------------- | --------------------------------------- |
+| `zap/lighting-on-off.zap` | Data model for On/Off Light device type |
The data model can be changed by simply replacing the gn `deps` statement
corresponding to data model target.
diff --git a/examples/lighting-app/nxp/common/AppTask.cpp b/examples/lighting-app/nxp/common/AppTask.cpp
index 6bca466..095afb8 100644
--- a/examples/lighting-app/nxp/common/AppTask.cpp
+++ b/examples/lighting-app/nxp/common/AppTask.cpp
@@ -18,8 +18,15 @@
#include "AppTask.h"
+#include <app-common/zap-generated/attributes/Accessors.h>
#include <platform/CHIPDeviceLayer.h>
+#ifndef APP_DEVICE_TYPE_ENDPOINT
+#define APP_DEVICE_TYPE_ENDPOINT 1
+#endif
+
+using namespace chip::app::Clusters;
+
void LightingApp::AppTask::PreInitMatterStack()
{
ChipLogProgress(DeviceLayer, "Welcome to NXP Lighting Demo App");
@@ -31,6 +38,24 @@
return sAppTask;
}
+bool LightingApp::AppTask::CheckStateClusterHandler(void)
+{
+ bool val = false;
+ OnOff::Attributes::OnOff::Get(APP_DEVICE_TYPE_ENDPOINT, &val);
+ return val;
+}
+
+CHIP_ERROR LightingApp::AppTask::ProcessSetStateClusterHandler(void)
+{
+ bool val = false;
+ OnOff::Attributes::OnOff::Get(APP_DEVICE_TYPE_ENDPOINT, &val);
+ auto status = OnOff::Attributes::OnOff::Set(APP_DEVICE_TYPE_ENDPOINT, (bool) !val);
+
+ VerifyOrReturnError(status == chip::Protocols::InteractionModel::Status::Success, CHIP_ERROR_WRITE_FAILED);
+
+ return CHIP_NO_ERROR;
+}
+
chip::NXP::App::AppTaskBase & chip::NXP::App::GetAppTask()
{
return LightingApp::AppTask::GetDefaultInstance();
diff --git a/examples/lighting-app/nxp/common/include/AppTask.h b/examples/lighting-app/nxp/common/include/AppTask.h
index 9f73d34..a98c26a 100644
--- a/examples/lighting-app/nxp/common/include/AppTask.h
+++ b/examples/lighting-app/nxp/common/include/AppTask.h
@@ -28,6 +28,10 @@
class AppTask : public chip::NXP::App::AppTaskFreeRTOS
{
public:
+ // AppTaskBase virtual methods
+ bool CheckStateClusterHandler(void) override;
+ CHIP_ERROR ProcessSetStateClusterHandler(void) override;
+
// AppTaskFreeRTOS virtual methods
void PreInitMatterStack() override;
diff --git a/examples/lighting-app/nxp/k32w1/include/config/AppConfig.h b/examples/lighting-app/nxp/k32w1/include/config/AppConfig.h
index 6dcccf7..89f4bf9 100644
--- a/examples/lighting-app/nxp/k32w1/include/config/AppConfig.h
+++ b/examples/lighting-app/nxp/k32w1/include/config/AppConfig.h
@@ -18,8 +18,6 @@
#pragma once
/* ---- App Config ---- */
-#define APP_DEVICE_TYPE_ENDPOINT 1
-#define APP_CLUSTER_ATTRIBUTE chip::app::Clusters::OnOff::Attributes::OnOff
/* ---- Button Manager Config ---- */
#define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000
diff --git a/examples/lighting-app/nxp/mcxw71/include/config/AppConfig.h b/examples/lighting-app/nxp/mcxw71/include/config/AppConfig.h
index 6dcccf7..89f4bf9 100644
--- a/examples/lighting-app/nxp/mcxw71/include/config/AppConfig.h
+++ b/examples/lighting-app/nxp/mcxw71/include/config/AppConfig.h
@@ -18,8 +18,6 @@
#pragma once
/* ---- App Config ---- */
-#define APP_DEVICE_TYPE_ENDPOINT 1
-#define APP_CLUSTER_ATTRIBUTE chip::app::Clusters::OnOff::Attributes::OnOff
/* ---- Button Manager Config ---- */
#define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000
diff --git a/examples/lock-app/nxp/README.md b/examples/lock-app/nxp/README.md
new file mode 100644
index 0000000..c3cf4c1
--- /dev/null
+++ b/examples/lock-app/nxp/README.md
@@ -0,0 +1,133 @@
+# Matter NXP Door Lock Example Application
+
+This reference application implements an Door Lock 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:
+
+- [Matter](https://github.com/project-chip/connectedhomeip)
+- [NXP github SDK](https://github.com/nxp-mcuxpresso/mcux-sdk)
+
+- [Matter NXP Door Lock Example Application](#matter-nxp-door-lock-example-application)
+ - [Supported devices](#supported-devices)
+ - [Introduction](#introduction)
+ - [Device UI](#device-ui)
+ - [Prerequisites for building](#prerequisites-for-building)
+ - [Building](#building)
+ - [Data model](#data-model)
+ - [Manufacturing data](#manufacturing-data)
+ - [Flashing and debugging](#flashing-and-debugging)
+
+## Supported devices
+
+- [k32w1](k32w1/README.md)
+- [mcxw71](mcxw71/README.md)
+
+## Introduction
+
+The application showcases a door lock device that 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 the user has
+to press a button in order for the device to be ready for commissioning. The
+initial commissioning is done through `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 discriminator. This data is usually encoded within a
+QR code or printed to the UART console.
+
+## Device UI
+
+The example application provides a simple UI that depicts the state of the
+device and offers basic user control. This UI is implemented via the
+general-purpose LEDs and buttons built in the evaluation boards. Please see each
+supported device readme file for details.
+
+## Prerequisites for building
+
+In order to build the example, it is recommended to use a Linux distribution.
+Please visit the supported Operating Systems list in
+[BUILDING.md](../../../docs/guides/BUILDING.md#prerequisites).
+
+- Make sure that below prerequisites are correctly installed (as described in
+ [BUILDING.md](../../../docs/guides/BUILDING.md#prerequisites))
+
+```
+sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
+```
+
+- Step 1: checkout NXP specific submodules only
+
+ ```
+ user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive
+ ```
+
+- Step 2: activate local environment
+
+ ```
+ user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh
+ ```
+
+ If the script says the environment is out of date, you can update it by
+ running the following command:
+
+ ```
+ user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh
+ ```
+
+- Step 3: Init NXP SDK(s)
+
+ ```
+ user@ubuntu:~/Desktop/git/connectedhomeip$ third_party/nxp/nxp_matter_support/scripts/update_nxp_sdk.py --platform common
+ ```
+
+Note: By default, `update_nxp_sdk.py` will try to initialize all NXP SDKs.
+Please run the script with arg `--help` to view all available options.
+
+## Building
+
+There are two options for building this reference app:
+
+- Using `build_examples.py` framework.
+- Manually generating `ninja` files using `gn`.
+
+For manual generation and building, please see the specific readme file for your
+device.
+
+A list of all available contact sensor targets can be viewed in the following
+table:
+
+| target name | description |
+| ---------------------------- | ---------------- |
+| nxp-device-freertos-lock-app | Default lock app |
+
+where `device` can be one of the [Supported devices](#supported-devices).
+
+### Data model
+
+The application uses an NXP specific data model file:
+
+| path | description |
+| ------------------ | ------------------------------------ |
+| `zap/lock-app.zap` | Data model for Door Lock device type |
+
+The data model can be changed by simply replacing the gn `deps` statement
+corresponding to data model target.
+
+### Manufacturing data
+
+Use `chip_with_factory_data=1` in the gn build command to enable factory data.
+
+For a full guide on manufacturing flow, please see
+[Guide for writing manufacturing data on NXP devices](../../../docs/guides/nxp/nxp_manufacturing_flow.md).
+
+## Flashing and debugging
+
+Please see the device specific readme file.
diff --git a/examples/lock-app/nxp/common/main/AppTask.cpp b/examples/lock-app/nxp/common/main/AppTask.cpp
new file mode 100644
index 0000000..26a385e
--- /dev/null
+++ b/examples/lock-app/nxp/common/main/AppTask.cpp
@@ -0,0 +1,170 @@
+/*
+ *
+ * Copyright (c) 2021-2023 Project CHIP Authors
+ * Copyright (c) 2021 Google LLC.
+ * Copyright 2023-2024 NXP
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AppTask.h"
+#include "CHIPDeviceManager.h"
+#include "LockManager.h"
+#include <app-common/zap-generated/attributes/Accessors.h>
+#include <app/InteractionModelEngine.h>
+#include <app/clusters/door-lock-server/door-lock-server.h>
+#include <app/data-model/Nullable.h>
+#include <app/util/attribute-storage.h>
+
+#if !CHIP_CONFIG_ENABLE_ICD_SERVER
+#include "ICDUtil.h"
+#endif
+
+#ifdef ENABLE_CHIP_SHELL
+#include <lib/shell/Engine.h>
+#include <map>
+using namespace chip::Shell;
+#define MATTER_CLI_LOG(message) (streamer_printf(streamer_get(), message))
+#endif /* ENABLE_CHIP_SHELL */
+
+#ifndef APP_DEVICE_TYPE_ENDPOINT
+#define APP_DEVICE_TYPE_ENDPOINT 1
+#endif
+
+using namespace chip;
+using namespace ::chip::DeviceLayer;
+using namespace chip::app::Clusters;
+using namespace chip::app::DataModel;
+using namespace chip::Protocols::InteractionModel;
+
+#ifdef ENABLE_CHIP_SHELL
+
+static CHIP_ERROR cliDoorLock(int argc, char * argv[])
+{
+ bool inputErr = false;
+ if ((argc != 1) && (argc != 2))
+ {
+ inputErr = true;
+ goto exit;
+ }
+
+ if (!strcmp(argv[0], "open"))
+ {
+ ChipLogDetail(Shell, "Door : Set to %s state", argv[0]);
+ DoorLockServer::Instance().SetDoorState(1, DoorStateEnum::kDoorOpen);
+ }
+ else if (!strcmp(argv[0], "closed"))
+ {
+ ChipLogDetail(Shell, "Door : Set to %s state", argv[0]);
+ DoorLockServer::Instance().SetDoorState(1, DoorStateEnum::kDoorClosed);
+ }
+ else if (!strcmp(argv[0], "jammedalarm"))
+ {
+ ChipLogDetail(Shell, "Send out Lock Jammed Alarm...");
+ DoorLockServer::Instance().SendLockAlarmEvent(1, AlarmCodeEnum::kLockJammed);
+ }
+ else if (!strcmp(argv[0], "locked"))
+ {
+ ChipLogDetail(Shell, "Lock : lock set to %s state", argv[0]);
+ DoorLockServer::Instance().SetLockState(1, DlLockState::kLocked, OperationSourceEnum::kManual, NullNullable, NullNullable,
+ NullNullable, NullNullable);
+ }
+ else if (!strcmp(argv[0], "unlocked"))
+ {
+ ChipLogDetail(Shell, "Lock : lock set to %s state", argv[0]);
+ DoorLockServer::Instance().SetLockState(1, DlLockState::kUnlocked, OperationSourceEnum::kManual, NullNullable, NullNullable,
+ NullNullable, NullNullable);
+ }
+ else if (!strcmp(argv[0], "unlatched"))
+ {
+ ChipLogDetail(Shell, "Lock : lock set to %s state", argv[0]);
+ DoorLockServer::Instance().SetLockState(1, DlLockState::kUnlatched, OperationSourceEnum::kManual, NullNullable,
+ NullNullable, NullNullable, NullNullable);
+ }
+ else if (!strcmp(argv[0], "notfullylocked"))
+ {
+ ChipLogDetail(Shell, "Lock : lock set to %s state", argv[0]);
+ DoorLockServer::Instance().SetLockState(1, DlLockState::kNotFullyLocked, OperationSourceEnum::kManual, NullNullable,
+ NullNullable, NullNullable, NullNullable);
+ }
+ else
+ {
+ inputErr = true;
+ }
+exit:
+ if (inputErr)
+ {
+ return CHIP_ERROR_INVALID_ARGUMENT;
+ }
+
+ return CHIP_NO_ERROR;
+}
+#endif /* ENABLE_CHIP_SHELL */
+
+void LockApp::AppTask::PreInitMatterStack()
+{
+ ChipLogProgress(DeviceLayer, "Welcome to NXP Lock Demo App");
+}
+
+void LockApp::AppTask::PostInitMatterStack()
+{
+#if !CHIP_CONFIG_ENABLE_ICD_SERVER
+ chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&chip::NXP::App::GetICDUtil());
+#endif
+}
+
+void LockApp::AppTask::AppMatter_RegisterCustomCliCommands()
+{
+#ifdef ENABLE_CHIP_SHELL
+ /* Register application commands */
+ static const shell_command_t kCommands[] = {
+ { .cmd_func = cliDoorLock,
+ .cmd_name = "doorlock",
+ .cmd_help = "Set the Door Lock State or trigger Lock Jammed Alarm. "
+ "Usage:[open|closed|jammedalarm|locked|unlocked|notfullylocked|unlatched] " },
+ };
+ Engine::Root().RegisterCommands(kCommands, sizeof(kCommands) / sizeof(kCommands[0]));
+#endif
+}
+
+bool LockApp::AppTask::CheckStateClusterHandler(void)
+{
+ Nullable<DoorLock::DlLockState> state(DlLockState::kUnlocked);
+ DoorLock::Attributes::LockState::Get(APP_DEVICE_TYPE_ENDPOINT, state);
+ return (state.Value() == DlLockState::kUnlocked);
+}
+
+CHIP_ERROR LockApp::AppTask::ProcessSetStateClusterHandler(void)
+{
+ Nullable<DoorLock::DlLockState> state;
+ DoorLock::Attributes::LockState::Get(APP_DEVICE_TYPE_ENDPOINT, state);
+ auto newState = (state.Value() == DlLockState::kUnlocked) ? DlLockState::kLocked : DlLockState::kUnlocked;
+ auto status = DoorLock::Attributes::LockState::Set(APP_DEVICE_TYPE_ENDPOINT, newState);
+
+ VerifyOrReturnError(status == Status::Success, CHIP_ERROR_WRITE_FAILED);
+
+ return CHIP_NO_ERROR;
+}
+
+// This returns an instance of this class.
+LockApp::AppTask & LockApp::AppTask::GetDefaultInstance()
+{
+ static LockApp::AppTask sAppTask;
+ return sAppTask;
+}
+
+chip::NXP::App::AppTaskBase & chip::NXP::App::GetAppTask()
+{
+ return LockApp::AppTask::GetDefaultInstance();
+}
diff --git a/examples/lock-app/nxp/common/main/DeviceCallbacks.cpp b/examples/lock-app/nxp/common/main/DeviceCallbacks.cpp
new file mode 100644
index 0000000..440696b
--- /dev/null
+++ b/examples/lock-app/nxp/common/main/DeviceCallbacks.cpp
@@ -0,0 +1,107 @@
+/*
+ *
+ * Copyright (c) 2020-2023 Project CHIP Authors
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file DeviceCallbacks.cpp
+ *
+ * Implements all the callbacks to the application from the CHIP Stack
+ *
+ **/
+#include "DeviceCallbacks.h"
+
+#include <app-common/zap-generated/ids/Attributes.h>
+#include <app-common/zap-generated/ids/Clusters.h>
+#include <app/clusters/identify-server/identify-server.h>
+#include <app/server/Dnssd.h>
+#include <app/util/attribute-storage.h>
+#include <app/util/attribute-table.h>
+
+#include <lib/support/CodeUtils.h>
+
+#if CONFIG_ENABLE_FEEDBACK
+#include "UserInterfaceFeedback.h"
+#endif
+
+using namespace chip::app;
+void OnTriggerEffect(::Identify * identify)
+{
+ switch (identify->mCurrentEffectIdentifier)
+ {
+ case Clusters::Identify::EffectIdentifierEnum::kBlink:
+ ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink");
+ break;
+ case Clusters::Identify::EffectIdentifierEnum::kBreathe:
+ ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe");
+ break;
+ case Clusters::Identify::EffectIdentifierEnum::kOkay:
+ ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay");
+ break;
+ case Clusters::Identify::EffectIdentifierEnum::kChannelChange:
+ ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange");
+ break;
+ default:
+ ChipLogProgress(Zcl, "No identifier effect");
+ return;
+ }
+}
+
+Identify gIdentify0 = {
+ chip::EndpointId{ 0 },
+ [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); },
+ [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); },
+ chip::app::Clusters::Identify::IdentifyTypeEnum::kNone,
+ OnTriggerEffect,
+};
+
+Identify gIdentify1 = {
+ chip::EndpointId{ 1 },
+ [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); },
+ [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); },
+ chip::app::Clusters::Identify::IdentifyTypeEnum::kNone,
+ OnTriggerEffect,
+};
+
+using namespace ::chip;
+using namespace ::chip::Inet;
+using namespace ::chip::System;
+using namespace ::chip::DeviceLayer;
+using namespace chip::app::Clusters;
+
+void LockApp::DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId,
+ uint8_t type, uint16_t size, uint8_t * value)
+{
+ ChipLogProgress(DeviceLayer,
+ "endpointId " ChipLogFormatMEI " clusterId " ChipLogFormatMEI " attribute ID: " ChipLogFormatMEI
+ " Type: %u Value: %u, length %u",
+ ChipLogValueMEI(endpointId), ChipLogValueMEI(clusterId), ChipLogValueMEI(attributeId), type, *value, size);
+#if CONFIG_ENABLE_FEEDBACK
+ FeedbackMgr().RestoreState();
+#endif
+}
+
+// This returns an instance of this class.
+LockApp::DeviceCallbacks & LockApp::DeviceCallbacks::GetDefaultInstance()
+{
+ static DeviceCallbacks sDeviceCallbacks;
+ return sDeviceCallbacks;
+}
+
+chip::DeviceManager::CHIPDeviceManagerCallbacks & chip::NXP::App::GetDeviceCallbacks()
+{
+ return LockApp::DeviceCallbacks::GetDefaultInstance();
+}
diff --git a/examples/lock-app/nxp/common/main/ZclCallbacks.cpp b/examples/lock-app/nxp/common/main/ZclCallbacks.cpp
new file mode 100644
index 0000000..98fb0f8
--- /dev/null
+++ b/examples/lock-app/nxp/common/main/ZclCallbacks.cpp
@@ -0,0 +1,160 @@
+/*
+ *
+ * Copyright (c) 2021-2023 Project CHIP Authors
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <lib/support/logging/CHIPLogging.h>
+
+#include "AppTask.h"
+#include "CHIPDeviceManager.h"
+
+#include <app-common/zap-generated/ids/Attributes.h>
+#include <app-common/zap-generated/ids/Clusters.h>
+#include <app/ConcreteAttributePath.h>
+#include <app/clusters/door-lock-server/door-lock-server.h>
+#include <app/data-model/Nullable.h>
+#include <app/util/af-types.h>
+#include <lib/core/DataModelTypes.h>
+
+#include "LockManager.h"
+
+#if CONFIG_ENABLE_FEEDBACK
+#include "UserInterfaceFeedback.h"
+#endif
+
+using namespace ::chip;
+using namespace chip::app::Clusters;
+using namespace chip::app::Clusters::DoorLock;
+using chip::app::DataModel::Nullable;
+
+void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & path, uint8_t type, uint16_t size, uint8_t * value)
+{
+ chip::DeviceManager::CHIPDeviceManagerCallbacks * cb =
+ chip::DeviceManager::CHIPDeviceManager::GetInstance().GetCHIPDeviceManagerCallbacks();
+ if (cb != nullptr)
+ {
+ // propagate event to device manager
+ cb->PostAttributeChangeCallback(path.mEndpointId, path.mClusterId, path.mAttributeId, type, size, value);
+ }
+}
+
+// App handles physical aspects of locking but not locking logic. That is it
+// should wait for door to be locked on lock command and return success) but
+// door lock server should check pin before even calling the lock-door
+// callback.
+bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable<chip::FabricIndex> & fabricIdx,
+ const Nullable<chip::NodeId> & nodeId, const Optional<ByteSpan> & pinCode,
+ OperationErrorEnum & err)
+{
+ return LockManager::Instance().Lock(endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum::kRemote);
+}
+
+bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable<chip::FabricIndex> & fabricIdx,
+ const Nullable<chip::NodeId> & nodeId, const Optional<ByteSpan> & pinCode,
+ OperationErrorEnum & err)
+{
+ return LockManager::Instance().Unlock(endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum::kRemote);
+}
+
+bool emberAfPluginDoorLockOnDoorUnboltCommand(chip::EndpointId endpointId, const Nullable<chip::FabricIndex> & fabricIdx,
+ const Nullable<chip::NodeId> & nodeId, const Optional<ByteSpan> & pinCode,
+ OperationErrorEnum & err)
+{
+ return LockManager::Instance().Unbolt(endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum::kRemote);
+}
+
+bool emberAfPluginDoorLockGetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user)
+{
+ return LockManager::Instance().GetUser(endpointId, userIndex, user);
+}
+
+bool emberAfPluginDoorLockSetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator,
+ chip::FabricIndex modifier, const chip::CharSpan & userName, uint32_t uniqueId,
+ UserStatusEnum userStatus, UserTypeEnum usertype, CredentialRuleEnum credentialRule,
+ const CredentialStruct * credentials, size_t totalCredentials)
+{
+
+ return LockManager::Instance().SetUser(endpointId, userIndex, creator, modifier, userName, uniqueId, userStatus, usertype,
+ credentialRule, credentials, totalCredentials);
+}
+
+bool emberAfPluginDoorLockGetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType,
+ EmberAfPluginDoorLockCredentialInfo & credential)
+{
+ return LockManager::Instance().GetCredential(endpointId, credentialIndex, credentialType, credential);
+}
+
+bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator,
+ chip::FabricIndex modifier, DlCredentialStatus credentialStatus,
+ CredentialTypeEnum credentialType, const chip::ByteSpan & credentialData)
+{
+ return LockManager::Instance().SetCredential(endpointId, credentialIndex, creator, modifier, credentialStatus, credentialType,
+ credentialData);
+}
+
+DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex,
+ EmberAfPluginDoorLockWeekDaySchedule & schedule)
+{
+ return LockManager::Instance().GetSchedule(endpointId, weekdayIndex, userIndex, schedule);
+}
+
+DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex,
+ EmberAfPluginDoorLockHolidaySchedule & schedule)
+{
+ return LockManager::Instance().GetSchedule(endpointId, holidayIndex, schedule);
+}
+
+DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex,
+ DlScheduleStatus status, DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute,
+ uint8_t endHour, uint8_t endMinute)
+{
+ return LockManager::Instance().SetSchedule(endpointId, weekdayIndex, userIndex, status, daysMask, startHour, startMinute,
+ endHour, endMinute);
+}
+
+DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex,
+ DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime)
+{
+ return LockManager::Instance().SetSchedule(endpointId, yearDayIndex, userIndex, status, localStartTime, localEndTime);
+}
+
+DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex,
+ EmberAfPluginDoorLockYearDaySchedule & schedule)
+{
+ return LockManager::Instance().GetSchedule(endpointId, yearDayIndex, userIndex, schedule);
+}
+
+DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status,
+ uint32_t localStartTime, uint32_t localEndTime, OperatingModeEnum operatingMode)
+{
+ return LockManager::Instance().SetSchedule(endpointId, holidayIndex, status, localStartTime, localEndTime, operatingMode);
+}
+
+void emberAfDoorLockClusterInitCallback(EndpointId endpoint)
+{
+ DoorLockServer::Instance().InitServer(endpoint);
+ LockManager::Instance().InitEndpoint(endpoint);
+#if CONFIG_ENABLE_FEEDBACK
+ FeedbackMgr().RestoreState();
+#endif
+}
+
+void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId)
+{
+ // Apply the relock state in the application control
+ DoorLockServer::Instance().SetLockState(1, DlLockState::kLocked, OperationSourceEnum::kAuto, NullNullable, NullNullable,
+ NullNullable, NullNullable);
+}
diff --git a/examples/lock-app/nxp/common/main/include/AppEvent.h b/examples/lock-app/nxp/common/main/include/AppEvent.h
new file mode 100644
index 0000000..065078a
--- /dev/null
+++ b/examples/lock-app/nxp/common/main/include/AppEvent.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2020 Project CHIP Authors
+ * Copyright (c) 2021 Nest Labs, Inc.
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <cstdint>
+
+struct AppEvent;
+using EventHandler = void (*)(const AppEvent &);
+
+struct AppEvent
+{
+ enum AppEventTypes
+ {
+ kEventType_Timer = 0,
+ kEventType_TurnOn,
+ kEventType_Install,
+ };
+
+ uint16_t Type;
+
+ union
+ {
+ struct
+ {
+ void * Context;
+ } TimerEvent;
+ struct
+ {
+ uint8_t Action;
+ int32_t Actor;
+ } ClusterEvent;
+ };
+
+ EventHandler Handler;
+};
diff --git a/examples/lock-app/nxp/common/main/include/AppTask.h b/examples/lock-app/nxp/common/main/include/AppTask.h
new file mode 100644
index 0000000..ea180e1
--- /dev/null
+++ b/examples/lock-app/nxp/common/main/include/AppTask.h
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright (c) 2020 Project CHIP Authors
+ * Copyright (c) 2021-2023 Google LLC.
+ * Copyright 2024 NXP
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#if CONFIG_APP_FREERTOS_OS
+#include "AppTaskFreeRTOS.h"
+#else
+#include "AppTaskZephyr.h"
+#endif
+
+namespace LockApp {
+#if CONFIG_APP_FREERTOS_OS
+class AppTask : public chip::NXP::App::AppTaskFreeRTOS
+#else
+class AppTask : public chip::NXP::App::AppTaskZephyr
+#endif
+{
+public:
+ // AppTaskBase virtual methods
+ bool CheckStateClusterHandler(void) override;
+ CHIP_ERROR ProcessSetStateClusterHandler(void) override;
+
+ ~AppTask() override{};
+ void PostInitMatterStack(void) override;
+ void PreInitMatterStack(void) override;
+ void AppMatter_RegisterCustomCliCommands(void) override;
+ // This returns an instance of this class.
+ static AppTask & GetDefaultInstance();
+
+private:
+ static AppTask sAppTask;
+};
+} // namespace LockApp
+
+/**
+ * Returns the application-specific implementation of the AppTaskBase object.
+ *
+ * Applications can use this to gain access to features of the AppTaskBase
+ * that are specific to the selected application.
+ */
+chip::NXP::App::AppTaskBase & GetAppTask();
diff --git a/examples/lock-app/nxp/common/main/include/DeviceCallbacks.h b/examples/lock-app/nxp/common/main/include/DeviceCallbacks.h
new file mode 100644
index 0000000..9e6f1d4
--- /dev/null
+++ b/examples/lock-app/nxp/common/main/include/DeviceCallbacks.h
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright (c) 2020-2023 Project CHIP Authors
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file DeviceCallbacks.h
+ *
+ * Implementations for the DeviceManager callbacks for this application
+ *
+ **/
+
+#pragma once
+
+#include "CHIPDeviceManager.h"
+#include "CommonDeviceCallbacks.h"
+
+namespace LockApp {
+class DeviceCallbacks : public chip::NXP::App::CommonDeviceCallbacks
+{
+public:
+ // This returns an instance of this class.
+ static DeviceCallbacks & GetDefaultInstance();
+
+ void PostAttributeChangeCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId,
+ uint8_t type, uint16_t size, uint8_t * value);
+
+private:
+ void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value);
+};
+} // namespace LockApp
+
+/**
+ * Returns the application-specific implementation of the CommonDeviceCallbacks object.
+ *
+ * Applications can use this to gain access to features of the CommonDeviceCallbacks
+ * that are specific to the selected application.
+ */
+chip::DeviceManager::CHIPDeviceManagerCallbacks & GetDeviceCallbacks();
diff --git a/examples/lock-app/nxp/common/main/main.cpp b/examples/lock-app/nxp/common/main/main.cpp
new file mode 100644
index 0000000..09de048
--- /dev/null
+++ b/examples/lock-app/nxp/common/main/main.cpp
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2020 Project CHIP Authors
+ * Copyright (c) 2021-2023 Google LLC.
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// ================================================================================
+// Main Code
+// ================================================================================
+
+#include "FreeRTOS.h"
+#include <AppTask.h>
+#include <lib/core/CHIPError.h>
+#include <lib/support/logging/CHIPLogging.h>
+
+#if configAPPLICATION_ALLOCATED_HEAP
+uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE];
+#endif
+
+using namespace ::chip::DeviceLayer;
+
+#if FSL_OSA_MAIN_FUNC_ENABLE
+extern "C" void main_task(void const * argument)
+{
+ chip::DeviceLayer::PlatformMgrImpl().HardwareInit();
+ chip::NXP::App::GetAppTask().Start();
+}
+#else
+extern "C" int main(int argc, char * argv[])
+{
+ chip::DeviceLayer::PlatformMgrImpl().HardwareInit();
+ chip::NXP::App::GetAppTask().Start();
+ vTaskStartScheduler();
+}
+#endif
+
+#if (defined(configCHECK_FOR_STACK_OVERFLOW) && (configCHECK_FOR_STACK_OVERFLOW > 0))
+void vApplicationStackOverflowHook(TaskHandle_t xTask, char * pcTaskName)
+{
+ assert(0);
+}
+#endif
diff --git a/examples/lock-app/nxp/k32w1/.gn b/examples/lock-app/nxp/k32w1/.gn
new file mode 100644
index 0000000..5d6e10a
--- /dev/null
+++ b/examples/lock-app/nxp/k32w1/.gn
@@ -0,0 +1,31 @@
+# Copyright (c) 2020 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build_overrides/build.gni")
+
+# The location of the build configuration file.
+buildconfig = "${build_root}/config/BUILDCONFIG.gn"
+
+# CHIP uses angle bracket includes.
+check_system_includes = true
+
+default_args = {
+ target_cpu = "arm"
+ target_os = "freertos"
+
+ import("//args.gni")
+
+ # Import default platform configs
+ import("${chip_root}/src/platform/nxp/mcxw71_k32w1/args.gni")
+}
diff --git a/examples/lock-app/nxp/k32w1/BUILD.gn b/examples/lock-app/nxp/k32w1/BUILD.gn
new file mode 100644
index 0000000..b8b6b7f
--- /dev/null
+++ b/examples/lock-app/nxp/k32w1/BUILD.gn
@@ -0,0 +1,276 @@
+# Copyright (c) 2021 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build_overrides/chip.gni")
+import("//build_overrides/nxp_sdk.gni")
+import("//build_overrides/openthread.gni")
+
+import("${nxp_sdk_build_root}/nxp_sdk.gni")
+
+import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni")
+
+import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni")
+
+import("${chip_root}/src/crypto/crypto.gni")
+import("${chip_root}/src/platform/device.gni")
+import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni")
+
+declare_args() {
+ # Setup discriminator as argument
+ setup_discriminator = 3840
+ chip_with_diag_logs_demo = true
+}
+
+assert(current_os == "freertos")
+assert(target_os == "freertos")
+
+example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
+common_example_dir = "${chip_root}/examples/platform/nxp/common"
+
+mcxw71_k32w1_sdk("sdk") {
+ defines = []
+ include_dirs = []
+ sources = []
+
+ # Indicate the path to CHIPProjectConfig.h
+ include_dirs += [ "include/config" ]
+
+ # Indicate the default path to FreeRTOSConfig.h
+ include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ]
+
+ # Indicate the default path to OpenThreadConfig.h
+ include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]
+
+ include_dirs += [
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480",
+ ]
+
+ sources += [
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/clock_config.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/pin_mux.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_comp.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c",
+ ]
+
+ if (is_debug) {
+ defines += [ "BUILD_RELEASE=0" ]
+ } else {
+ defines += [ "BUILD_RELEASE=1" ]
+ }
+
+ defines += [
+ "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
+ ]
+
+ if (chip_key_storage == "littlefs") {
+ include_dirs += [ "${example_platform_dir}/board" ]
+ sources += [
+ "${example_platform_dir}/board/peripherals.c",
+ "${example_platform_dir}/board/peripherals.h",
+ ]
+ }
+}
+
+mcxw71_k32w1_executable("lock_app") {
+ output_name = "chip-k32w1-lock-example"
+
+ defines = []
+ deps = []
+ include_dirs = []
+ sources = []
+
+ # Defines used by common code
+ defines += [
+ "CONFIG_NET_L2_OPENTHREAD=1",
+ "CONFIG_NETWORK_LAYER_BLE=1",
+ "CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice",
+ "CONFIG_OPERATIONAL_KEYSTORE=1",
+ "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"",
+ "CONFIG_APP_FREERTOS_OS=1",
+ ]
+
+ if (chip_with_diag_logs_demo) {
+ defines += [ "CONFIG_DIAG_LOGS_DEMO=1" ]
+ }
+
+ if (chip_with_low_power == 1) {
+ defines += [ "CONFIG_LOW_POWER=1" ]
+ } else {
+ defines += [
+ "CONFIG_ENABLE_FEEDBACK=1",
+ "APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)",
+ ]
+ }
+
+ # App common files
+ include_dirs += [
+ "${common_example_dir}/icd/include",
+ "${common_example_dir}/app_task/include",
+ "${common_example_dir}/matter_button/include",
+ "${common_example_dir}/matter_cli/include",
+ "${common_example_dir}/clusters/include",
+ "${common_example_dir}/device_callbacks/include",
+ "${common_example_dir}/device_manager/include",
+ "${common_example_dir}/diagnostic_logs/include",
+ "${common_example_dir}/factory_data/include",
+ "${common_example_dir}/led_widget/include",
+ "${common_example_dir}/low_power/include",
+ "${common_example_dir}/operational_keystore/include",
+ "${common_example_dir}/ui_feedback/include",
+ ]
+
+ sources += [
+ "${common_example_dir}/app_task/source/AppTaskBase.cpp",
+ "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp",
+
+ #"${common_example_dir}/clusters/source/ZclCallbacks.cpp",
+ "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp",
+ "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp",
+ "${common_example_dir}/icd/source/ICDUtil.cpp",
+ "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp",
+ ]
+
+ if (chip_with_low_power == 1) {
+ sources += [ "${common_example_dir}/low_power/source/LowPower.cpp" ]
+ }
+
+ if (chip_with_factory_data == 1) {
+ include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ]
+ deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
+ }
+
+ if (chip_enable_matter_cli) {
+ defines += [ "ENABLE_CHIP_SHELL" ]
+ deps += [
+ "${chip_root}/examples/shell/shell_common:shell_common",
+ "${chip_root}/src/lib/shell:shell",
+ ]
+ sources += [
+ "${common_example_dir}/matter_cli/source/AppCLIBase.cpp",
+ "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp",
+ ]
+ }
+
+ if (chip_enable_ota_requestor) {
+ defines += [
+ "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
+
+ # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together.
+ "LED_MANAGER_ENABLE_STATUS_LED=0",
+ ]
+
+ include_dirs += [ "${common_example_dir}/ota_requestor/include" ]
+ sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ]
+ deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ]
+ }
+
+ if (chip_with_diag_logs_demo) {
+ sources += [
+ "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp",
+ "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp",
+ ]
+ }
+
+ # Platform specific files
+ include_dirs += [
+ "${example_platform_dir}/util",
+ "${example_platform_dir}/app/support",
+ "${example_platform_dir}/button",
+ ]
+
+ sources += [
+ "${example_platform_dir}/button/ButtonManager.cpp",
+ "${example_platform_dir}/clusters/Identify.cpp",
+ "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp",
+ ]
+
+ if (chip_enable_ota_requestor) {
+ sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ]
+ }
+
+ include_dirs += [
+ "include/config",
+ "../common/main",
+ "../common/main/include",
+ "${chip_root}/examples/lock-app/lock-common/include",
+ ]
+
+ sources += [
+ "${chip_root}/examples/lock-app/lock-common/src/LockEndpoint.cpp",
+ "${chip_root}/examples/lock-app/lock-common/src/LockManager.cpp",
+ "../common/main/AppTask.cpp",
+ "../common/main/DeviceCallbacks.cpp",
+ "../common/main/ZclCallbacks.cpp",
+ "../common/main/main.cpp",
+ ]
+
+ if (chip_with_low_power == 0) {
+ sources += [
+ "${common_example_dir}/ui_feedback/source/LedManager.cpp",
+ "${example_platform_dir}/util/LedOnOff.cpp",
+ ]
+ }
+
+ deps += [
+ "${chip_root}/examples/providers:device_info_provider",
+ "${chip_root}/src/platform/logging:default",
+ ]
+
+ deps += [ "${chip_root}/examples/lock-app/nxp/zap:zap" ]
+
+ if (chip_openthread_ftd) {
+ deps += [
+ "${openthread_root}:libopenthread-cli-ftd",
+ "${openthread_root}:libopenthread-ftd",
+ ]
+ } else {
+ deps += [
+ "${openthread_root}:libopenthread-cli-mtd",
+ "${openthread_root}:libopenthread-mtd",
+ ]
+ }
+
+ cflags = [
+ "-Wconversion",
+ "-Wno-error=format=",
+ ]
+
+ ldscript = "${nxp_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld"
+
+ inputs = [ ldscript ]
+
+ ldflags = [
+ "-Wl,--defsym=__heap_size__=0",
+ "-Wl,--defsym=__stack_size__=0x480",
+ "-Wl,-print-memory-usage",
+ "-Wl,--no-warn-rwx-segments",
+ "-T" + rebase_path(ldscript, root_build_dir),
+ ]
+
+ if (chip_with_factory_data == 1) {
+ ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ]
+ }
+
+ output_dir = root_out_dir
+}
+
+group("default") {
+ deps = [ ":lock_app" ]
+}
diff --git a/examples/lock-app/nxp/k32w1/README.md b/examples/lock-app/nxp/k32w1/README.md
new file mode 100644
index 0000000..9b3cd33
--- /dev/null
+++ b/examples/lock-app/nxp/k32w1/README.md
@@ -0,0 +1,165 @@
+# Matter K32W1 Door Lock Example Application
+
+For generic information related to door lock application, please see the
+[common README](../README.md).
+
+- [Matter K32W1 Door Lock Example Application](#matter-k32w1-door-lock-example-application)
+ - [Introduction](#introduction)
+ - [Device UI](#device-ui)
+ - [Building](#building)
+ - [Flashing](#flashing)
+ - [Flashing the `NBU` image](#flashing-the-nbu-image)
+ - [Flashing the host image](#flashing-the-host-image)
+ - [Debugging](#debugging)
+ - [OTA](#ota)
+
+## Introduction
+
+The following board was used when testing this Matter reference app for a
+`k32w1` device:
+![K32W1 EVK](../../../platform/nxp/mcxw71_k32w1/doc/images/k32w1-evk.jpg)
+
+## Device UI
+
+The state feedback is provided through LED effects:
+
+| widget | effect | description |
+| ------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------- |
+| LED2 | short flash on (50ms on/950ms off) | The device is in an unprovisioned (unpaired) state and is waiting for a commissioner to connect. |
+| LED2 | rapid even flashing (100ms period) | The device is in an unprovisioned state and a commissioner is connected via BLE. |
+| LED2 | short flash off (950ms on/50ms off) | The device is fully provisioned, but does not yet have full network (Thread) or service connectivity. |
+| LED2 | solid on | The device is fully provisioned and has full network and service connectivity. |
+| RGB LED | on | The `LockState` attribute of the `DoorLock` cluster is `Unlocked`. |
+| RGB LED | off | The `LockState` attribute of the `DoorLock` cluster is `Locked`. |
+
+NOTE: `LED2` will be disabled when OTA is used. On K32W1 EVK board, `PTB0` is
+wired to both `LED2` and CS (Chip Select) of the External Flash Memory. Since
+the OTA image is stored in external memory, `LED2` operations will affect OTA
+operation by corrupting packages and OTA will not work.
+
+The user actions are summarized below:
+
+| button | action | state | output |
+| ------ | ----------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
+| SW2 | short press | not commissioned | Enable BLE advertising |
+| SW2 | short press | commissioned + device is LIT | Enable Active Mode |
+| SW2 | long press | NA | Initiate a factory reset (can be cancelled by pressing the button again within the factory reset timeout limit - 6 seconds by default) |
+| SW3 | short press | NA | Toggle attribute `LockState` value |
+| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) |
+
+## Building
+
+Manually building requires running the following commands:
+
+```
+user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lock-app/nxp/k32w1
+user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w1$ gn gen out/debug
+user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w1$ ninja -C out/debug
+```
+
+Please note that running `gn gen out/debug` without `--args` option will use the
+default gn args values found in `args.gni`.
+
+After a successful build, the `elf` and `srec` files are found in `out/debug/`.
+See the files prefixed with `chip-k32w1-lock-example`.
+
+## Flashing
+
+Two images must be written to the board: one for the host (CM33) and one for the
+`NBU` (CM3).
+
+The image needed on the host side is the one generated in `out/debug/` while the
+one needed on the `NBU` side can be found in the downloaded NXP-SDK package at
+path -
+`middleware\wireless\ieee-802.15.4\bin\k32w1\k32w1_nbu_ble_15_4_dyn_matter.sb3`.
+
+### Flashing the `NBU` image
+
+`NBU` image should be written only when a new NXP-SDK is released.
+
+[K32W148 board quick start guide](https://www.nxp.com/document/guide/getting-started-with-the-k32w148-development-platform:GS-K32W148EVK)
+can be used for updating the `NBU/radio` core:
+
+- Section 2.5 – Get Software – install `SPSDK` (Secure Provisioning Command
+ Line Tool)
+- Section 3.3 – Updating `NBU` for Wireless examples - use the corresponding
+ `.sb3` file found in the SDK package at path
+ `middleware\wireless\ieee-802.15.4\bin\k32w1\`
+
+### Flashing the host image
+
+Host image is the one found under `out/debug/`. It should be written after each
+build process.
+
+If debugging is needed then jump directly to the [Debugging](#debugging)
+section. Otherwise, if only flashing is needed then
+[JLink 7.84b or greater](https://www.segger.com/downloads/jlink/) can be used:
+
+- Plug K32W1 to the USB port (no need to keep the SW4 button pressed while
+ doing this, e.g. ISP mode is not needed for host flashing)
+
+- Connect JLink to the device:
+
+ ```bash
+ JLinkExe -device K32W1480 -if SWD -speed 4000 -autoconnect 1
+ ```
+
+- Run the following commands:
+ ```bash
+ reset
+ halt
+ loadfile chip-k32w1-lock-example.srec
+ reset
+ go
+ quit
+ ```
+
+## Debugging
+
+One option for debugging would be to use MCUXpresso IDE.
+
+- Drag-and-drop the zip file containing the NXP SDK in the "Installed SDKs"
+ tab:
+
+![Installed SDKs](../../../platform/nxp/mcxw71_k32w1/doc/images/installed_sdks.jpg)
+
+- Import any demo application from the installed SDK:
+
+```
+Import SDK example(s).. -> choose a demo app (demo_apps -> hello_world) -> Finish
+```
+
+![Import demo](../../../platform/nxp/mcxw71_k32w1/doc/images/import_demo.jpg)
+
+- Flash the previously imported demo application on the board:
+
+```
+Right click on the application (from Project Explorer) -> Debug as -> JLink/CMSIS-DAP
+```
+
+After this step, a debug configuration specific for the K32W1 board was created.
+This debug configuration will be used later on for debugging the application
+resulted after ot-nxp compilation.
+
+- Import Matter repo in MCUXpresso IDE as Makefile Project. Use _none_ as
+ _Toolchain for Indexer Settings_:
+
+```
+File -> Import -> C/C++ -> Existing Code as Makefile Project
+```
+
+![New Project](../../../platform/nxp/mcxw71_k32w1/doc/images/new_project.jpg)
+
+- Replace the path of the existing demo application with the path of the K32W1
+ application:
+
+```
+Run -> Debug Configurations... -> C/C++ Application
+```
+
+![Debug K32W1](../../../platform/nxp/mcxw71_k32w1/doc/images/debug_k32w1.jpg)
+
+## OTA
+
+Please see
+[k32w1 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md).
diff --git a/examples/lock-app/nxp/k32w1/args.gni b/examples/lock-app/nxp/k32w1/args.gni
new file mode 100644
index 0000000..e0c41d1
--- /dev/null
+++ b/examples/lock-app/nxp/k32w1/args.gni
@@ -0,0 +1,45 @@
+# Copyright (c) 2020 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build_overrides/chip.gni")
+import("${chip_root}/config/standalone/args.gni")
+
+# SDK target. This is overridden to add our SDK app_config.h & defines.
+nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain")
+nxp_device = "K32W1480"
+
+chip_enable_ota_requestor = true
+chip_stack_lock_tracking = "fatal"
+chip_enable_ble = true
+chip_generate_link_map_file = true
+
+chip_system_config_provide_statistics = false
+chip_system_config_use_open_thread_inet_endpoints = true
+chip_with_lwip = false
+
+chip_enable_icd_server = true
+chip_enable_icd_lit = false
+icd_enforce_sit_slow_poll_limit = true
+chip_persist_subscriptions = true
+chip_subscription_timeout_resumption = true
+
+is_debug = false
+
+chip_crypto = "platform"
+chip_openthread_ftd = false
+chip_with_ot_cli = 0
+chip_enable_matter_cli = true
+
+chip_with_diag_logs_demo = true
+chip_with_low_power = 0
diff --git a/examples/lock-app/nxp/k32w1/build_overrides b/examples/lock-app/nxp/k32w1/build_overrides
new file mode 120000
index 0000000..ee19c06
--- /dev/null
+++ b/examples/lock-app/nxp/k32w1/build_overrides
@@ -0,0 +1 @@
+../../../build_overrides/
\ No newline at end of file
diff --git a/examples/lock-app/nxp/k32w1/include/config/AppConfig.h b/examples/lock-app/nxp/k32w1/include/config/AppConfig.h
new file mode 100644
index 0000000..89f4bf9
--- /dev/null
+++ b/examples/lock-app/nxp/k32w1/include/config/AppConfig.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2024 Project CHIP Authors
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+/* ---- App Config ---- */
+
+/* ---- Button Manager Config ---- */
+#define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000
+
+/* ---- LED Manager Config ---- */
+#define LED_MANAGER_STATUS_LED_INDEX 0
+#define LED_MANAGER_LIGHT_LED_INDEX 1
diff --git a/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h b/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h
new file mode 100644
index 0000000..6bb18ee
--- /dev/null
+++ b/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2020 Project CHIP Authors
+ * Copyright (c) 2020 Google LLC.
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file
+ * Example project configuration file for CHIP.
+ *
+ * This is a place to put application or project-specific overrides
+ * to the default configuration values for general CHIP features.
+ *
+ */
+
+#pragma once
+
+// Use hard-coded test certificates already embedded in generic chip code => set it to 0
+// Use real/development certificates => set it to 1 + file the provisioning section from
+// the internal flash
+#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0
+#endif
+
+#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+
+// VID/PID for product => will be used by Basic Information Cluster
+#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037
+#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA221
+
+// Set the following define to use the Certification Declaration from below and not use it stored in factory data section
+#ifndef CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION
+#define CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION 0
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION
+//-> format_version = 1
+//-> vendor_id = 0x1037
+//-> product_id_array = [ 0xA221 ]
+//-> device_type_id = 0x000A
+//-> certificate_id = "ZIG20142ZB330003-24"
+//-> security_level = 0
+//-> security_information = 0
+//-> version_number = 0x2694
+//-> certification_type = 1
+//-> dac_origin_vendor_id is not present
+//-> dac_origin_product_id is not present
+#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \
+ { \
+ 0x30, 0x81, 0xe8, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xda, 0x30, 0x81, 0xd7, \
+ 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \
+ 0x44, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x37, 0x04, 0x35, 0x15, 0x24, 0x00, \
+ 0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x21, 0xa2, 0x18, 0x24, 0x03, 0x0a, 0x2c, 0x04, 0x13, 0x5a, 0x49, \
+ 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, 0x24, 0x05, \
+ 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x76, 0x98, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, 0x01, 0x03, \
+ 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, \
+ 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, \
+ 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x21, 0x00, 0x94, 0xea, 0x03, \
+ 0xe1, 0x95, 0xdc, 0xad, 0x43, 0x99, 0xa5, 0x94, 0x68, 0x1e, 0x62, 0x5f, 0x82, 0xfa, 0x6f, 0x61, 0x9e, 0x71, 0x79, \
+ 0x63, 0x5f, 0xe5, 0x5e, 0x5d, 0xaf, 0x33, 0x91, 0xf0, 0x72, 0x02, 0x20, 0x16, 0xd1, 0x0c, 0x6f, 0x83, 0xbe, 0xbd, \
+ 0x45, 0xa5, 0x59, 0xa7, 0x13, 0x8c, 0x5c, 0xd0, 0xd1, 0x68, 0x90, 0x9b, 0x6c, 0x40, 0x12, 0x9b, 0xc3, 0x3e, 0x6e, \
+ 0x3c, 0xa6, 0x80, 0xbf, 0x7c, 0xd9 \
+ }
+
+// All remaining data will be pulled from the provisioning region of flash.
+#endif
+
+#else
+
+/**
+ * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
+ *
+ * 0xFFF1: Test vendor.
+ */
+#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1
+
+/**
+ * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
+ *
+ */
+#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005
+
+// Use a default setup PIN code if one hasn't been provisioned in flash.
+#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
+#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR
+#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
+#endif
+
+// Use a default pairing code if one hasn't been provisioned in flash.
+#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS"
+
+/**
+ * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
+ *
+ * Enables the use of a hard-coded default serial number if none
+ * is found in CHIP NV storage.
+ */
+#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
+
+#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+
+/**
+ * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION
+ *
+ * The hardware version number assigned to device or product by the device vendor. This
+ * number is scoped to the device product id, and typically corresponds to a revision of the
+ * physical device, a change to its packaging, and/or a change to its marketing presentation.
+ * This value is generally *not* incremented for device software versions.
+ */
+#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100
+
+#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING
+#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0"
+#endif
+
+/**
+ * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
+ *
+ * A string identifying the software version running on the device.
+ * CHIP currently expects the software version to be in the format
+ * {MAJOR_VERSION}.0d{MINOR_VERSION}
+ */
+#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
+#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
+#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME
+#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors"
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME
+#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App"
+#endif
+
+/**
+ * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
+ *
+ * The amount of time in miliseconds after which BLE should change his advertisements
+ * from fast interval to slow interval.
+ *
+ * 30000 (30 secondes).
+ */
+#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT (30 * 1000)
+
+/**
+ * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT
+ *
+ * The amount of time in miliseconds after which BLE advertisement should be disabled, counting
+ * from the moment of slow advertisement commencement.
+ *
+ * Defaults to 9000000 (15 minutes).
+ */
+#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000)
+
+/**
+ * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC
+ *
+ * NFC commissioning is not supported on K32W1
+ */
+#define CONFIG_CHIP_NFC_COMMISSIONING 0
+#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0
+
+/**
+ * @def CHIP_CONFIG_MAX_FABRICS
+ *
+ * @brief
+ * Maximum number of fabrics the device can participate in. Each fabric can
+ * provision the device with its unique operational credentials and manage
+ * its own access control lists.
+ */
+#define CHIP_CONFIG_MAX_FABRICS 5 // 5 is the minimum number of supported fabrics
+
+/**
+ * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER
+ *
+ * @brief Defines the maximum number of CommandHandler, limits the number of active commands transactions on server.
+ */
+#define CHIP_IM_MAX_NUM_COMMAND_HANDLER 2
+
+/**
+ * @def CHIP_IM_MAX_NUM_WRITE_HANDLER
+ *
+ * @brief Defines the maximum number of WriteHandler, limits the number of active write transactions on server.
+ */
+#define CHIP_IM_MAX_NUM_WRITE_HANDLER 2
+
+/**
+ * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE
+ *
+ * For a development build, set the default importance of events to be logged as Debug.
+ * Since debug is the lowest importance level, this means all standard, critical, info and
+ * debug importance level vi events get logged.
+ */
+#if BUILD_RELEASE
+#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production
+#else
+#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug
+#endif // BUILD_RELEASE
+
+#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1
+
+#if CONFIG_DIAG_LOGS_DEMO
+#define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER 1
+#define CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE 1024
+#endif
diff --git a/examples/lock-app/nxp/k32w1/third_party/connectedhomeip b/examples/lock-app/nxp/k32w1/third_party/connectedhomeip
new file mode 120000
index 0000000..5930783
--- /dev/null
+++ b/examples/lock-app/nxp/k32w1/third_party/connectedhomeip
@@ -0,0 +1 @@
+../../../../..
\ No newline at end of file
diff --git a/examples/lock-app/nxp/mcxw71/.gn b/examples/lock-app/nxp/mcxw71/.gn
new file mode 100644
index 0000000..5d6e10a
--- /dev/null
+++ b/examples/lock-app/nxp/mcxw71/.gn
@@ -0,0 +1,31 @@
+# Copyright (c) 2020 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build_overrides/build.gni")
+
+# The location of the build configuration file.
+buildconfig = "${build_root}/config/BUILDCONFIG.gn"
+
+# CHIP uses angle bracket includes.
+check_system_includes = true
+
+default_args = {
+ target_cpu = "arm"
+ target_os = "freertos"
+
+ import("//args.gni")
+
+ # Import default platform configs
+ import("${chip_root}/src/platform/nxp/mcxw71_k32w1/args.gni")
+}
diff --git a/examples/lock-app/nxp/mcxw71/BUILD.gn b/examples/lock-app/nxp/mcxw71/BUILD.gn
new file mode 100644
index 0000000..effa43f
--- /dev/null
+++ b/examples/lock-app/nxp/mcxw71/BUILD.gn
@@ -0,0 +1,276 @@
+# Copyright (c) 2021 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build_overrides/chip.gni")
+import("//build_overrides/nxp_sdk.gni")
+import("//build_overrides/openthread.gni")
+
+import("${nxp_sdk_build_root}/nxp_sdk.gni")
+
+import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni")
+
+import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni")
+
+import("${chip_root}/src/crypto/crypto.gni")
+import("${chip_root}/src/platform/device.gni")
+import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni")
+
+declare_args() {
+ # Setup discriminator as argument
+ setup_discriminator = 3840
+ chip_with_diag_logs_demo = true
+}
+
+assert(current_os == "freertos")
+assert(target_os == "freertos")
+
+example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
+common_example_dir = "${chip_root}/examples/platform/nxp/common"
+
+mcxw71_k32w1_sdk("sdk") {
+ defines = []
+ include_dirs = []
+ sources = []
+
+ # Indicate the path to CHIPProjectConfig.h
+ include_dirs += [ "include/config" ]
+
+ # Indicate the default path to FreeRTOSConfig.h
+ include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ]
+
+ # Indicate the default path to OpenThreadConfig.h
+ include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]
+
+ include_dirs += [
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480",
+ ]
+
+ sources += [
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/clock_config.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/pin_mux.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_comp.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c",
+ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c",
+ ]
+
+ if (is_debug) {
+ defines += [ "BUILD_RELEASE=0" ]
+ } else {
+ defines += [ "BUILD_RELEASE=1" ]
+ }
+
+ defines += [
+ "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
+ ]
+
+ if (chip_key_storage == "littlefs") {
+ include_dirs += [ "${example_platform_dir}/board" ]
+ sources += [
+ "${example_platform_dir}/board/peripherals.c",
+ "${example_platform_dir}/board/peripherals.h",
+ ]
+ }
+}
+
+mcxw71_k32w1_executable("lock_app") {
+ output_name = "chip-mcxw71-lock-example"
+
+ defines = []
+ deps = []
+ include_dirs = []
+ sources = []
+
+ # Defines used by common code
+ defines += [
+ "CONFIG_NET_L2_OPENTHREAD=1",
+ "CONFIG_NETWORK_LAYER_BLE=1",
+ "CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice",
+ "CONFIG_OPERATIONAL_KEYSTORE=1",
+ "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"",
+ "CONFIG_APP_FREERTOS_OS=1",
+ ]
+
+ if (chip_with_diag_logs_demo) {
+ defines += [ "CONFIG_DIAG_LOGS_DEMO=1" ]
+ }
+
+ if (chip_with_low_power == 1) {
+ defines += [ "CONFIG_LOW_POWER=1" ]
+ } else {
+ defines += [
+ "CONFIG_ENABLE_FEEDBACK=1",
+ "APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)",
+ ]
+ }
+
+ # App common files
+ include_dirs += [
+ "${common_example_dir}/icd/include",
+ "${common_example_dir}/app_task/include",
+ "${common_example_dir}/matter_button/include",
+ "${common_example_dir}/matter_cli/include",
+ "${common_example_dir}/clusters/include",
+ "${common_example_dir}/device_callbacks/include",
+ "${common_example_dir}/device_manager/include",
+ "${common_example_dir}/diagnostic_logs/include",
+ "${common_example_dir}/factory_data/include",
+ "${common_example_dir}/led_widget/include",
+ "${common_example_dir}/low_power/include",
+ "${common_example_dir}/operational_keystore/include",
+ "${common_example_dir}/ui_feedback/include",
+ ]
+
+ sources += [
+ "${common_example_dir}/app_task/source/AppTaskBase.cpp",
+ "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp",
+
+ #"${common_example_dir}/clusters/source/ZclCallbacks.cpp",
+ "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp",
+ "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp",
+ "${common_example_dir}/icd/source/ICDUtil.cpp",
+ "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp",
+ ]
+
+ if (chip_with_low_power == 1) {
+ sources += [ "${common_example_dir}/low_power/source/LowPower.cpp" ]
+ }
+
+ if (chip_with_factory_data == 1) {
+ include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ]
+ deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
+ }
+
+ if (chip_enable_matter_cli) {
+ defines += [ "ENABLE_CHIP_SHELL" ]
+ deps += [
+ "${chip_root}/examples/shell/shell_common:shell_common",
+ "${chip_root}/src/lib/shell:shell",
+ ]
+ sources += [
+ "${common_example_dir}/matter_cli/source/AppCLIBase.cpp",
+ "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp",
+ ]
+ }
+
+ if (chip_enable_ota_requestor) {
+ defines += [
+ "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
+
+ # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together.
+ "LED_MANAGER_ENABLE_STATUS_LED=0",
+ ]
+
+ include_dirs += [ "${common_example_dir}/ota_requestor/include" ]
+ sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ]
+ deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ]
+ }
+
+ if (chip_with_diag_logs_demo) {
+ sources += [
+ "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp",
+ "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp",
+ ]
+ }
+
+ # Platform specific files
+ include_dirs += [
+ "${example_platform_dir}/util",
+ "${example_platform_dir}/app/support",
+ "${example_platform_dir}/button",
+ ]
+
+ sources += [
+ "${example_platform_dir}/button/ButtonManager.cpp",
+ "${example_platform_dir}/clusters/Identify.cpp",
+ "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp",
+ ]
+
+ if (chip_enable_ota_requestor) {
+ sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ]
+ }
+
+ include_dirs += [
+ "include/config",
+ "../common/main",
+ "../common/main/include",
+ "${chip_root}/examples/lock-app/lock-common/include",
+ ]
+
+ sources += [
+ "${chip_root}/examples/lock-app/lock-common/src/LockEndpoint.cpp",
+ "${chip_root}/examples/lock-app/lock-common/src/LockManager.cpp",
+ "../common/main/AppTask.cpp",
+ "../common/main/DeviceCallbacks.cpp",
+ "../common/main/ZclCallbacks.cpp",
+ "../common/main/main.cpp",
+ ]
+
+ if (chip_with_low_power == 0) {
+ sources += [
+ "${common_example_dir}/ui_feedback/source/LedManager.cpp",
+ "${example_platform_dir}/util/LedOnOff.cpp",
+ ]
+ }
+
+ deps += [
+ "${chip_root}/examples/providers:device_info_provider",
+ "${chip_root}/src/platform/logging:default",
+ ]
+
+ deps += [ "${chip_root}/examples/lock-app/nxp/zap:zap" ]
+
+ if (chip_openthread_ftd) {
+ deps += [
+ "${openthread_root}:libopenthread-cli-ftd",
+ "${openthread_root}:libopenthread-ftd",
+ ]
+ } else {
+ deps += [
+ "${openthread_root}:libopenthread-cli-mtd",
+ "${openthread_root}:libopenthread-mtd",
+ ]
+ }
+
+ cflags = [
+ "-Wconversion",
+ "-Wno-error=format=",
+ ]
+
+ ldscript = "${nxp_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld"
+
+ inputs = [ ldscript ]
+
+ ldflags = [
+ "-Wl,--defsym=__heap_size__=0",
+ "-Wl,--defsym=__stack_size__=0x480",
+ "-Wl,-print-memory-usage",
+ "-Wl,--no-warn-rwx-segments",
+ "-T" + rebase_path(ldscript, root_build_dir),
+ ]
+
+ if (chip_with_factory_data == 1) {
+ ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ]
+ }
+
+ output_dir = root_out_dir
+}
+
+group("default") {
+ deps = [ ":lock_app" ]
+}
diff --git a/examples/lock-app/nxp/mcxw71/README.md b/examples/lock-app/nxp/mcxw71/README.md
new file mode 100644
index 0000000..593aed8
--- /dev/null
+++ b/examples/lock-app/nxp/mcxw71/README.md
@@ -0,0 +1,197 @@
+# Matter `MCXW71` Door Lock Example Application
+
+For generic information related to door lock application, please see the
+[common README](../README.md).
+
+- [Matter `MCXW71` Door Lock Example Application](#matter-mcxw71-door-lock-example-application)
+ - [Introduction](#introduction)
+ - [Device UI](#device-ui)
+ - [Building](#building)
+ - [Flashing](#flashing)
+ - [Flashing the `NBU` image](#flashing-the-nbu-image)
+ - [Flashing the host image](#flashing-the-host-image)
+ - [Debugging](#debugging)
+ - [OTA](#ota)
+
+## Introduction
+
+The following board was used when testing this Matter reference app for an
+`mcxw71` device:
+![FRDM-MCXW71](../../../platform/nxp/mcxw71_k32w1/doc/images/frdm-mcxw71.jpg)
+
+## Device UI
+
+The state feedback is provided through LED effects:
+
+| widget | effect | description |
+| ------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------- |
+| LED2 | short flash on (50ms on/950ms off) | The device is in an unprovisioned (unpaired) state and is waiting for a commissioner to connect. |
+| LED2 | rapid even flashing (100ms period) | The device is in an unprovisioned state and a commissioner is connected via BLE. |
+| LED2 | short flash off (950ms on/50ms off) | The device is fully provisioned, but does not yet have full network (Thread) or service connectivity. |
+| LED2 | solid on | The device is fully provisioned and has full network and service connectivity. |
+| RGB LED | on | The `LockState` attribute of the `DoorLock` cluster is `Unlocked`. |
+| RGB LED | off | The `LockState` attribute of the `DoorLock` cluster is `Locked`. |
+
+NOTE: `LED2` will be disabled when OTA is used. On `MCXW71` board, `PTB0` is
+wired to both `LED2` and CS (Chip Select) of the External Flash Memory. Since
+the OTA image is stored in external memory, `LED2` operations will affect OTA
+operation by corrupting packages and OTA will not work.
+
+The user actions are summarized below:
+
+| button | action | state | output |
+| ------ | ----------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
+| SW2 | short press | not commissioned | Enable BLE advertising |
+| SW2 | short press | commissioned + device is LIT | Enable Active Mode |
+| SW2 | long press | NA | Initiate a factory reset (can be cancelled by pressing the button again within the factory reset timeout limit - 6 seconds by default) |
+| SW3 | short press | NA | Toggle attribute `LockState` value |
+| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) |
+
+## Building
+
+Manually building requires running the following commands:
+
+```
+user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lock-app/nxp/mcxw71
+user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/mcxw71$ gn gen out/debug
+user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/mcxw71$ ninja -C out/debug
+```
+
+Please note that running `gn gen out/debug` without `--args` option will use the
+default gn args values found in `args.gni`.
+
+After a successful build, the `elf` and `srec` files are found in `out/debug/`.
+See the files prefixed with `chip-mcxw71-lock-example`.
+
+## Flashing
+
+Two images must be written to the board: one for the host (CM33) and one for the
+`NBU` (CM3).
+
+The image needed on the host side is the one generated in `out/debug/` while the
+one needed on the `NBU` side can be found in the downloaded NXP-SDK package at
+path -
+`middleware\wireless\ieee-802.15.4\bin\k32w1\k32w1_nbu_ble_15_4_dyn_matter.sb3`.
+
+### Flashing the `NBU` image
+
+`NBU` image should be written only when a new NXP SDK is released.
+
+1. Install
+ [Secure Provisioning SDK tool](https://www.nxp.com/design/design-center/software/development-software/secure-provisioning-sdk-spsdk:SPSDK)
+ using Python:
+
+ ```
+ pip install spsdk
+ ```
+
+ Note: There might be some dependencies that cause conflicts with already
+ installed Python modules. However, `blhost` tool is still installed and can
+ be used.
+
+2. Updating `NBU` for Wireless examples
+
+ It is necessary to work with the matching `NBU` image for the SDK version of
+ the application you are working with. This means that when you download your
+ SDK, prior to loading any wireless SDK example, update your `NBU` image with
+ the SDK provided binaries. For `FRDM` users, please write the following
+ binary:
+
+ `middleware\wireless\ieee-802.15.4\bin\mcxw71\mcxw71_nbu_ble_15_4_dyn_matter_<nbu_version>.sb3`
+
+ Please note that `<nbu_version>` may vary depending on the SDK version.
+
+ 1. Place your device in `ISP` mode.
+
+ - Make sure a jumper is placed on `JP25`
+ - Press and hold `SW4`, press and release Reset, then release `SW4`
+
+ 2. Once the device is connected, you may find the assigned port by running:
+
+ ```
+ nxpdevscan
+ ```
+
+ 3. Run the `blhost` command to write the `sb3` file:
+
+ ```
+ blhost -p <assigned_port> receive-sb-file <path_to_SDK>\middleware\wireless\ieee-802.15.4\bin\mcxw71\mcxw71_nbu_ble_15_4_dyn_matter_<nbu_version>.sb3
+ ```
+
+### Flashing the host image
+
+Host image is the one found under `out/debug/`. It should be written after each
+build process.
+
+If debugging is needed then jump directly to the [Debugging](#debugging)
+section. Otherwise, if only flashing is needed then
+[JLink 7.84b or greater](https://www.segger.com/downloads/jlink/) can be used:
+
+- Plug `MCXW71` to the USB port (no need to keep the `SW4` button pressed
+ while doing this, e.g. ISP mode is not needed for host flashing)
+
+- Connect JLink to the device:
+
+ ```bash
+ JLinkExe -device MCXW71 -if SWD -speed 4000 -autoconnect 1
+ ```
+
+- Run the following commands:
+ ```bash
+ reset
+ halt
+ loadfile chip-mcxw71-lock-example.srec
+ reset
+ go
+ quit
+ ```
+
+## Debugging
+
+One option for debugging would be to use MCUXpresso IDE.
+
+- Drag-and-drop the zip file containing the NXP SDK in the "Installed SDKs"
+ tab:
+
+![Installed SDKs](../../../platform/nxp/mcxw71_k32w1/doc/images/mcxw71_installed_sdks.jpg)
+
+- Import any demo application from the installed SDK:
+
+```
+Import SDK example(s).. -> choose a demo app (demo_apps -> hello_world) -> Finish
+```
+
+![Import demo](../../../platform/nxp/mcxw71_k32w1/doc/images/import_demo.jpg)
+
+- Flash the previously imported demo application on the board:
+
+```
+Right click on the application (from Project Explorer) -> Debug as -> JLink/CMSIS-DAP
+```
+
+After this step, a debug configuration specific for the `MCXW71` board was
+created. This debug configuration will be used later on for debugging the
+application resulted after ot-nxp compilation.
+
+- Import Matter repo in MCUXpresso IDE as Makefile Project. Use _none_ as
+ _Toolchain for Indexer Settings_:
+
+```
+File -> Import -> C/C++ -> Existing Code as Makefile Project
+```
+
+![New Project](../../../platform/nxp/mcxw71_k32w1/doc/images/new_project.jpg)
+
+- Replace the path of the existing demo application with the path of the
+ `MCXW71` application:
+
+```
+Run -> Debug Configurations... -> C/C++ Application
+```
+
+![Debug MCXW71](../../../platform/nxp/mcxw71_k32w1/doc/images/mcxw71_debug.jpg)
+
+## OTA
+
+Please see
+[mcxw71 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md).
diff --git a/examples/lock-app/nxp/mcxw71/args.gni b/examples/lock-app/nxp/mcxw71/args.gni
new file mode 100644
index 0000000..761b050
--- /dev/null
+++ b/examples/lock-app/nxp/mcxw71/args.gni
@@ -0,0 +1,45 @@
+# Copyright (c) 2020 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build_overrides/chip.gni")
+import("${chip_root}/config/standalone/args.gni")
+
+# SDK target. This is overridden to add our SDK app_config.h & defines.
+nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain")
+nxp_device = "MCXW716C"
+
+chip_enable_ota_requestor = true
+chip_stack_lock_tracking = "fatal"
+chip_enable_ble = true
+chip_generate_link_map_file = true
+
+chip_system_config_provide_statistics = false
+chip_system_config_use_open_thread_inet_endpoints = true
+chip_with_lwip = false
+
+chip_enable_icd_server = true
+chip_enable_icd_lit = false
+icd_enforce_sit_slow_poll_limit = true
+chip_persist_subscriptions = true
+chip_subscription_timeout_resumption = true
+
+is_debug = false
+
+chip_crypto = "platform"
+chip_openthread_ftd = false
+chip_with_ot_cli = 0
+chip_enable_matter_cli = true
+
+chip_with_diag_logs_demo = true
+chip_with_low_power = 0
diff --git a/examples/lock-app/nxp/mcxw71/build_overrides b/examples/lock-app/nxp/mcxw71/build_overrides
new file mode 120000
index 0000000..ee19c06
--- /dev/null
+++ b/examples/lock-app/nxp/mcxw71/build_overrides
@@ -0,0 +1 @@
+../../../build_overrides/
\ No newline at end of file
diff --git a/examples/lock-app/nxp/mcxw71/include/config/AppConfig.h b/examples/lock-app/nxp/mcxw71/include/config/AppConfig.h
new file mode 100644
index 0000000..89f4bf9
--- /dev/null
+++ b/examples/lock-app/nxp/mcxw71/include/config/AppConfig.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2024 Project CHIP Authors
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+/* ---- App Config ---- */
+
+/* ---- Button Manager Config ---- */
+#define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000
+
+/* ---- LED Manager Config ---- */
+#define LED_MANAGER_STATUS_LED_INDEX 0
+#define LED_MANAGER_LIGHT_LED_INDEX 1
diff --git a/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h b/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h
new file mode 100644
index 0000000..984dd98
--- /dev/null
+++ b/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2020 Project CHIP Authors
+ * Copyright (c) 2020 Google LLC.
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file
+ * Example project configuration file for CHIP.
+ *
+ * This is a place to put application or project-specific overrides
+ * to the default configuration values for general CHIP features.
+ *
+ */
+
+#pragma once
+
+// Use hard-coded test certificates already embedded in generic chip code => set it to 0
+// Use real/development certificates => set it to 1 + file the provisioning section from
+// the internal flash
+#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0
+#endif
+
+#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+
+// VID/PID for product => will be used by Basic Information Cluster
+#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037
+#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA401
+
+// Set the following define to use the Certification Declaration from below and not use it stored in factory data section
+#ifndef CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION
+#define CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION 0
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION
+//-> format_version = 1
+//-> vendor_id = 0x1037
+//-> product_id_array = [ 0xA401 ]
+//-> device_type_id = 0x0100
+//-> certificate_id = "ZIG20142ZB330003-24"
+//-> security_level = 0
+//-> security_information = 0
+//-> version_number = 0x2694
+//-> certification_type = 1
+//-> dac_origin_vendor_id is not present
+//-> dac_origin_product_id is not present
+#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \
+ { \
+ 0x30, 0x81, 0xe8, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xda, 0x30, 0x81, 0xd7, \
+ 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \
+ 0x44, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x37, 0x04, 0x35, 0x15, 0x24, 0x00, \
+ 0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x01, 0xa4, 0x18, 0x24, 0x03, 0x0a, 0x2c, 0x04, 0x13, 0x5a, 0x49, \
+ 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, 0x24, 0x05, \
+ 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x76, 0x98, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, 0x01, 0x03, \
+ 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, \
+ 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, \
+ 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x21, 0x00, 0xca, 0x6f, 0xf9, \
+ 0xae, 0x3b, 0x2f, 0xc1, 0xf4, 0x07, 0x8f, 0x6d, 0x6e, 0x3b, 0x99, 0xff, 0x98, 0x18, 0x6b, 0x6b, 0xed, 0xa0, 0x27, \
+ 0x88, 0xa4, 0x09, 0xc2, 0x0f, 0xc5, 0xa3, 0x21, 0xc2, 0x15, 0x02, 0x20, 0x67, 0x5a, 0xef, 0xe3, 0x0c, 0xcc, 0x9f, \
+ 0xcb, 0x1e, 0x45, 0xe1, 0x20, 0xf2, 0xf1, 0x14, 0x19, 0x49, 0xf7, 0x2b, 0xdd, 0x34, 0x85, 0x16, 0xbd, 0x88, 0x9c, \
+ 0xc8, 0xac, 0xd0, 0x70, 0x9e, 0x05 \
+ }
+
+// All remaining data will be pulled from the provisioning region of flash.
+#endif
+
+#else
+
+/**
+ * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
+ *
+ * 0xFFF1: Test vendor.
+ */
+#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1
+
+/**
+ * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
+ *
+ */
+#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005
+
+// Use a default setup PIN code if one hasn't been provisioned in flash.
+#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
+#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR
+#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
+#endif
+
+// Use a default pairing code if one hasn't been provisioned in flash.
+#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS"
+
+/**
+ * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
+ *
+ * Enables the use of a hard-coded default serial number if none
+ * is found in CHIP NV storage.
+ */
+#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
+
+#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
+
+/**
+ * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION
+ *
+ * The hardware version number assigned to device or product by the device vendor. This
+ * number is scoped to the device product id, and typically corresponds to a revision of the
+ * physical device, a change to its packaging, and/or a change to its marketing presentation.
+ * This value is generally *not* incremented for device software versions.
+ */
+#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100
+
+#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING
+#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0"
+#endif
+
+/**
+ * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
+ *
+ * A string identifying the software version running on the device.
+ * CHIP currently expects the software version to be in the format
+ * {MAJOR_VERSION}.0d{MINOR_VERSION}
+ */
+#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
+#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
+#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME
+#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors"
+#endif
+
+#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME
+#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App"
+#endif
+
+/**
+ * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
+ *
+ * The amount of time in miliseconds after which BLE should change his advertisements
+ * from fast interval to slow interval.
+ *
+ * 30000 (30 secondes).
+ */
+#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT (30 * 1000)
+
+/**
+ * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT
+ *
+ * The amount of time in miliseconds after which BLE advertisement should be disabled, counting
+ * from the moment of slow advertisement commencement.
+ *
+ * Defaults to 9000000 (15 minutes).
+ */
+#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000)
+
+/**
+ * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC
+ *
+ * NFC commissioning is not supported on K32W1
+ */
+#define CONFIG_CHIP_NFC_COMMISSIONING 0
+#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0
+
+/**
+ * @def CHIP_CONFIG_MAX_FABRICS
+ *
+ * @brief
+ * Maximum number of fabrics the device can participate in. Each fabric can
+ * provision the device with its unique operational credentials and manage
+ * its own access control lists.
+ */
+#define CHIP_CONFIG_MAX_FABRICS 5 // 5 is the minimum number of supported fabrics
+
+#define CHIP_DEVICE_CONFIG_ENABLE_SED 1
+
+/**
+ * @def CHIP_DEVICE_CONFIG_KVS_WEAR_STATS
+ *
+ * @brief Toggle support for key value store wear stats on or off.
+ */
+#define CHIP_DEVICE_CONFIG_KVS_WEAR_STATS 0
+
+/**
+ * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER
+ *
+ * @brief Defines the maximum number of CommandHandler, limits the number of active commands transactions on server.
+ */
+#define CHIP_IM_MAX_NUM_COMMAND_HANDLER 2
+
+/**
+ * @def CHIP_IM_MAX_NUM_WRITE_HANDLER
+ *
+ * @brief Defines the maximum number of WriteHandler, limits the number of active write transactions on server.
+ */
+#define CHIP_IM_MAX_NUM_WRITE_HANDLER 2
+
+/**
+ * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE
+ *
+ * For a development build, set the default importance of events to be logged as Debug.
+ * Since debug is the lowest importance level, this means all standard, critical, info and
+ * debug importance level vi events get logged.
+ */
+#if BUILD_RELEASE
+#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production
+#else
+#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug
+#endif // BUILD_RELEASE
+
+#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1
+
+#if CONFIG_DIAG_LOGS_DEMO
+#define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER 1
+#define CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE 1024
+#endif
diff --git a/examples/lock-app/nxp/mcxw71/third_party/connectedhomeip b/examples/lock-app/nxp/mcxw71/third_party/connectedhomeip
new file mode 120000
index 0000000..5930783
--- /dev/null
+++ b/examples/lock-app/nxp/mcxw71/third_party/connectedhomeip
@@ -0,0 +1 @@
+../../../../..
\ No newline at end of file
diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter
index 347ad97..7c39ef0 100644
--- a/examples/lock-app/nxp/zap/lock-app.matter
+++ b/examples/lock-app/nxp/zap/lock-app.matter
@@ -539,6 +539,177 @@
command MfgSpecificPing(): DefaultSuccess = 0;
}
+/** Provides an interface for providing OTA software updates */
+cluster OtaSoftwareUpdateProvider = 41 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum ApplyUpdateActionEnum : enum8 {
+ kProceed = 0;
+ kAwaitNextAction = 1;
+ kDiscontinue = 2;
+ }
+
+ enum DownloadProtocolEnum : enum8 {
+ kBDXSynchronous = 0;
+ kBDXAsynchronous = 1;
+ kHTTPS = 2;
+ kVendorSpecific = 3;
+ }
+
+ enum StatusEnum : enum8 {
+ kUpdateAvailable = 0;
+ kBusy = 1;
+ kNotAvailable = 2;
+ kDownloadProtocolNotSupported = 3;
+ }
+
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct QueryImageRequest {
+ vendor_id vendorID = 0;
+ int16u productID = 1;
+ int32u softwareVersion = 2;
+ DownloadProtocolEnum protocolsSupported[] = 3;
+ optional int16u hardwareVersion = 4;
+ optional char_string<2> location = 5;
+ optional boolean requestorCanConsent = 6;
+ optional octet_string<512> metadataForProvider = 7;
+ }
+
+ response struct QueryImageResponse = 1 {
+ StatusEnum status = 0;
+ optional int32u delayedActionTime = 1;
+ optional char_string<256> imageURI = 2;
+ optional int32u softwareVersion = 3;
+ optional char_string<64> softwareVersionString = 4;
+ optional octet_string<32> updateToken = 5;
+ optional boolean userConsentNeeded = 6;
+ optional octet_string<512> metadataForRequestor = 7;
+ }
+
+ request struct ApplyUpdateRequestRequest {
+ octet_string<32> updateToken = 0;
+ int32u newVersion = 1;
+ }
+
+ response struct ApplyUpdateResponse = 3 {
+ ApplyUpdateActionEnum action = 0;
+ int32u delayedActionTime = 1;
+ }
+
+ request struct NotifyUpdateAppliedRequest {
+ octet_string<32> updateToken = 0;
+ int32u softwareVersion = 1;
+ }
+
+ /** Determine availability of a new Software Image */
+ command QueryImage(QueryImageRequest): QueryImageResponse = 0;
+ /** Determine next action to take for a downloaded Software Image */
+ command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2;
+ /** Notify OTA Provider that an update was applied */
+ command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4;
+}
+
+/** Provides an interface for downloading and applying OTA software updates */
+cluster OtaSoftwareUpdateRequestor = 42 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum AnnouncementReasonEnum : enum8 {
+ kSimpleAnnouncement = 0;
+ kUpdateAvailable = 1;
+ kUrgentUpdateAvailable = 2;
+ }
+
+ enum ChangeReasonEnum : enum8 {
+ kUnknown = 0;
+ kSuccess = 1;
+ kFailure = 2;
+ kTimeOut = 3;
+ kDelayByProvider = 4;
+ }
+
+ enum UpdateStateEnum : enum8 {
+ kUnknown = 0;
+ kIdle = 1;
+ kQuerying = 2;
+ kDelayedOnQuery = 3;
+ kDownloading = 4;
+ kApplying = 5;
+ kDelayedOnApply = 6;
+ kRollingBack = 7;
+ kDelayedOnUserConsent = 8;
+ }
+
+ fabric_scoped struct ProviderLocation {
+ node_id providerNodeID = 1;
+ endpoint_no endpoint = 2;
+ fabric_idx fabricIndex = 254;
+ }
+
+ info event StateTransition = 0 {
+ UpdateStateEnum previousState = 0;
+ UpdateStateEnum newState = 1;
+ ChangeReasonEnum reason = 2;
+ nullable int32u targetSoftwareVersion = 3;
+ }
+
+ critical event VersionApplied = 1 {
+ int32u softwareVersion = 0;
+ int16u productID = 1;
+ }
+
+ info event DownloadError = 2 {
+ int32u softwareVersion = 0;
+ int64u bytesDownloaded = 1;
+ nullable int8u progressPercent = 2;
+ nullable int64s platformCode = 3;
+ }
+
+ attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0;
+ readonly attribute boolean updatePossible = 1;
+ readonly attribute UpdateStateEnum updateState = 2;
+ readonly attribute nullable int8u updateStateProgress = 3;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct AnnounceOTAProviderRequest {
+ node_id providerNodeID = 0;
+ vendor_id vendorID = 1;
+ AnnouncementReasonEnum announcementReason = 2;
+ optional octet_string<512> metadataForNode = 3;
+ endpoint_no endpoint = 4;
+ }
+
+ /** Announce the presence of an OTA Provider */
+ command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0;
+}
+
+/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
+ may have differing common languages, units of measurements, and numerical formatting
+ standards. As such, Nodes that visually or audibly convey information need a mechanism by which
+ they can be configured to use a user’s preferred language, units, etc */
+cluster LocalizationConfiguration = 43 {
+ revision 1; // NOTE: Default/not specifically set
+
+ attribute access(write: manage) char_string<35> activeLocale = 0;
+ readonly attribute char_string supportedLocales[] = 1;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+}
+
/** This cluster is used to manage global aspects of the Commissioning flow. */
cluster GeneralCommissioning = 48 {
revision 1; // NOTE: Default/not specifically set
@@ -810,6 +981,53 @@
command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9;
}
+/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */
+cluster DiagnosticLogs = 50 {
+ revision 1; // NOTE: Default/not specifically set
+
+ enum IntentEnum : enum8 {
+ kEndUserSupport = 0;
+ kNetworkDiag = 1;
+ kCrashLogs = 2;
+ }
+
+ enum StatusEnum : enum8 {
+ kSuccess = 0;
+ kExhausted = 1;
+ kNoLogs = 2;
+ kBusy = 3;
+ kDenied = 4;
+ }
+
+ enum TransferProtocolEnum : enum8 {
+ kResponsePayload = 0;
+ kBDX = 1;
+ }
+
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct RetrieveLogsRequestRequest {
+ IntentEnum intent = 0;
+ TransferProtocolEnum requestedProtocol = 1;
+ optional char_string<32> transferFileDesignator = 2;
+ }
+
+ response struct RetrieveLogsResponse = 1 {
+ StatusEnum status = 0;
+ long_octet_string logContent = 1;
+ optional epoch_us UTCTimeStamp = 2;
+ optional systime_us timeSinceBoot = 3;
+ }
+
+ /** Retrieving diagnostic logs from a Node */
+ command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0;
+}
+
/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
cluster GeneralDiagnostics = 51 {
revision 2;
@@ -1398,6 +1616,104 @@
fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4;
}
+/** Allows servers to ensure that listed clients are notified when a server is available for communication. */
+cluster IcdManagement = 70 {
+ revision 3;
+
+ enum ClientTypeEnum : enum8 {
+ kPermanent = 0;
+ kEphemeral = 1;
+ }
+
+ enum OperatingModeEnum : enum8 {
+ kSIT = 0;
+ kLIT = 1;
+ }
+
+ bitmap Feature : bitmap32 {
+ kCheckInProtocolSupport = 0x1;
+ kUserActiveModeTrigger = 0x2;
+ kLongIdleTimeSupport = 0x4;
+ kDynamicSitLitSupport = 0x8;
+ }
+
+ bitmap UserActiveModeTriggerBitmap : bitmap32 {
+ kPowerCycle = 0x1;
+ kSettingsMenu = 0x2;
+ kCustomInstruction = 0x4;
+ kDeviceManual = 0x8;
+ kActuateSensor = 0x10;
+ kActuateSensorSeconds = 0x20;
+ kActuateSensorTimes = 0x40;
+ kActuateSensorLightsBlink = 0x80;
+ kResetButton = 0x100;
+ kResetButtonLightsBlink = 0x200;
+ kResetButtonSeconds = 0x400;
+ kResetButtonTimes = 0x800;
+ kSetupButton = 0x1000;
+ kSetupButtonSeconds = 0x2000;
+ kSetupButtonLightsBlink = 0x4000;
+ kSetupButtonTimes = 0x8000;
+ kAppDefinedButton = 0x10000;
+ }
+
+ fabric_scoped struct MonitoringRegistrationStruct {
+ fabric_sensitive node_id checkInNodeID = 1;
+ fabric_sensitive int64u monitoredSubject = 2;
+ fabric_sensitive ClientTypeEnum clientType = 4;
+ fabric_idx fabricIndex = 254;
+ }
+
+ readonly attribute int32u idleModeDuration = 0;
+ readonly attribute int32u activeModeDuration = 1;
+ readonly attribute int16u activeModeThreshold = 2;
+ readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3;
+ readonly attribute access(read: administer) optional int32u ICDCounter = 4;
+ readonly attribute optional int16u clientsSupportedPerFabric = 5;
+ provisional readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6;
+ provisional readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7;
+ provisional readonly attribute optional OperatingModeEnum operatingMode = 8;
+ provisional readonly attribute optional int32u maximumCheckInBackOff = 9;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct RegisterClientRequest {
+ node_id checkInNodeID = 0;
+ int64u monitoredSubject = 1;
+ octet_string<16> key = 2;
+ optional octet_string<16> verificationKey = 3;
+ ClientTypeEnum clientType = 4;
+ }
+
+ response struct RegisterClientResponse = 1 {
+ int32u ICDCounter = 0;
+ }
+
+ request struct UnregisterClientRequest {
+ node_id checkInNodeID = 0;
+ optional octet_string<16> verificationKey = 1;
+ }
+
+ request struct StayActiveRequestRequest {
+ int32u stayActiveDuration = 0;
+ }
+
+ response struct StayActiveResponse = 4 {
+ int32u promisedActiveDuration = 0;
+ }
+
+ /** Register a client to the end device */
+ fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0;
+ /** Unregister a client from an end device */
+ fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
+ /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
+ command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
+}
+
/** An interface to a generic way to secure a door */
cluster DoorLock = 257 {
revision 7;
@@ -2050,8 +2366,9 @@
}
endpoint 0 {
- device type ma_rootdevice = 22, version 1;
+ device type ma_rootdevice = 22, version 2;
+ binding cluster OtaSoftwareUpdateProvider;
server cluster Descriptor {
callback attribute deviceTypeList;
@@ -2066,9 +2383,13 @@
emits event AccessControlEntryChanged;
emits event AccessControlExtensionChanged;
callback attribute acl;
+ callback attribute extension;
callback attribute subjectsPerAccessControlEntry;
callback attribute targetsPerAccessControlEntry;
callback attribute accessControlEntriesPerFabric;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
callback attribute clusterRevision;
@@ -2093,16 +2414,49 @@
callback attribute capabilityMinima;
callback attribute specificationVersion;
callback attribute maxPathsPerInvoke;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 3;
}
+ server cluster OtaSoftwareUpdateRequestor {
+ emits event StateTransition;
+ emits event VersionApplied;
+ emits event DownloadError;
+ callback attribute defaultOTAProviders;
+ ram attribute updatePossible default = 1;
+ ram attribute updateState default = 0;
+ ram attribute updateStateProgress default = 0;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 1;
+
+ handle command AnnounceOTAProvider;
+ }
+
+ server cluster LocalizationConfiguration {
+ ram attribute activeLocale;
+ callback attribute supportedLocales;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 1;
+ }
+
server cluster GeneralCommissioning {
ram attribute breadcrumb default = 0x0000000000000000;
callback attribute basicCommissioningInfo;
callback attribute regulatoryConfig;
callback attribute locationCapability;
callback attribute supportsConcurrentConnection;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
@@ -2123,8 +2477,14 @@
ram attribute lastNetworkingStatus;
ram attribute lastNetworkID;
ram attribute lastConnectErrorValue;
+ ram attribute supportedThreadFeatures;
+ ram attribute threadVersion;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
ram attribute featureMap default = 2;
- ram attribute clusterRevision default = 1;
+ ram attribute clusterRevision default = 2;
handle command ScanNetworks;
handle command ScanNetworksResponse;
@@ -2136,12 +2496,29 @@
handle command ReorderNetwork;
}
+ server cluster DiagnosticLogs {
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
+ ram attribute featureMap default = 0;
+ ram attribute clusterRevision default = 1;
+
+ handle command RetrieveLogsRequest;
+ handle command RetrieveLogsResponse;
+ }
+
server cluster GeneralDiagnostics {
emits event BootReason;
callback attribute networkInterfaces;
callback attribute rebootCount;
callback attribute upTime;
+ callback attribute activeNetworkFaults;
callback attribute testEventTriggersEnabled default = false;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
callback attribute featureMap;
callback attribute clusterRevision;
@@ -2222,6 +2599,10 @@
callback attribute channelPage0Mask;
callback attribute operationalDatasetComponents;
callback attribute activeNetworkFaultsList;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
ram attribute featureMap default = 0x000F;
ram attribute clusterRevision default = 2;
@@ -2278,16 +2659,29 @@
handle command KeySetReadAllIndices;
handle command KeySetReadAllIndicesResponse;
}
+
+ server cluster IcdManagement {
+ callback attribute idleModeDuration;
+ callback attribute activeModeDuration;
+ callback attribute activeModeThreshold;
+ callback attribute generatedCommandList;
+ callback attribute acceptedCommandList;
+ callback attribute eventList;
+ callback attribute attributeList;
+ ram attribute featureMap default = 0x0000;
+ ram attribute clusterRevision default = 1;
+ }
}
endpoint 1 {
device type ma_doorlock = 10, version 1;
server cluster Identify {
- ram attribute identifyTime default = 0x0;
+ ram attribute identifyTime default = 0x0000;
ram attribute identifyType default = 0x0;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
+ callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 4;
@@ -2303,6 +2697,7 @@
callback attribute partsList;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
+ callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
callback attribute clusterRevision;
@@ -2310,34 +2705,41 @@
server cluster DoorLock {
emits event DoorLockAlarm;
+ emits event DoorStateChange;
emits event LockOperation;
emits event LockOperationError;
emits event LockUserChange;
- ram attribute lockState;
+ persist attribute lockState default = 1;
ram attribute lockType;
ram attribute actuatorEnabled;
- ram attribute numberOfTotalUsersSupported default = 0;
+ ram attribute doorState;
+ ram attribute numberOfTotalUsersSupported default = 10;
+ ram attribute numberOfPINUsersSupported default = 10;
+ ram attribute numberOfRFIDUsersSupported default = 10;
+ ram attribute maxPINCodeLength default = 8;
+ ram attribute minPINCodeLength default = 6;
+ ram attribute maxRFIDCodeLength default = 20;
+ ram attribute minRFIDCodeLength default = 10;
ram attribute credentialRulesSupport default = 1;
+ ram attribute numberOfCredentialsSupportedPerUser default = 5;
ram attribute autoRelockTime;
- ram attribute operatingMode;
+ ram attribute operatingMode default = 0x00;
ram attribute supportedOperatingModes default = 0xFFF6;
- ram attribute expiringUserTimeout default = 1440;
+ ram attribute enableOneTouchLocking default = 0x00;
+ ram attribute enablePrivacyModeButton default = 0x00;
+ ram attribute wrongCodeEntryLimit default = 3;
+ ram attribute userCodeTemporaryDisableTime default = 10;
+ ram attribute requirePINforRemoteOperation default = 0;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
+ callback attribute eventList;
callback attribute attributeList;
- ram attribute featureMap default = 0x1000;
- ram attribute clusterRevision default = 6;
+ ram attribute featureMap default = 0x0001;
+ ram attribute clusterRevision default = 7;
handle command LockDoor;
handle command UnlockDoor;
- handle command SetUser;
- handle command GetUser;
- handle command GetUserResponse;
- handle command ClearUser;
- handle command SetCredential;
- handle command SetCredentialResponse;
- handle command GetCredentialStatus;
- handle command GetCredentialStatusResponse;
+ handle command UnlockWithTimeout;
}
}
diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap
index 70442ac..67da769 100644
--- a/examples/lock-app/nxp/zap/lock-app.zap
+++ b/examples/lock-app/nxp/zap/lock-app.zap
@@ -52,7 +52,7 @@
}
],
"deviceVersions": [
- 1
+ 2
],
"deviceIdentifiers": [
22
@@ -192,6 +192,22 @@
"reportableChange": 0
},
{
+ "name": "Extension",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "SubjectsPerAccessControlEntry",
"code": 2,
"mfgCode": null,
@@ -240,6 +256,54 @@
"reportableChange": 0
},
{
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
@@ -554,6 +618,70 @@
"reportableChange": 0
},
{
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
@@ -611,6 +739,333 @@
]
},
{
+ "name": "OTA Software Update Provider",
+ "code": 41,
+ "mfgCode": null,
+ "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER",
+ "side": "client",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "QueryImage",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "QueryImageResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "ApplyUpdateRequest",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ },
+ {
+ "name": "ApplyUpdateResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "NotifyUpdateApplied",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 0,
+ "isEnabled": 1
+ }
+ ]
+ },
+ {
+ "name": "OTA Software Update Requestor",
+ "code": 42,
+ "mfgCode": null,
+ "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "AnnounceOTAProvider",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "DefaultOTAProviders",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdatePossible",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdateState",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "UpdateStateEnum",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdateStateProgress",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ],
+ "events": [
+ {
+ "name": "StateTransition",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "VersionApplied",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "DownloadError",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ }
+ ]
+ },
+ {
+ "name": "Localization Configuration",
+ "code": 43,
+ "mfgCode": null,
+ "define": "LOCALIZATION_CONFIGURATION_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "ActiveLocale",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SupportedLocales",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
"name": "General Commissioning",
"code": 48,
"mfgCode": null,
@@ -749,6 +1204,70 @@
"reportableChange": 0
},
{
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
@@ -985,6 +1504,102 @@
"reportableChange": 0
},
{
+ "name": "SupportedThreadFeatures",
+ "code": 9,
+ "mfgCode": null,
+ "side": "server",
+ "type": "ThreadCapabilitiesBitmap",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ThreadVersion",
+ "code": 10,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
@@ -1010,7 +1625,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "1",
+ "defaultValue": "2",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
@@ -1019,6 +1634,130 @@
]
},
{
+ "name": "Diagnostic Logs",
+ "code": 50,
+ "mfgCode": null,
+ "define": "DIAGNOSTIC_LOGS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "RetrieveLogsRequest",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "isIncoming": 1,
+ "isEnabled": 1
+ },
+ {
+ "name": "RetrieveLogsResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "isIncoming": 0,
+ "isEnabled": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
"name": "General Diagnostics",
"code": 51,
"mfgCode": null,
@@ -1101,6 +1840,22 @@
"reportableChange": 0
},
{
+ "name": "ActiveNetworkFaults",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "TestEventTriggersEnabled",
"code": 8,
"mfgCode": null,
@@ -1117,6 +1872,70 @@
"reportableChange": 0
},
{
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
@@ -2254,6 +3073,70 @@
"reportableChange": 0
},
{
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
@@ -2786,12 +3669,166 @@
"reportableChange": 0
}
]
+ },
+ {
+ "name": "ICD Management",
+ "code": 70,
+ "mfgCode": null,
+ "define": "ICD_MANAGEMENT_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "attributes": [
+ {
+ "name": "IdleModeDuration",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveModeDuration",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveModeThreshold",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
}
]
},
{
"id": 2,
- "name": "Anonymous Endpoint Type",
+ "name": "MA-dimmablelight",
"deviceTypeRef": {
"code": 10,
"profileId": 259,
@@ -2852,10 +3889,10 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0x0",
+ "defaultValue": "0x0000",
"reportable": 1,
- "minInterval": 1,
- "maxInterval": 65534,
+ "minInterval": 0,
+ "maxInterval": 65344,
"reportableChange": 0
},
{
@@ -2907,6 +3944,22 @@
"reportableChange": 0
},
{
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
@@ -2950,8 +4003,8 @@
"bounded": 0,
"defaultValue": "4",
"reportable": 1,
- "minInterval": 1,
- "maxInterval": 65534,
+ "minInterval": 0,
+ "maxInterval": 65344,
"reportableChange": 0
}
]
@@ -3061,6 +4114,22 @@
"reportableChange": 0
},
{
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
@@ -3135,68 +4204,12 @@
"isEnabled": 1
},
{
- "name": "SetUser",
- "code": 26,
+ "name": "UnlockWithTimeout",
+ "code": 3,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
- },
- {
- "name": "GetUser",
- "code": 27,
- "mfgCode": null,
- "source": "client",
- "isIncoming": 1,
- "isEnabled": 1
- },
- {
- "name": "GetUserResponse",
- "code": 28,
- "mfgCode": null,
- "source": "server",
- "isIncoming": 0,
- "isEnabled": 1
- },
- {
- "name": "ClearUser",
- "code": 29,
- "mfgCode": null,
- "source": "client",
- "isIncoming": 1,
- "isEnabled": 1
- },
- {
- "name": "SetCredential",
- "code": 34,
- "mfgCode": null,
- "source": "client",
- "isIncoming": 1,
- "isEnabled": 1
- },
- {
- "name": "SetCredentialResponse",
- "code": 35,
- "mfgCode": null,
- "source": "server",
- "isIncoming": 0,
- "isEnabled": 1
- },
- {
- "name": "GetCredentialStatus",
- "code": 36,
- "mfgCode": null,
- "source": "client",
- "isIncoming": 1,
- "isEnabled": 1
- },
- {
- "name": "GetCredentialStatusResponse",
- "code": 37,
- "mfgCode": null,
- "source": "server",
- "isIncoming": 0,
- "isEnabled": 1
}
],
"attributes": [
@@ -3207,10 +4220,10 @@
"side": "server",
"type": "DlLockState",
"included": 1,
- "storageOption": "RAM",
+ "storageOption": "NVM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3249,6 +4262,22 @@
"reportableChange": 0
},
{
+ "name": "DoorState",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "DoorStateEnum",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "NumberOfTotalUsersSupported",
"code": 17,
"mfgCode": null,
@@ -3258,7 +4287,103 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": "10",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "NumberOfPINUsersSupported",
+ "code": 18,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "10",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "NumberOfRFIDUsersSupported",
+ "code": 19,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "10",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MaxPINCodeLength",
+ "code": 23,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "8",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MinPINCodeLength",
+ "code": 24,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "6",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MaxRFIDCodeLength",
+ "code": 25,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "20",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MinRFIDCodeLength",
+ "code": 26,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "10",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3281,6 +4406,22 @@
"reportableChange": 0
},
{
+ "name": "NumberOfCredentialsSupportedPerUser",
+ "code": 28,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "5",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "AutoRelockTime",
"code": 35,
"mfgCode": null,
@@ -3306,7 +4447,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": "0x00",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3329,16 +4470,80 @@
"reportableChange": 0
},
{
- "name": "ExpiringUserTimeout",
- "code": 53,
+ "name": "EnableOneTouchLocking",
+ "code": 41,
"mfgCode": null,
"side": "server",
- "type": "int16u",
+ "type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "1440",
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "EnablePrivacyModeButton",
+ "code": 43,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "WrongCodeEntryLimit",
+ "code": 48,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "3",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "UserCodeTemporaryDisableTime",
+ "code": 49,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "10",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "RequirePINforRemoteOperation",
+ "code": 51,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3377,6 +4582,22 @@
"reportableChange": 0
},
{
+ "name": "EventList",
+ "code": 65530,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": null,
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
@@ -3402,7 +4623,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0x1000",
+ "defaultValue": "0x0001",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3418,7 +4639,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "6",
+ "defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3434,6 +4655,13 @@
"included": 1
},
{
+ "name": "DoorStateChange",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
"name": "LockOperation",
"code": 2,
"mfgCode": null,
@@ -3469,7 +4697,7 @@
"parentEndpointIdentifier": null
},
{
- "endpointTypeName": "Anonymous Endpoint Type",
+ "endpointTypeName": "MA-dimmablelight",
"endpointTypeIndex": 1,
"profileId": 259,
"endpointId": 1,
diff --git a/examples/platform/nxp/common/app_task/include/AppTaskBase.h b/examples/platform/nxp/common/app_task/include/AppTaskBase.h
index 76e18df..b9348ef 100644
--- a/examples/platform/nxp/common/app_task/include/AppTaskBase.h
+++ b/examples/platform/nxp/common/app_task/include/AppTaskBase.h
@@ -177,6 +177,13 @@
virtual void SwitchCommissioningStateHandler(void);
virtual void FactoryResetHandler(void);
+ /**
+ * Cluster-handling functions
+ * Must be overridden by a child class per cluster configuration
+ */
+ virtual bool CheckStateClusterHandler(void) { return false; }
+ virtual CHIP_ERROR ProcessSetStateClusterHandler(void) { return CHIP_ERROR_NOT_IMPLEMENTED; }
+
private:
inline static chip::CommonCaseDeviceServerInitParams initParams;
diff --git a/examples/platform/nxp/common/icd/source/ICDUtil.cpp b/examples/platform/nxp/common/icd/source/ICDUtil.cpp
index 98986c4..f422817 100644
--- a/examples/platform/nxp/common/icd/source/ICDUtil.cpp
+++ b/examples/platform/nxp/common/icd/source/ICDUtil.cpp
@@ -26,17 +26,12 @@
CHIP_ERROR chip::NXP::App::ICDUtil::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler,
chip::Transport::SecureSession & aSecureSession)
{
- uint16_t agreedMaxInterval = kSubscriptionMaxIntervalPublisherLimit;
uint16_t requestedMinInterval = 0;
uint16_t requestedMaxInterval = 0;
aReadHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval);
- if (requestedMaxInterval < agreedMaxInterval)
- {
- agreedMaxInterval = requestedMaxInterval;
- }
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
chip::NXP::App::OTARequestorInitiator::Instance().gImageProcessor.SetRebootDelaySec(requestedMinInterval);
#endif
- return aReadHandler.SetMaxReportingInterval(agreedMaxInterval);
+ return CHIP_NO_ERROR;
}
diff --git a/examples/platform/nxp/common/ui_feedback/source/LedManager.cpp b/examples/platform/nxp/common/ui_feedback/source/LedManager.cpp
index ac2456f..42caeaf 100644
--- a/examples/platform/nxp/common/ui_feedback/source/LedManager.cpp
+++ b/examples/platform/nxp/common/ui_feedback/source/LedManager.cpp
@@ -61,8 +61,6 @@
#endif
/* The parameters will not be used by the dimmer init. */
lightLed.Init(LED_MANAGER_LIGHT_LED_INDEX, false);
-
- RestoreState();
}
void LedManager::DisplayInLoop()
@@ -97,7 +95,7 @@
chip::DeviceLayer::PlatformMgr().ScheduleWork([](intptr_t arg) {
bool val = false;
- APP_CLUSTER_ATTRIBUTE::Get(APP_DEVICE_TYPE_ENDPOINT, &val);
+ val = chip::NXP::App::GetAppTask().CheckStateClusterHandler();
if (val)
LightingMgr().ApplyTurnOn();
else
diff --git a/examples/platform/nxp/mcxw71_k32w1/app/support/Memconfig.cpp b/examples/platform/nxp/mcxw71_k32w1/app/support/Memconfig.cpp
index e05281f..f3f820d 100644
--- a/examples/platform/nxp/mcxw71_k32w1/app/support/Memconfig.cpp
+++ b/examples/platform/nxp/mcxw71_k32w1/app/support/Memconfig.cpp
@@ -135,4 +135,9 @@
return __wrap_realloc(ptr, new_size);
}
+void * __wrap__calloc_r(void * REENT, size_t num, size_t size)
+{
+ return __wrap_calloc(num, size);
+}
+
} // extern "C"
diff --git a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp
index 47e5f9f..09b0546 100644
--- a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp
+++ b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp
@@ -144,10 +144,8 @@
{
chip::DeviceLayer::PlatformMgr().ScheduleWork(
[](intptr_t arg) {
- bool val = false;
- APP_CLUSTER_ATTRIBUTE::Get(APP_DEVICE_TYPE_ENDPOINT, &val);
- auto status = APP_CLUSTER_ATTRIBUTE::Set(APP_DEVICE_TYPE_ENDPOINT, (bool) !val);
- if (status != chip::Protocols::InteractionModel::Status::Success)
+ auto status = chip::NXP::App::GetAppTask().ProcessSetStateClusterHandler();
+ if (status != CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Error when updating cluster attribute");
}
diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py
index d0a7e38..ca11100 100755
--- a/scripts/build/build/targets.py
+++ b/scripts/build/build/targets.py
@@ -522,6 +522,7 @@
target.AppendFixedTargets([
TargetPart('lighting', app=NxpApp.LIGHTING).OnlyIfRe('(k32w0|k32w1|mcxw71)'),
TargetPart('contact-sensor', app=NxpApp.CONTACT).OnlyIfRe('(k32w0|k32w1|mcxw71)'),
+ TargetPart('lock-app', app=NxpApp.LOCK_APP).OnlyIfRe('(k32w1|mcxw71)'),
TargetPart('all-clusters', app=NxpApp.ALLCLUSTERS).OnlyIfRe('rw61x'),
TargetPart('laundry-washer', app=NxpApp.LAUNDRYWASHER).OnlyIfRe('rw61x'),
TargetPart('thermostat', app=NxpApp.THERMOSTAT).OnlyIfRe('rw61x')
diff --git a/scripts/build/builders/nxp.py b/scripts/build/builders/nxp.py
index 1124a03..81dc425 100644
--- a/scripts/build/builders/nxp.py
+++ b/scripts/build/builders/nxp.py
@@ -77,6 +77,7 @@
ALLCLUSTERS = auto()
LAUNDRYWASHER = auto()
THERMOSTAT = auto()
+ LOCK_APP = auto()
def ExampleName(self):
if self == NxpApp.LIGHTING:
@@ -89,6 +90,8 @@
return "laundry-washer-app"
elif self == NxpApp.THERMOSTAT:
return "thermostat"
+ elif self == NxpApp.LOCK_APP:
+ return "lock-app"
else:
raise Exception('Unknown app type: %r' % self)
@@ -103,6 +106,8 @@
return "laundry-washer-example"
elif self == NxpApp.THERMOSTAT:
return "thermostat-example"
+ elif self == NxpApp.LOCK_APP:
+ return "lock-example"
else:
raise Exception('Unknown app type: %r' % self)
diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt
index d7a834d..b177abf 100644
--- a/scripts/build/testdata/all_targets_linux_x64.txt
+++ b/scripts/build/testdata/all_targets_linux_x64.txt
@@ -13,7 +13,7 @@
linux-x64-efr32-test-runner[-clang]
imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release]
infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage][-trustm]
-nxp-{k32w0,k32w1,rw61x,mcxw71}-{zephyr,freertos}-{lighting,contact-sensor,all-clusters,laundry-washer,thermostat}[-factory][-low-power][-lit][-fro32k][-smu2][-dac-conversion][-rotating-id][-sw-v2][-ota][-wifi][-thread][-matter-shell]
+nxp-{k32w0,k32w1,rw61x,mcxw71}-{zephyr,freertos}-{lighting,contact-sensor,lock-app,all-clusters,laundry-washer,thermostat}[-factory][-low-power][-lit][-fro32k][-smu2][-dac-conversion][-rotating-id][-sw-v2][-ota][-wifi][-thread][-matter-shell]
mbed-cy8cproto_062_4343w-{lock,light,all-clusters,all-clusters-minimal,pigweed,ota-requestor,shell}[-release][-develop][-debug]
mw320-all-clusters-app
nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,lock,light,light-switch,shell,pump,pump-controller,window-covering}[-rpc]
diff --git a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp b/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp
index 249b51b..c26a7da 100644
--- a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp
+++ b/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp
@@ -205,6 +205,11 @@
return CHIP_NO_ERROR;
}
+void OTAImageProcessorImpl::SetRebootDelaySec(uint16_t rebootDelay)
+{
+ mDelayBeforeRebootSec = rebootDelay;
+}
+
void OTAImageProcessorImpl::HandleAbort(intptr_t context)
{
ChipLogError(SoftwareUpdate, "OTA was aborted");
diff --git a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h b/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h
index a306770..9a862a7 100644
--- a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h
+++ b/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h
@@ -73,6 +73,7 @@
CHIP_ERROR SelectProcessor(ByteSpan & block);
CHIP_ERROR RegisterProcessor(uint32_t tag, OTATlvProcessor * processor);
Optional<ProviderLocation> & GetBackupProvider() { return mBackupProviderLocation; }
+ void SetRebootDelaySec(uint16_t rebootDelay);
static void FetchNextData(uint32_t context);
static OTAImageProcessorImpl & GetDefaultInstance();
@@ -109,6 +110,7 @@
OTADataAccumulator mAccumulator;
std::map<uint32_t, OTATlvProcessor *> mProcessorMap;
Optional<ProviderLocation> mBackupProviderLocation;
+ uint16_t mDelayBeforeRebootSec = 0;
};
} // namespace chip
diff --git a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp
index 9a52321..3c1e39b 100644
--- a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp
+++ b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp
@@ -103,6 +103,32 @@
HAL_ResetMCU();
}
+void PlatformManagerImpl::ScheduleResetInIdle(void)
+{
+ resetInIdle = true;
+}
+
+bool PlatformManagerImpl::GetResetInIdleValue(void)
+{
+ return resetInIdle;
+}
+
+extern "C" void initiateResetInIdle(void)
+{
+ PlatformMgr().Shutdown();
+ PlatformMgrImpl().ScheduleResetInIdle();
+}
+
+extern "C" void scheduleResetInIdle(void)
+{
+ PlatformMgrImpl().ScheduleResetInIdle();
+}
+
+extern "C" bool getResetInIdleValue(void)
+{
+ return PlatformMgrImpl().GetResetInIdleValue();
+}
+
static int app_entropy_source(void * data, unsigned char * output, size_t len, size_t * olen)
{
otError otErr = otPlatEntropyGet(output, (uint16_t) len);
diff --git a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h
index ae1ef0a..5887908 100644
--- a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h
+++ b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h
@@ -53,6 +53,8 @@
CHIP_ERROR ServiceInit(void);
void CleanReset();
void StopBLEConnectivity() {}
+ void ScheduleResetInIdle(void);
+ bool GetResetInIdleValue(void);
private:
// ===== Methods that implement the PlatformManager abstract interface.
@@ -68,6 +70,7 @@
System::Clock::Timestamp mStartTime = System::Clock::kZero;
+ bool resetInIdle = false;
static PlatformManagerImpl sInstance;
using Internal::GenericPlatformManagerImpl_FreeRTOS<PlatformManagerImpl>::PostEventFromISR;