Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into remove-binary-basic
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmelveilleux committed Sep 17, 2024
2 parents d6a2c97 + cc5ea19 commit 9aca28e
Show file tree
Hide file tree
Showing 89 changed files with 2,268 additions and 5,135 deletions.
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ dpkg
dropdown
dryrun
DS
DSLS
duplicative
DUT
DUTS
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ out/
/examples/virtual-device-app/android/App/buildSrc/build/
/src/test_driver/nrfconnect/build/
/src/darwin/Framework/build/
/src/python_testing/matter_testing_infrastructure/build/

# Pigweed Environment
.environment*/
Expand Down
3 changes: 2 additions & 1 deletion docs/guides/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ satisfied with the following command:
```
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
python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev \
default-jre
```

#### UI builds
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/repl/Matter_Basic_Interactions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3504,7 +3504,7 @@
"source": [
"#### Read Events:\n",
"\n",
"A `ReadEvents` API exists that behaves similarly to the `ReadAttributes` API. It permits the same degrees of wildcard expression as its counterpart and follows the same format for expressing all wildcard permutations."
"A `ReadEvent` API exists that behaves similarly to the `ReadAttribute` API. It permits the same degrees of wildcard expression as its counterpart and follows the same format for expressing all wildcard permutations."
]
},
{
Expand Down Expand Up @@ -3609,7 +3609,7 @@
"source": [
"### Subscription Interaction\n",
"\n",
"To subscribe to a Node, the same `ReadAttributes` API is used to trigger a subscription, with a valid `reportInterval` tuple passed in being used as a way to indicate the request to create a subscription."
"To subscribe to a Node, the same `ReadAttribute` API is used to trigger a subscription, with a valid `reportInterval` tuple passed in being used as a way to indicate the request to create a subscription."
]
},
{
Expand Down
1 change: 1 addition & 0 deletions examples/contact-sensor-app/nxp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ This is a list of ICD configuration gn args.
| nxp_active_mode_threshold_ms | 1000 (ms) | Active Mode Threshold value |
| nxp_icd_supported_clients_per_fabric | 2 | Registration slots per fabric |
| chip_enable_icd_lit | false | Enable LIT ICD support |
| chip_enable_icd_dsls | false | Enable LIT ICD DSLS support |
| chip_persist_subscriptions | true | Try once to re-establish subscriptions from the server side after reboot. May be disabled for LIT use case |
| chip_subscription_timeout_resumption | true | Same as above, but try to re-establish timeout out subscriptions |
| using `Fibonacci Backoff` for retries pacing. May be disabled for LIT use case |
Expand Down
2 changes: 1 addition & 1 deletion examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>
#include <src/platform/nxp/common/legacy/OTAImageProcessorImpl.h>
#include <src/platform/nxp/common/ota/OTAImageProcessorImpl.h>
#endif

#include <src/platform/nxp/k32w0/BLEManagerImpl.h>
Expand Down
20 changes: 15 additions & 5 deletions examples/contact-sensor-app/nxp/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ assert(target_os == "freertos")

example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
common_example_dir = "${chip_root}/examples/platform/nxp/common"
support_common_platform_dir =
"${nxp_sdk_matter_support_root}/examples/platform/common"

mcxw71_k32w1_sdk("sdk") {
defines = []
Expand All @@ -54,6 +56,9 @@ mcxw71_k32w1_sdk("sdk") {
# Indicate the default path to OpenThreadConfig.h
include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]

# Indicate the default path to GATT database
include_dirs += [ "${support_common_platform_dir}/ble" ]

include_dirs += [
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480",
Expand All @@ -69,6 +74,7 @@ mcxw71_k32w1_sdk("sdk") {
"${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",
"${support_common_platform_dir}/ble/ble_function_mux.c",
]

if (is_debug) {
Expand Down Expand Up @@ -104,7 +110,7 @@ mcxw71_k32w1_executable("contact_sensor_app") {
"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\"",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"",
]

if (chip_with_diag_logs_demo) {
Expand Down Expand Up @@ -141,6 +147,7 @@ mcxw71_k32w1_executable("contact_sensor_app") {
"${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}/operational_keystore/source/OperationalKeystoreS200.cpp",
"${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp",
]

Expand All @@ -149,19 +156,23 @@ mcxw71_k32w1_executable("contact_sensor_app") {
}

if (chip_with_factory_data == 1) {
include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ]
include_dirs +=
[ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
}

if (chip_enable_ota_requestor) {
defines += [
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/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" ]
include_dirs += [
"${common_example_dir}/ota_requestor/include",
"${chip_root}/src/platform/nxp/common/ota",
]
sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ]
}
Expand All @@ -183,7 +194,6 @@ mcxw71_k32w1_executable("contact_sensor_app") {
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) {
Expand Down
15 changes: 8 additions & 7 deletions examples/contact-sensor-app/nxp/k32w1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ 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 `StateValue` value |
| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) |
| button | action | state | output |
| ------ | ------------ | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| SW2 | short press | not commissioned | Enable BLE advertising |
| SW2 | short press | commissioned + device is LIT | Enable Active Mode |
| SW2 | double press | commissioned + device is LIT + supports DSLS | Enable / Disable SIT 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 `StateValue` value |
| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) |

## Building

Expand Down
1 change: 1 addition & 0 deletions examples/contact-sensor-app/nxp/k32w1/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ chip_with_lwip = false

chip_enable_icd_server = true
chip_enable_icd_lit = false
chip_enable_icd_dsls = false
icd_enforce_sit_slow_poll_limit = true
chip_persist_subscriptions = true
chip_subscription_timeout_resumption = true
Expand Down
20 changes: 15 additions & 5 deletions examples/contact-sensor-app/nxp/mcxw71/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ assert(target_os == "freertos")

example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
common_example_dir = "${chip_root}/examples/platform/nxp/common"
support_common_platform_dir =
"${nxp_sdk_matter_support_root}/examples/platform/common"

mcxw71_k32w1_sdk("sdk") {
defines = []
Expand All @@ -53,6 +55,9 @@ mcxw71_k32w1_sdk("sdk") {
# Indicate the default path to OpenThreadConfig.h
include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]

# Indicate the default path to GATT database
include_dirs += [ "${support_common_platform_dir}/ble" ]

include_dirs += [
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/MCXW716C",
Expand All @@ -68,6 +73,7 @@ mcxw71_k32w1_sdk("sdk") {
"${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",
"${support_common_platform_dir}/ble/ble_function_mux.c",
]

if (is_debug) {
Expand Down Expand Up @@ -103,7 +109,7 @@ mcxw71_k32w1_executable("contact_sensor_app") {
"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\"",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"",
]

if (chip_with_diag_logs_demo) {
Expand Down Expand Up @@ -140,6 +146,7 @@ mcxw71_k32w1_executable("contact_sensor_app") {
"${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}/operational_keystore/source/OperationalKeystoreS200.cpp",
"${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp",
]

Expand All @@ -148,19 +155,23 @@ mcxw71_k32w1_executable("contact_sensor_app") {
}

if (chip_with_factory_data == 1) {
include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ]
include_dirs +=
[ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
}

if (chip_enable_ota_requestor) {
defines += [
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/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" ]
include_dirs += [
"${common_example_dir}/ota_requestor/include",
"${chip_root}/src/platform/nxp/common/ota",
]
sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ]
}
Expand All @@ -182,7 +193,6 @@ mcxw71_k32w1_executable("contact_sensor_app") {
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ endpoint 0 {
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0x0007;
ram attribute featureMap default = 0x000F;
ram attribute clusterRevision default = 3;

handle command RegisterClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3800,7 +3800,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0007",
"defaultValue": "0x000F",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -4299,4 +4299,4 @@
"parentEndpointIdentifier": null
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E
ChipLogProgress(NotSpecified, "Successfully paired bridge device: NodeId: " ChipLogFormatX64,
ChipLogValueX64(mBridgeNodeId));

DeviceMgr().UpdateLastUsedNodeId(mBridgeNodeId);
DeviceMgr().SubscribeRemoteFabricBridge();

if (DeviceMgr().IsLocalBridgeReady())
Expand Down Expand Up @@ -180,6 +181,7 @@ void FabricSyncAddLocalBridgeCommand::OnCommissioningComplete(NodeId deviceId, C
if (err == CHIP_NO_ERROR)
{
DeviceMgr().SetLocalBridgeNodeId(mLocalBridgeNodeId);
DeviceMgr().UpdateLastUsedNodeId(mLocalBridgeNodeId);
ChipLogProgress(NotSpecified, "Successfully paired local bridge device: NodeId: " ChipLogFormatX64,
ChipLogValueX64(mLocalBridgeNodeId));
}
Expand Down
6 changes: 5 additions & 1 deletion examples/fabric-admin/device_manager/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ void DeviceManager::Init()
{
// TODO: (#34113) Init mLastUsedNodeId from chip config file
mLastUsedNodeId = 1;
mInitialized = true;

ChipLogProgress(NotSpecified, "DeviceManager initialized: last used nodeId " ChipLogFormatX64,
ChipLogValueX64(mLastUsedNodeId));
}

NodeId DeviceManager::GetNextAvailableNodeId()
Expand All @@ -61,8 +65,8 @@ void DeviceManager::UpdateLastUsedNodeId(NodeId nodeId)
{
if (nodeId > mLastUsedNodeId)
{
ChipLogProgress(NotSpecified, "Updating last used NodeId to " ChipLogFormatX64, ChipLogValueX64(nodeId));
mLastUsedNodeId = nodeId;
ChipLogProgress(NotSpecified, "Updating last used NodeId to " ChipLogFormatX64, ChipLogValueX64(mLastUsedNodeId));
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/k32w0/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>
#include <src/platform/nxp/common/legacy/OTAImageProcessorImpl.h>
#include <src/platform/nxp/common/ota/OTAImageProcessorImpl.h>
#endif

#include "DefaultTestEventTriggerDelegate.h"
Expand Down
15 changes: 11 additions & 4 deletions examples/lighting-app/nxp/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ assert(target_os == "freertos")

example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
common_example_dir = "${chip_root}/examples/platform/nxp/common"
support_common_platform_dir =
"${nxp_sdk_matter_support_root}/examples/platform/common"

mcxw71_k32w1_sdk("sdk") {
defines = []
Expand All @@ -59,6 +61,9 @@ mcxw71_k32w1_sdk("sdk") {
# Indicate the default path to OpenThreadConfig.h
include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ]

# Indicate the default path to GATT database
include_dirs += [ "${support_common_platform_dir}/ble" ]

include_dirs += [
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1",
"${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480",
Expand All @@ -74,6 +79,7 @@ mcxw71_k32w1_sdk("sdk") {
"${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",
"${support_common_platform_dir}/ble/ble_function_mux.c",
]

if (is_debug) {
Expand Down Expand Up @@ -125,7 +131,7 @@ mcxw71_k32w1_executable("light_app") {
"CONFIG_OPERATIONAL_KEYSTORE=1",
"CONFIG_ENABLE_FEEDBACK=1",
"APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"",
"EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"",
]

# App common files
Expand All @@ -148,12 +154,13 @@ mcxw71_k32w1_executable("light_app") {
"${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}/operational_keystore/source/OperationalKeystoreS200.cpp",
"${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp",
]

if (chip_enable_ota_requestor) {
defines += [
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"",
"CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/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",
Expand All @@ -174,7 +181,6 @@ mcxw71_k32w1_executable("light_app") {
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) {
Expand All @@ -186,7 +192,8 @@ mcxw71_k32w1_executable("light_app") {
}

if (chip_with_factory_data == 1) {
include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ]
include_dirs +=
[ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ]
deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ]
}

Expand Down
Loading

0 comments on commit 9aca28e

Please sign in to comment.