diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 2b412e439a897d..74cb2bb7141dbe 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -88,7 +88,6 @@ target_sources(app PRIVATE ${CHEF}/common/stubs.cpp ${GEN_DIR}/callback-stub.cpp ${GEN_DIR}/IMClusterCommandHandler.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp ) message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap) diff --git a/examples/chef/nrfconnect/prj.conf b/examples/chef/nrfconnect/prj.conf index 1f9c8a8c0a7a09..2f2fc49501d231 100644 --- a/examples/chef/nrfconnect/prj.conf +++ b/examples/chef/nrfconnect/prj.conf @@ -28,12 +28,6 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD=y -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterLight" diff --git a/examples/light-switch-app/nrfconnect/CMakeLists.txt b/examples/light-switch-app/nrfconnect/CMakeLists.txt index 10cfa5f2fdf39b..865b8262749bb9 100644 --- a/examples/light-switch-app/nrfconnect/CMakeLists.txt +++ b/examples/light-switch-app/nrfconnect/CMakeLists.txt @@ -61,7 +61,6 @@ target_sources(app PRIVATE ${GEN_DIR}/light-switch-app/zap-generated/callback-stub.cpp ${GEN_DIR}/light-switch-app/zap-generated/IMClusterCommandHandler.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp) if(CONFIG_CHIP_OTA_REQUESTOR) diff --git a/examples/light-switch-app/nrfconnect/README.md b/examples/light-switch-app/nrfconnect/README.md index a00f14725a0915..a40ed845742c0c 100644 --- a/examples/light-switch-app/nrfconnect/README.md +++ b/examples/light-switch-app/nrfconnect/README.md @@ -102,11 +102,6 @@ has Thread disabled, and it should be paired with Matter controller and get configuration from it. Some actions required before establishing full communication are described below. -The example also comes with a test mode, which allows to start Thread with the -default settings by pressing button manually. However, this mode does not -guarantee that the device will be able to communicate with the Matter controller -and other devices. - The example can be configured to use the secure bootloader and utilize it for performing over-the-air Device Firmware Upgrade using Bluetooth LE. diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index 8ca5fac1429403..f45ee45cc6c855 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -20,7 +20,6 @@ #include "AppConfig.h" #include "LEDWidget.h" #include "LightSwitch.h" -#include "ThreadUtil.h" #include #include diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index 4ef71fea088ba9..5c813e69c8768e 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -61,8 +61,7 @@ target_sources(app PRIVATE ${GEN_DIR}/lighting-app/zap-generated/callback-stub.cpp ${GEN_DIR}/lighting-app/zap-generated/IMClusterCommandHandler.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp - ${NRFCONNECT_COMMON}/util/PWMDevice.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp) + ${NRFCONNECT_COMMON}/util/PWMDevice.cpp) chip_configure_data_model(app INCLUDE_SERVER diff --git a/examples/lighting-app/nrfconnect/README.md b/examples/lighting-app/nrfconnect/README.md index 408d794b6436d2..1675ef5c376ec4 100644 --- a/examples/lighting-app/nrfconnect/README.md +++ b/examples/lighting-app/nrfconnect/README.md @@ -63,11 +63,6 @@ Thread disabled, and it should be paired with Matter controller and get configuration from it. Some actions required before establishing full communication are described below. -The example also comes with a test mode, which allows to start Thread with the -default settings by pressing button manually. However, this mode does not -guarantee that the device will be able to communicate with the Matter controller -and other devices. - The example can be configured to use the secure bootloader and utilize it for performing over-the-air Device Firmware Upgrade using Bluetooth LE. @@ -241,9 +236,6 @@ effect. **Button 2** — Pressing the button once changes the lighting state to the opposite one. -**Button 3** — Pressing the button once starts the Thread networking in -the test mode using the default configuration. - **Button 4** — Pressing the button once starts the NFC tag emulation and enables Bluetooth LE advertising for the predefined period of time (15 minutes by default). diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index a2cb35de24fadb..e7081a5392340d 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -22,7 +22,6 @@ #include "AppEvent.h" #include "LEDWidget.h" #include "PWMDevice.h" -#include "ThreadUtil.h" #include #include @@ -270,14 +269,6 @@ void AppTask::ButtonEventHandler(uint32_t button_state, uint32_t has_changed) sAppTask.PostEvent(&button_event); } - if (THREAD_START_BUTTON_MASK & button_state & has_changed) - { - button_event.ButtonEvent.PinNo = THREAD_START_BUTTON; - button_event.ButtonEvent.Action = kButtonPushEvent; - button_event.Handler = StartThreadHandler; - sAppTask.PostEvent(&button_event); - } - if (BLE_ADVERTISEMENT_START_BUTTON_MASK & button_state & has_changed) { button_event.ButtonEvent.PinNo = BLE_ADVERTISEMENT_START_BUTTON; @@ -399,22 +390,6 @@ void AppTask::FunctionHandler(AppEvent * aEvent) } } -void AppTask::StartThreadHandler(AppEvent * aEvent) -{ - if (aEvent->ButtonEvent.PinNo != THREAD_START_BUTTON) - return; - - if (!chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) - { - StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); - } - else - { - LOG_INF("Device is commissioned to a Thread network."); - } -} - void AppTask::StartBLEAdvertisementHandler(AppEvent *) { if (Server::GetInstance().GetFabricTable().FabricCount() != 0) diff --git a/examples/lighting-app/nrfconnect/main/include/AppConfig.h b/examples/lighting-app/nrfconnect/main/include/AppConfig.h index cf6c580dc8a81c..4f55191d9ae7c3 100644 --- a/examples/lighting-app/nrfconnect/main/include/AppConfig.h +++ b/examples/lighting-app/nrfconnect/main/include/AppConfig.h @@ -24,8 +24,6 @@ #define LIGHTING_BUTTON_MASK DK_BTN2_MSK #define FUNCTION_BUTTON DK_BTN1 #define FUNCTION_BUTTON_MASK DK_BTN1_MSK -#define THREAD_START_BUTTON DK_BTN3 -#define THREAD_START_BUTTON_MASK DK_BTN3_MSK #define BLE_ADVERTISEMENT_START_BUTTON DK_BTN4 #define BLE_ADVERTISEMENT_START_BUTTON_MASK DK_BTN4_MSK diff --git a/examples/lighting-app/nrfconnect/main/include/AppTask.h b/examples/lighting-app/nrfconnect/main/include/AppTask.h index 3c76f131f632fc..a1772735cedbf8 100644 --- a/examples/lighting-app/nrfconnect/main/include/AppTask.h +++ b/examples/lighting-app/nrfconnect/main/include/AppTask.h @@ -74,7 +74,6 @@ class AppTask static void UpdateLedStateEventHandler(AppEvent * aEvent); static void FunctionTimerEventHandler(AppEvent * aEvent); static void FunctionHandler(AppEvent * aEvent); - static void StartThreadHandler(AppEvent * aEvent); static void LightingActionEventHandler(AppEvent * aEvent); static void StartBLEAdvertisementHandler(AppEvent * aEvent); diff --git a/examples/lighting-app/nrfconnect/prj.conf b/examples/lighting-app/nrfconnect/prj.conf index 3ed8923012d0bf..4bbb8a5a2a7076 100644 --- a/examples/lighting-app/nrfconnect/prj.conf +++ b/examples/lighting-app/nrfconnect/prj.conf @@ -28,12 +28,6 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD=y -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterLight" diff --git a/examples/lighting-app/nrfconnect/prj_no_dfu.conf b/examples/lighting-app/nrfconnect/prj_no_dfu.conf index 306b2de46dc463..0e286be102e3fc 100644 --- a/examples/lighting-app/nrfconnect/prj_no_dfu.conf +++ b/examples/lighting-app/nrfconnect/prj_no_dfu.conf @@ -28,12 +28,6 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD=y -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterLight" diff --git a/examples/lighting-app/nrfconnect/prj_release.conf b/examples/lighting-app/nrfconnect/prj_release.conf index 107bc57ee258bc..d5302def6aa3bd 100644 --- a/examples/lighting-app/nrfconnect/prj_release.conf +++ b/examples/lighting-app/nrfconnect/prj_release.conf @@ -28,12 +28,6 @@ CONFIG_PWM=y # OpenThread configs CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD=y -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterLight" diff --git a/examples/lock-app/nrfconnect/CMakeLists.txt b/examples/lock-app/nrfconnect/CMakeLists.txt index 567ca8ea075188..3581d05438e9c2 100644 --- a/examples/lock-app/nrfconnect/CMakeLists.txt +++ b/examples/lock-app/nrfconnect/CMakeLists.txt @@ -58,8 +58,7 @@ target_sources(app PRIVATE main/ZclCallbacks.cpp ${GEN_DIR}/lock-app/zap-generated/callback-stub.cpp ${GEN_DIR}/lock-app/zap-generated/IMClusterCommandHandler.cpp - ${NRFCONNECT_COMMON}/util/LEDWidget.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp) + ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app INCLUDE_SERVER diff --git a/examples/lock-app/nrfconnect/README.md b/examples/lock-app/nrfconnect/README.md index c1e2a2baf7e065..af86e211cbd0df 100644 --- a/examples/lock-app/nrfconnect/README.md +++ b/examples/lock-app/nrfconnect/README.md @@ -62,11 +62,6 @@ Thread disabled, and it should be paired with Matter controller and get configuration from it. Some actions required before establishing full communication are described below. -The example also comes with a test mode, which allows to start Thread with the -default settings by pressing button manually. However, this mode does not -guarantee that the device will be able to communicate with the Matter controller -and other devices. - The example can be configured to use the secure bootloader and utilize it for performing over-the-air Device Firmware Upgrade using Bluetooth LE. @@ -227,9 +222,6 @@ states are possible: **Button 2** — Pressing the button once changes the lock state to the opposite one. -**Button 3** — Pressing the button once starts the Thread networking in -the test mode using the default configuration. - **Button 4** — Pressing the button once starts the NFC tag emulation and enables Bluetooth LE advertising for the predefined period of time (15 minutes by default). diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index ff6cb1f6a7850d..9b21708f7d5038 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -20,7 +20,6 @@ #include "AppConfig.h" #include "BoltLockManager.h" #include "LEDWidget.h" -#include "ThreadUtil.h" #include #include @@ -249,14 +248,6 @@ void AppTask::ButtonEventHandler(uint32_t button_state, uint32_t has_changed) sAppTask.PostEvent(&button_event); } - if (THREAD_START_BUTTON_MASK & button_state & has_changed) - { - button_event.ButtonEvent.PinNo = THREAD_START_BUTTON; - button_event.ButtonEvent.Action = BUTTON_PUSH_EVENT; - button_event.Handler = StartThreadHandler; - sAppTask.PostEvent(&button_event); - } - if (BLE_ADVERTISEMENT_START_BUTTON_MASK & button_state & has_changed) { button_event.ButtonEvent.PinNo = BLE_ADVERTISEMENT_START_BUTTON; @@ -373,22 +364,6 @@ void AppTask::FunctionHandler(AppEvent * aEvent) } } -void AppTask::StartThreadHandler(AppEvent * aEvent) -{ - if (aEvent->ButtonEvent.PinNo != THREAD_START_BUTTON) - return; - - if (!ConnectivityMgr().IsThreadProvisioned()) - { - StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); - } - else - { - LOG_INF("Device is commissioned to a Thread network."); - } -} - void AppTask::StartBLEAdvertisementHandler(AppEvent *) { if (Server::GetInstance().GetFabricTable().FabricCount() != 0) diff --git a/examples/lock-app/nrfconnect/main/include/AppConfig.h b/examples/lock-app/nrfconnect/main/include/AppConfig.h index 397c50230e5f62..63e523e1922c80 100644 --- a/examples/lock-app/nrfconnect/main/include/AppConfig.h +++ b/examples/lock-app/nrfconnect/main/include/AppConfig.h @@ -24,8 +24,6 @@ #define LOCK_BUTTON_MASK DK_BTN2_MSK #define FUNCTION_BUTTON DK_BTN1 #define FUNCTION_BUTTON_MASK DK_BTN1_MSK -#define THREAD_START_BUTTON DK_BTN3 -#define THREAD_START_BUTTON_MASK DK_BTN3_MSK #define BLE_ADVERTISEMENT_START_BUTTON DK_BTN4 #define BLE_ADVERTISEMENT_START_BUTTON_MASK DK_BTN4_MSK diff --git a/examples/lock-app/nrfconnect/main/include/AppTask.h b/examples/lock-app/nrfconnect/main/include/AppTask.h index 8e57d8c166ca7f..95c3ed2d1f116e 100644 --- a/examples/lock-app/nrfconnect/main/include/AppTask.h +++ b/examples/lock-app/nrfconnect/main/include/AppTask.h @@ -59,7 +59,6 @@ class AppTask static void UpdateLedStateEventHandler(AppEvent * aEvent); static void FunctionTimerEventHandler(AppEvent * aEvent); static void FunctionHandler(AppEvent * aEvent); - static void StartThreadHandler(AppEvent * aEvent); static void LockActionEventHandler(AppEvent * aEvent); static void StartBLEAdvertisementHandler(AppEvent * aEvent); diff --git a/examples/lock-app/nrfconnect/prj.conf b/examples/lock-app/nrfconnect/prj.conf index 1f0e9486749356..e6d757137db86a 100644 --- a/examples/lock-app/nrfconnect/prj.conf +++ b/examples/lock-app/nrfconnect/prj.conf @@ -30,12 +30,6 @@ CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterLock" diff --git a/examples/lock-app/nrfconnect/prj_no_dfu.conf b/examples/lock-app/nrfconnect/prj_no_dfu.conf index 1f12e983ffc10d..9b0339d336b4e1 100644 --- a/examples/lock-app/nrfconnect/prj_no_dfu.conf +++ b/examples/lock-app/nrfconnect/prj_no_dfu.conf @@ -30,12 +30,6 @@ CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterLock" diff --git a/examples/lock-app/nrfconnect/prj_release.conf b/examples/lock-app/nrfconnect/prj_release.conf index 7a87388e0112de..a71e97536cfd6c 100644 --- a/examples/lock-app/nrfconnect/prj_release.conf +++ b/examples/lock-app/nrfconnect/prj_release.conf @@ -30,12 +30,6 @@ CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterLock" diff --git a/examples/platform/nrfconnect/util/ThreadUtil.cpp b/examples/platform/nrfconnect/util/ThreadUtil.cpp deleted file mode 100644 index b3564d8cbf80de..00000000000000 --- a/examples/platform/nrfconnect/util/ThreadUtil.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2020 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 "ThreadUtil.h" - -#include - -#include -#include - -#include - -#include - -void StartDefaultThreadNetwork(void) -{ - chip::Thread::OperationalDataset dataset{}; - uint8_t xpanid[8]; - constexpr uint8_t masterkey[] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF - }; - net_bytes_from_str(xpanid, sizeof(xpanid), CONFIG_OPENTHREAD_XPANID); - - dataset.SetChannel(CONFIG_OPENTHREAD_CHANNEL); - dataset.SetExtendedPanId(xpanid); - dataset.SetMasterKey(masterkey); - dataset.SetNetworkName(CONFIG_OPENTHREAD_NETWORK_NAME); - dataset.SetPanId(CONFIG_OPENTHREAD_PANID); - - chip::DeviceLayer::ThreadStackMgr().SetThreadEnabled(false); - chip::DeviceLayer::ThreadStackMgr().SetThreadProvision(dataset.AsByteSpan()); - chip::DeviceLayer::ThreadStackMgr().SetThreadEnabled(true); - - chip::app::DnssdServer::Instance().StartServer(); -} diff --git a/examples/platform/nrfconnect/util/include/ThreadUtil.h b/examples/platform/nrfconnect/util/include/ThreadUtil.h deleted file mode 100644 index 37fa286e7e01b7..00000000000000 --- a/examples/platform/nrfconnect/util/include/ThreadUtil.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2020 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 - -void StartDefaultThreadNetwork(void); diff --git a/examples/pump-app/nrfconnect/CMakeLists.txt b/examples/pump-app/nrfconnect/CMakeLists.txt index 760569a05d5b72..15988152d17351 100644 --- a/examples/pump-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-app/nrfconnect/CMakeLists.txt @@ -58,8 +58,7 @@ target_sources(app PRIVATE main/ZclCallbacks.cpp ${GEN_DIR}/pump-app/zap-generated/callback-stub.cpp ${GEN_DIR}/pump-app/zap-generated/IMClusterCommandHandler.cpp - ${NRFCONNECT_COMMON}/util/LEDWidget.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp) + ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app INCLUDE_SERVER diff --git a/examples/pump-app/nrfconnect/README.md b/examples/pump-app/nrfconnect/README.md index 94df485f7afe4a..5d53db56f22af6 100644 --- a/examples/pump-app/nrfconnect/README.md +++ b/examples/pump-app/nrfconnect/README.md @@ -58,11 +58,6 @@ Thread disabled, and it should be paired with Matter controller and get configuration from it. Some actions required before establishing full communication are described below. -The example also comes with a test mode, which allows to start Thread with the -default settings by pressing button manually. However, this mode does not -guarantee that the device will be able to communicate with the Matter controller -and other devices. - The example can be configured to use the secure bootloader and utilize it for performing over-the-air Device Firmware Upgrade using Bluetooth LE. @@ -220,9 +215,6 @@ following states are possible: **Button 2** — Pressing the button once changes the pump state to the opposite one. -**Button 3** — Pressing the button once starts the Thread networking in -the test mode using the default configuration. - **Button 4** — Pressing the button once starts the NFC tag emulation and enables Bluetooth LE advertising for the predefined period of time (15 minutes by default). diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 887c0a16931188..e5edb5cf815f00 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -20,7 +20,6 @@ #include "AppConfig.h" #include "LEDWidget.h" #include "PumpManager.h" -#include "ThreadUtil.h" #include #include @@ -253,14 +252,6 @@ void AppTask::ButtonEventHandler(uint32_t button_state, uint32_t has_changed) sAppTask.PostEvent(&button_event); } - if (THREAD_START_BUTTON_MASK & button_state & has_changed) - { - button_event.ButtonEvent.PinNo = THREAD_START_BUTTON; - button_event.ButtonEvent.Action = BUTTON_PUSH_EVENT; - button_event.Handler = StartThreadHandler; - sAppTask.PostEvent(&button_event); - } - if (BLE_ADVERTISEMENT_START_BUTTON_MASK & button_state & has_changed) { button_event.ButtonEvent.PinNo = BLE_ADVERTISEMENT_START_BUTTON; @@ -375,22 +366,6 @@ void AppTask::FunctionHandler(AppEvent * aEvent) } } -void AppTask::StartThreadHandler(AppEvent * aEvent) -{ - if (aEvent->ButtonEvent.PinNo != THREAD_START_BUTTON) - return; - - if (!ConnectivityMgr().IsThreadProvisioned()) - { - StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); - } - else - { - LOG_INF("Device is commissioned to a Thread network."); - } -} - void AppTask::StartBLEAdvertisementHandler(AppEvent *) { if (Server::GetInstance().GetFabricTable().FabricCount() != 0) diff --git a/examples/pump-app/nrfconnect/main/include/AppConfig.h b/examples/pump-app/nrfconnect/main/include/AppConfig.h index 1bd74353662424..e2e1812ae48718 100644 --- a/examples/pump-app/nrfconnect/main/include/AppConfig.h +++ b/examples/pump-app/nrfconnect/main/include/AppConfig.h @@ -24,8 +24,6 @@ #define START_BUTTON_MASK DK_BTN2_MSK #define FUNCTION_BUTTON DK_BTN1 #define FUNCTION_BUTTON_MASK DK_BTN1_MSK -#define THREAD_START_BUTTON DK_BTN3 -#define THREAD_START_BUTTON_MASK DK_BTN3_MSK #define BLE_ADVERTISEMENT_START_BUTTON DK_BTN4 #define BLE_ADVERTISEMENT_START_BUTTON_MASK DK_BTN4_MSK diff --git a/examples/pump-app/nrfconnect/main/include/AppTask.h b/examples/pump-app/nrfconnect/main/include/AppTask.h index 25545ee9507f54..29a2103925bdb2 100644 --- a/examples/pump-app/nrfconnect/main/include/AppTask.h +++ b/examples/pump-app/nrfconnect/main/include/AppTask.h @@ -61,7 +61,6 @@ class AppTask static void UpdateLedStateEventHandler(AppEvent * aEvent); static void FunctionTimerEventHandler(AppEvent * aEvent); static void FunctionHandler(AppEvent * aEvent); - static void StartThreadHandler(AppEvent * aEvent); static void StartActionEventHandler(AppEvent * aEvent); static void StartBLEAdvertisementHandler(AppEvent * aEvent); diff --git a/examples/pump-app/nrfconnect/prj.conf b/examples/pump-app/nrfconnect/prj.conf index 5556551c74a5ec..916358d65905c5 100644 --- a/examples/pump-app/nrfconnect/prj.conf +++ b/examples/pump-app/nrfconnect/prj.conf @@ -29,12 +29,6 @@ CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterPump" diff --git a/examples/pump-app/nrfconnect/prj_no_dfu.conf b/examples/pump-app/nrfconnect/prj_no_dfu.conf index 42f2b343331368..8c102a90dc41d4 100644 --- a/examples/pump-app/nrfconnect/prj_no_dfu.conf +++ b/examples/pump-app/nrfconnect/prj_no_dfu.conf @@ -29,12 +29,6 @@ CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterPump" diff --git a/examples/pump-app/nrfconnect/prj_release.conf b/examples/pump-app/nrfconnect/prj_release.conf index 14411f310dbbd6..01c70c0217c02e 100644 --- a/examples/pump-app/nrfconnect/prj_release.conf +++ b/examples/pump-app/nrfconnect/prj_release.conf @@ -29,12 +29,6 @@ CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterPump" diff --git a/examples/pump-controller-app/nrfconnect/CMakeLists.txt b/examples/pump-controller-app/nrfconnect/CMakeLists.txt index 4426954b3ef6a7..2d115d5c308e83 100644 --- a/examples/pump-controller-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-controller-app/nrfconnect/CMakeLists.txt @@ -58,8 +58,7 @@ target_sources(app PRIVATE main/ZclCallbacks.cpp ${GEN_DIR}/pump-controller-app/zap-generated/callback-stub.cpp ${GEN_DIR}/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp - ${NRFCONNECT_COMMON}/util/LEDWidget.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp) + ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app INCLUDE_SERVER diff --git a/examples/pump-controller-app/nrfconnect/README.md b/examples/pump-controller-app/nrfconnect/README.md index 81e5e23b1f81d9..d3111c769a5353 100644 --- a/examples/pump-controller-app/nrfconnect/README.md +++ b/examples/pump-controller-app/nrfconnect/README.md @@ -59,11 +59,6 @@ Thread disabled, and it should be paired with Matter controller and get configuration from it. Some actions required before establishing full communication are described below. -The example also comes with a test mode, which allows to start Thread with the -default settings by pressing button manually. However, this mode does not -guarantee that the device will be able to communicate with the Matter controller -and other devices. - The example can be configured to use the secure bootloader and utilize it for performing over-the-air Device Firmware Upgrade using Bluetooth LE. @@ -221,9 +216,6 @@ following states are possible: **Button 2** — Pressing the button once changes the pump state to the opposite one. -**Button 3** — Pressing the button once starts the Thread networking in -the test mode using the default configuration. - **Button 4** — Pressing the button once starts the NFC tag emulation and enables Bluetooth LE advertising for the predefined period of time (15 minutes by default). diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index 898ffcc0892a1b..5a95b5268f65b0 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -20,7 +20,6 @@ #include "AppConfig.h" #include "LEDWidget.h" #include "PumpManager.h" -#include "ThreadUtil.h" #include #include @@ -249,14 +248,6 @@ void AppTask::ButtonEventHandler(uint32_t button_state, uint32_t has_changed) sAppTask.PostEvent(&button_event); } - if (THREAD_START_BUTTON_MASK & button_state & has_changed) - { - button_event.ButtonEvent.PinNo = THREAD_START_BUTTON; - button_event.ButtonEvent.Action = BUTTON_PUSH_EVENT; - button_event.Handler = StartThreadHandler; - sAppTask.PostEvent(&button_event); - } - if (BLE_ADVERTISEMENT_START_BUTTON_MASK & button_state & has_changed) { button_event.ButtonEvent.PinNo = BLE_ADVERTISEMENT_START_BUTTON; @@ -371,22 +362,6 @@ void AppTask::FunctionHandler(AppEvent * aEvent) } } -void AppTask::StartThreadHandler(AppEvent * aEvent) -{ - if (aEvent->ButtonEvent.PinNo != THREAD_START_BUTTON) - return; - - if (!ConnectivityMgr().IsThreadProvisioned()) - { - StartDefaultThreadNetwork(); - LOG_INF("Device is not commissioned to a Thread network. Starting with the default configuration."); - } - else - { - LOG_INF("Device is commissioned to a Thread network."); - } -} - void AppTask::StartBLEAdvertisementHandler(AppEvent *) { if (Server::GetInstance().GetFabricTable().FabricCount() != 0) diff --git a/examples/pump-controller-app/nrfconnect/main/include/AppConfig.h b/examples/pump-controller-app/nrfconnect/main/include/AppConfig.h index 04983b71db1a2f..e63e9d8f2a3588 100644 --- a/examples/pump-controller-app/nrfconnect/main/include/AppConfig.h +++ b/examples/pump-controller-app/nrfconnect/main/include/AppConfig.h @@ -24,8 +24,6 @@ #define START_BUTTON_MASK DK_BTN2_MSK #define FUNCTION_BUTTON DK_BTN1 #define FUNCTION_BUTTON_MASK DK_BTN1_MSK -#define THREAD_START_BUTTON DK_BTN3 -#define THREAD_START_BUTTON_MASK DK_BTN3_MSK #define BLE_ADVERTISEMENT_START_BUTTON DK_BTN4 #define BLE_ADVERTISEMENT_START_BUTTON_MASK DK_BTN4_MSK diff --git a/examples/pump-controller-app/nrfconnect/main/include/AppTask.h b/examples/pump-controller-app/nrfconnect/main/include/AppTask.h index 25545ee9507f54..29a2103925bdb2 100644 --- a/examples/pump-controller-app/nrfconnect/main/include/AppTask.h +++ b/examples/pump-controller-app/nrfconnect/main/include/AppTask.h @@ -61,7 +61,6 @@ class AppTask static void UpdateLedStateEventHandler(AppEvent * aEvent); static void FunctionTimerEventHandler(AppEvent * aEvent); static void FunctionHandler(AppEvent * aEvent); - static void StartThreadHandler(AppEvent * aEvent); static void StartActionEventHandler(AppEvent * aEvent); static void StartBLEAdvertisementHandler(AppEvent * aEvent); diff --git a/examples/pump-controller-app/nrfconnect/prj.conf b/examples/pump-controller-app/nrfconnect/prj.conf index 0223e989213b06..f3936ac83a0291 100644 --- a/examples/pump-controller-app/nrfconnect/prj.conf +++ b/examples/pump-controller-app/nrfconnect/prj.conf @@ -29,12 +29,6 @@ CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterPumpCtrl" diff --git a/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf b/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf index 41caec932ada47..f946af99d95204 100644 --- a/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf +++ b/examples/pump-controller-app/nrfconnect/prj_no_dfu.conf @@ -29,12 +29,6 @@ CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterPumpCtrl" diff --git a/examples/pump-controller-app/nrfconnect/prj_release.conf b/examples/pump-controller-app/nrfconnect/prj_release.conf index e816f9c097442f..bf7f1a452896de 100644 --- a/examples/pump-controller-app/nrfconnect/prj_release.conf +++ b/examples/pump-controller-app/nrfconnect/prj_release.conf @@ -29,12 +29,6 @@ CONFIG_OPENTHREAD_NORDIC_LIBRARY_MTD=y CONFIG_OPENTHREAD_MTD=y CONFIG_OPENTHREAD_FTD=n -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterPumpCtrl" diff --git a/examples/window-app/nrfconnect/CMakeLists.txt b/examples/window-app/nrfconnect/CMakeLists.txt index 038b7485d8b4ab..0dc64ec5ccd3e9 100644 --- a/examples/window-app/nrfconnect/CMakeLists.txt +++ b/examples/window-app/nrfconnect/CMakeLists.txt @@ -61,8 +61,7 @@ target_sources(app PRIVATE ${GEN_DIR}/window-app/zap-generated/callback-stub.cpp ${GEN_DIR}/window-app/zap-generated/IMClusterCommandHandler.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp - ${NRFCONNECT_COMMON}/util/PWMDevice.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp) + ${NRFCONNECT_COMMON}/util/PWMDevice.cpp) chip_configure_data_model(app INCLUDE_SERVER diff --git a/examples/window-app/nrfconnect/prj.conf b/examples/window-app/nrfconnect/prj.conf index 13b2d97966ad84..bb8601bf9c5dbf 100644 --- a/examples/window-app/nrfconnect/prj.conf +++ b/examples/window-app/nrfconnect/prj.conf @@ -34,12 +34,6 @@ CONFIG_CHIP_THREAD_SSED=y CONFIG_CHIP_SED_IDLE_INTERVAL=500 CONFIG_CHIP_SED_ACTIVE_INTERVAL=500 -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterWinCov" diff --git a/examples/window-app/nrfconnect/prj_no_dfu.conf b/examples/window-app/nrfconnect/prj_no_dfu.conf index 8f5d7b9aa6c946..1a8816e44557af 100644 --- a/examples/window-app/nrfconnect/prj_no_dfu.conf +++ b/examples/window-app/nrfconnect/prj_no_dfu.conf @@ -33,12 +33,6 @@ CONFIG_CHIP_THREAD_SSED=y CONFIG_CHIP_SED_IDLE_INTERVAL=500 CONFIG_CHIP_SED_ACTIVE_INTERVAL=500 -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterWinCov" diff --git a/examples/window-app/nrfconnect/prj_release.conf b/examples/window-app/nrfconnect/prj_release.conf index 05feca0b601e74..0a1e7735a8455e 100644 --- a/examples/window-app/nrfconnect/prj_release.conf +++ b/examples/window-app/nrfconnect/prj_release.conf @@ -33,12 +33,6 @@ CONFIG_CHIP_THREAD_SSED=y CONFIG_CHIP_SED_IDLE_INTERVAL=500 CONFIG_CHIP_SED_ACTIVE_INTERVAL=500 -# Default OpenThread network settings -CONFIG_OPENTHREAD_PANID=4660 -CONFIG_OPENTHREAD_CHANNEL=15 -CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread" -CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" - # Bluetooth overrides CONFIG_BT_DEVICE_NAME="MatterWinCov"