From 4d6858be2fba5b327574632dd1ccf790ed36d711 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 24 Mar 2022 08:30:14 -0400 Subject: [PATCH] Remove leftover rendezvous bypass bits. (#16597) We no longer really support this non-spec-compliant mode of operation; remove the bits of it still scattered around the tree. --- .../workflows/examples-linux-standalone.yaml | 3 +- config/ameba/args.gni | 1 - config/mbed/CMakeLists.txt | 1 - examples/all-clusters-app/ameba/README.md | 2 - examples/all-clusters-app/esp32/README.md | 8 +--- .../esp32/main/CHIPDeviceManager.cpp | 6 --- .../esp32/main/Kconfig.projbuild | 3 -- examples/all-clusters-app/mbed/config.in | 1 - examples/bridge-app/esp32/README.md | 8 +--- .../esp32/main/CHIPDeviceManager.cpp | 6 --- .../bridge-app/esp32/main/Kconfig.projbuild | 3 -- examples/lighting-app/ameba/README.md | 2 - examples/lighting-app/cyw30739/src/main.cpp | 10 +--- .../esp32/main/CHIPDeviceManager.cpp | 6 --- .../lighting-app/esp32/main/Kconfig.projbuild | 3 -- examples/lighting-app/mbed/config.in | 1 - .../lighting-app/nrfconnect/main/AppTask.cpp | 5 -- examples/lighting-app/telink/src/AppTask.cpp | 7 --- examples/lock-app/cc13x2x7_26x2x7/args.gni | 1 - examples/lock-app/cyw30739/src/main.cpp | 10 +--- examples/lock-app/esp32/README.md | 8 +--- .../lock-app/esp32/main/CHIPDeviceManager.cpp | 6 --- .../lock-app/esp32/main/Kconfig.projbuild | 3 -- examples/lock-app/mbed/config.in | 1 - examples/lock-app/nrfconnect/main/AppTask.cpp | 5 -- .../esp32/main/CHIPDeviceManager.cpp | 6 --- .../esp32/main/Kconfig.projbuild | 3 -- .../esp32/main/CHIPDeviceManager.cpp | 6 --- .../esp32/main/Kconfig.projbuild | 3 -- examples/ota-requestor-app/mbed/config.in | 1 - .../cc13x2x7_26x2x7/args.gni | 1 - examples/pigweed-app/mbed/config.in | 1 - examples/pump-app/cc13x2x7_26x2x7/args.gni | 1 - examples/pump-app/nrfconnect/main/AppTask.cpp | 5 -- .../cc13x2x7_26x2x7/args.gni | 1 - .../nrfconnect/main/AppTask.cpp | 5 -- examples/shell/mbed/config.in | 1 - .../esp32/README.md | 8 +--- .../esp32/main/CHIPDeviceManager.cpp | 6 --- .../esp32/main/Kconfig.projbuild | 3 -- src/app/server/Server.cpp | 47 +------------------ src/app/server/Server.h | 2 - src/credentials/FabricTable.cpp | 13 ++--- src/credentials/FabricTable.h | 2 - .../GenericConfigurationManagerImpl.ipp | 5 -- src/platform/BUILD.gn | 4 -- .../telink/CHIPDevicePlatformConfig.h | 4 -- 47 files changed, 15 insertions(+), 223 deletions(-) diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index bcfa353c6c5aee..fc6b784a92bfe3 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -90,8 +90,7 @@ jobs: - name: Build example Standalone All Clusters Server timeout-minutes: 5 run: | - scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/all_clusters_debug \ - chip_bypass_rendezvous=true + scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/all_clusters_debug .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ linux debug all-clusters-app \ out/all_clusters_debug/chip-all-clusters-app \ diff --git a/config/ameba/args.gni b/config/ameba/args.gni index fe49e059010256..57c21e2d02e8c2 100755 --- a/config/ameba/args.gni +++ b/config/ameba/args.gni @@ -29,7 +29,6 @@ chip_build_tests = false chip_inet_config_enable_tcp_endpoint = true chip_inet_config_enable_udp_endpoint = true -chip_bypass_rendezvous = false chip_config_network_layer_ble = true custom_toolchain = "//third_party/connectedhomeip/config/ameba/toolchain:ameba" diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index 7571426a4f78a0..48151240e39202 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -275,7 +275,6 @@ chip_gn_arg_bool ("chip_build_tests" CONFIG_CHIP_BUILD_TEST chip_gn_arg_bool ("chip_monolithic_tests" CONFIG_CHIP_BUILD_TESTS) chip_gn_arg_bool ("chip_build_libshell" CONFIG_CHIP_LIB_SHELL) chip_gn_arg_bool ("chip_with_platform_mbedtls" CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS) -chip_gn_arg_bool ("chip_bypass_rendezvous" CONFIG_CHIP_BYPASS_RENDEZVOUS) chip_gn_arg_bool ("chip_build_pw_rpc_lib" CONFIG_CHIP_PW_RPC) chip_gn_arg_bool ("chip_enable_data_model" CONFIG_CHIP_DATA_MODEL) if (CONFIG_CHIP_PW_RPC) diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 5642b9869fce69..8ff6e342433981 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -65,7 +65,6 @@ There are two commissioning modes supported by Ameba platform: 1. In "connectedhomeip/config/ameba/args.gni" - - set `chip_bypass_rendezvous = false` - Set `chip_config_network_layer_ble = true` 2. In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h" @@ -82,7 +81,6 @@ There are two commissioning modes supported by Ameba platform: 1. In "connectedhomeip/config/ameba/args.gni" - - set `chip_bypass_rendezvous = false` - Set `chip_config_network_layer_ble = false` 2. In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h" diff --git a/examples/all-clusters-app/esp32/README.md b/examples/all-clusters-app/esp32/README.md index f6e062ce40982a..a0b79d926d33e8 100644 --- a/examples/all-clusters-app/esp32/README.md +++ b/examples/all-clusters-app/esp32/README.md @@ -148,18 +148,14 @@ that are currently supported include `ESP32-DevKitC` (default), ## Commissioning and cluster control -Commissioning can be carried out using WiFi, BLE or Bypass. +Commissioning can be carried out using WiFi or BLE. 1. Set the `Rendezvous Mode` for commissioning using menuconfig; the default Rendezvous mode is BLE. $ idf.py menuconfig -Select the Rendezvous Mode via `Demo -> Rendezvous Mode`. If Rendezvous Mode is -ByPass then set the credentials of the WiFi Network (i.e. SSID and Password from -menuconfig). - -`idf.py menuconfig -> Component config -> CHIP Device Layer -> WiFi Station Options` +Select the Rendezvous Mode via `Demo -> Rendezvous Mode`. NOTE: to avoid build error `undefined reference to 'chip::DevelopmentCerts::kDacPublicKey'`, set VID to diff --git a/examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp b/examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp index 1578b7df5e911a..248bd9cab29d55 100644 --- a/examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/all-clusters-app/esp32/main/CHIPDeviceManager.cpp @@ -74,12 +74,6 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) ConnectivityMgr().SetBLEAdvertisingEnabled(false); ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); } - else - { - // If rendezvous is bypassed, enable SoftAP so that the device can still - // be communicated with via its SoftAP as needed. - ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); - } // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/all-clusters-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-app/esp32/main/Kconfig.projbuild index 5bd4461042836f..b1a935811f318b 100644 --- a/examples/all-clusters-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-app/esp32/main/Kconfig.projbuild @@ -51,8 +51,6 @@ menu "Demo" help Specifies the Rendezvous mode of the peripheral. - config RENDEZVOUS_MODE_BYPASS - bool "Bypass" config RENDEZVOUS_MODE_SOFTAP bool "Soft-AP" config RENDEZVOUS_MODE_BLE @@ -87,7 +85,6 @@ menu "Demo" config RENDEZVOUS_MODE int range 0 8 - default 0 if RENDEZVOUS_MODE_BYPASS default 1 if RENDEZVOUS_MODE_SOFTAP default 2 if RENDEZVOUS_MODE_BLE default 4 if RENDEZVOUS_MODE_ON_NETWORK diff --git a/examples/all-clusters-app/mbed/config.in b/examples/all-clusters-app/mbed/config.in index e1bc59c07a44b0..ecf3bb53b4623b 100644 --- a/examples/all-clusters-app/mbed/config.in +++ b/examples/all-clusters-app/mbed/config.in @@ -1,7 +1,6 @@ CONFIG_CHIP_BUILD_TESTS=n CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS=y CONFIG_CHIP_PROJECT_CONFIG=main/include/CHIPProjectConfig.h -CONFIG_CHIP_BYPASS_RENDEZVOUS=n CONFIG_MBED_BSD_SOCKET_TRACE=n CONFIG_CHIP_OTA_REQUESTOR=y CONFIG_CHIP_DATA_MODEL=y diff --git a/examples/bridge-app/esp32/README.md b/examples/bridge-app/esp32/README.md index df50e4becfce52..12ca5f4160fead 100644 --- a/examples/bridge-app/esp32/README.md +++ b/examples/bridge-app/esp32/README.md @@ -155,18 +155,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). ## Commissioning and cluster control -Commissioning can be carried out using WiFi, BLE or Bypass. +Commissioning can be carried out using WiFi or BLE. 1. Set the `Rendezvous Mode` for commissioning using menuconfig; the default Rendezvous mode is BLE. $ idf.py menuconfig -Select the Rendezvous Mode via `Demo -> Rendezvous Mode`. If Rendezvous Mode is -Bypass then set the credentials of the WiFi Network (i.e. SSID and Password from -menuconfig). - -`idf.py menuconfig -> Component config -> CHIP Device Layer -> WiFi Station Options` +Select the Rendezvous Mode via `Demo -> Rendezvous Mode`. 2. Now flash the device with the same command as before. (Use the right `/dev` device) diff --git a/examples/bridge-app/esp32/main/CHIPDeviceManager.cpp b/examples/bridge-app/esp32/main/CHIPDeviceManager.cpp index f4be7aacd8bf08..add55587dd3eb7 100644 --- a/examples/bridge-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/bridge-app/esp32/main/CHIPDeviceManager.cpp @@ -69,12 +69,6 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) ConnectivityMgr().SetBLEAdvertisingEnabled(false); ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); } - else - { - // If rendezvous is bypassed, enable SoftAP so that the device can still - // be communicated with via its SoftAP as needed. - ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); - } // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/bridge-app/esp32/main/Kconfig.projbuild b/examples/bridge-app/esp32/main/Kconfig.projbuild index 11f2471dad4d2e..5bb496b1599a43 100644 --- a/examples/bridge-app/esp32/main/Kconfig.projbuild +++ b/examples/bridge-app/esp32/main/Kconfig.projbuild @@ -6,8 +6,6 @@ menu "Demo" help Specifies the Rendezvous mode of the peripheral. - config RENDEZVOUS_MODE_BYPASS - bool "Bypass" config RENDEZVOUS_MODE_WIFI bool "Wi-Fi" config RENDEZVOUS_MODE_BLE @@ -21,7 +19,6 @@ menu "Demo" config RENDEZVOUS_MODE int range 0 8 - default 0 if RENDEZVOUS_MODE_BYPASS default 1 if RENDEZVOUS_MODE_WIFI default 2 if RENDEZVOUS_MODE_BLE default 4 if RENDEZVOUS_MODE_THREAD diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index 03841064f9424e..19cc15e7a8234c 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -63,7 +63,6 @@ There are two commissioning modes supported by Ameba platform: 1. In "connectedhomeip/config/ameba/args.gni" - - set `chip_bypass_rendezvous = false` - Set `chip_config_network_layer_ble = true` 2. In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h" @@ -79,7 +78,6 @@ There are two commissioning modes supported by Ameba platform: 1. In "connectedhomeip/config/ameba/args.gni" - - set `chip_bypass_rendezvous = false` - Set `chip_config_network_layer_ble = false` 2. In "connectedhomeip/src/platform/Ameba/CHIPDevicePlatformConfig.h" diff --git a/examples/lighting-app/cyw30739/src/main.cpp b/examples/lighting-app/cyw30739/src/main.cpp index 9ec4cc5c6e3a63..544819f781a876 100644 --- a/examples/lighting-app/cyw30739/src/main.cpp +++ b/examples/lighting-app/cyw30739/src/main.cpp @@ -156,15 +156,7 @@ void EventHandler(const ChipDeviceEvent * event, intptr_t arg) } } -void HandleThreadStateChangeEvent(const ChipDeviceEvent * event) -{ -#if CHIP_BYPASS_RENDEZVOUS - if (event->ThreadStateChange.NetDataChanged && !ConnectivityMgr().IsThreadProvisioned()) - { - ThreadStackMgr().JoinerStart(); - } -#endif /* CHIP_BYPASS_RENDEZVOUS */ -} +void HandleThreadStateChangeEvent(const ChipDeviceEvent * event) {} void LightManagerCallback(LightingManager::Actor_t actor, LightingManager::Action_t action, uint8_t level) { diff --git a/examples/lighting-app/esp32/main/CHIPDeviceManager.cpp b/examples/lighting-app/esp32/main/CHIPDeviceManager.cpp index 5da54e42a021ba..ee7962ed549a72 100644 --- a/examples/lighting-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/lighting-app/esp32/main/CHIPDeviceManager.cpp @@ -69,12 +69,6 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) ConnectivityMgr().SetBLEAdvertisingEnabled(false); ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); } - else - { - // If rendezvous is bypassed, enable SoftAP so that the device can still - // be communicated with via its SoftAP as needed. - ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); - } // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/lighting-app/esp32/main/Kconfig.projbuild b/examples/lighting-app/esp32/main/Kconfig.projbuild index 7aa1ecd9be7ab7..46e6b2dda401ea 100644 --- a/examples/lighting-app/esp32/main/Kconfig.projbuild +++ b/examples/lighting-app/esp32/main/Kconfig.projbuild @@ -85,8 +85,6 @@ menu "Demo" help Specifies the Rendezvous mode of the peripheral. - config RENDEZVOUS_MODE_BYPASS - bool "Bypass" config RENDEZVOUS_MODE_WIFI bool "Wi-Fi" config RENDEZVOUS_MODE_BLE @@ -100,7 +98,6 @@ menu "Demo" config RENDEZVOUS_MODE int range 0 8 - default 0 if RENDEZVOUS_MODE_BYPASS default 1 if RENDEZVOUS_MODE_WIFI default 2 if RENDEZVOUS_MODE_BLE default 4 if RENDEZVOUS_MODE_THREAD diff --git a/examples/lighting-app/mbed/config.in b/examples/lighting-app/mbed/config.in index f55d13d9e9dd68..2456569bfe6fc7 100644 --- a/examples/lighting-app/mbed/config.in +++ b/examples/lighting-app/mbed/config.in @@ -1,7 +1,6 @@ CONFIG_CHIP_BUILD_TESTS=n CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS=y CONFIG_CHIP_PROJECT_CONFIG=main/include/CHIPProjectConfig.h -CONFIG_CHIP_BYPASS_RENDEZVOUS=n CONFIG_MBED_BSD_SOCKET_TRACE=n CONFIG_CHIP_PW_RPC=y CONFIG_CHIP_OTA_REQUESTOR=y diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index c8f1adbebb1859..064f8b7738ad64 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -400,11 +400,6 @@ void AppTask::StartThreadHandler(AppEvent * aEvent) if (aEvent->ButtonEvent.PinNo != THREAD_START_BUTTON) return; - if (chip::Server::GetInstance().AddTestCommissioning() != CHIP_NO_ERROR) - { - LOG_ERR("Failed to add test pairing"); - } - if (!chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) { StartDefaultThreadNetwork(); diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp index 5602acc36ca53d..92e1dde232983d 100644 --- a/examples/lighting-app/telink/src/AppTask.cpp +++ b/examples/lighting-app/telink/src/AppTask.cpp @@ -105,13 +105,6 @@ CHIP_ERROR AppTask::Init() ConfigurationMgr().LogDeviceConfig(); PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); - ret = chip::Server::GetInstance().AddTestCommissioning(); - if (ret != CHIP_NO_ERROR) - { - LOG_ERR("Failed to add test pairing"); - return ret; - } - return CHIP_NO_ERROR; } diff --git a/examples/lock-app/cc13x2x7_26x2x7/args.gni b/examples/lock-app/cc13x2x7_26x2x7/args.gni index 21aca9d359af72..2b1db21d690d61 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/args.gni +++ b/examples/lock-app/cc13x2x7_26x2x7/args.gni @@ -34,7 +34,6 @@ chip_enable_ota_requestor = true # BLE options chip_config_network_layer_ble = true -chip_bypass_rendezvous = false # Disable lock tracking, since our FreeRTOS configuration does not set # INCLUDE_xSemaphoreGetMutexHolder diff --git a/examples/lock-app/cyw30739/src/main.cpp b/examples/lock-app/cyw30739/src/main.cpp index ccd12f86dfb329..00c0f91f52648b 100644 --- a/examples/lock-app/cyw30739/src/main.cpp +++ b/examples/lock-app/cyw30739/src/main.cpp @@ -170,15 +170,7 @@ void EventHandler(const ChipDeviceEvent * event, intptr_t arg) } } -void HandleThreadStateChangeEvent(const ChipDeviceEvent * event) -{ -#if CHIP_BYPASS_RENDEZVOUS - if (event->ThreadStateChange.NetDataChanged && !ConnectivityMgr().IsThreadProvisioned()) - { - ThreadStackMgr().JoinerStart(); - } -#endif /* CHIP_BYPASS_RENDEZVOUS */ -} +void HandleThreadStateChangeEvent(const ChipDeviceEvent * event) {} void ActionInitiated(BoltLockManager::Action_t aAction, int32_t aActor) { diff --git a/examples/lock-app/esp32/README.md b/examples/lock-app/esp32/README.md index 8cc35eaf597e8f..d810491160ef7b 100644 --- a/examples/lock-app/esp32/README.md +++ b/examples/lock-app/esp32/README.md @@ -97,18 +97,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). ## Commissioning and cluster control -Commissioning can be carried out using WiFi, BLE or Bypass. +Commissioning can be carried out using WiFi or BLE. 1. Set the `Rendezvous Mode` for commissioning using menuconfig; the default Rendezvous mode is BLE. $ idf.py menuconfig -Select the Rendezvous Mode via `Demo -> Rendezvous Mode`. If Rendezvous Mode is -Bypass then set the credentials of the WiFi Network (i.e. SSID and Password from -menuconfig). - -`idf.py menuconfig -> Component config -> CHIP Device Layer -> WiFi Station Options` +Select the Rendezvous Mode via `Demo -> Rendezvous Mode`. 2. Now flash the device with the same command as before. (Use the right `/dev` device) diff --git a/examples/lock-app/esp32/main/CHIPDeviceManager.cpp b/examples/lock-app/esp32/main/CHIPDeviceManager.cpp index 579e68ada9c8d9..b6d0db29573370 100644 --- a/examples/lock-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/lock-app/esp32/main/CHIPDeviceManager.cpp @@ -69,12 +69,6 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) ConnectivityMgr().SetBLEAdvertisingEnabled(false); ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); } - else - { - // If rendezvous is bypassed, enable SoftAP so that the device can still - // be communicated with via its SoftAP as needed. - ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); - } // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/lock-app/esp32/main/Kconfig.projbuild b/examples/lock-app/esp32/main/Kconfig.projbuild index 36dc37930eda26..e2ec051d774fe1 100644 --- a/examples/lock-app/esp32/main/Kconfig.projbuild +++ b/examples/lock-app/esp32/main/Kconfig.projbuild @@ -26,8 +26,6 @@ menu "Demo" help Specifies the Rendezvous mode of the peripheral. - config RENDEZVOUS_MODE_BYPASS - bool "Bypass" config RENDEZVOUS_MODE_WIFI bool "Wi-Fi" config RENDEZVOUS_MODE_BLE @@ -55,7 +53,6 @@ menu "Demo" config RENDEZVOUS_MODE int range 0 8 - default 0 if RENDEZVOUS_MODE_BYPASS default 1 if RENDEZVOUS_MODE_WIFI default 2 if RENDEZVOUS_MODE_BLE default 4 if RENDEZVOUS_MODE_THREAD diff --git a/examples/lock-app/mbed/config.in b/examples/lock-app/mbed/config.in index 87619681f691c0..4725fbcd62a77e 100644 --- a/examples/lock-app/mbed/config.in +++ b/examples/lock-app/mbed/config.in @@ -1,7 +1,6 @@ CONFIG_CHIP_BUILD_TESTS=n CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS=y CONFIG_CHIP_PROJECT_CONFIG=main/include/CHIPProjectConfig.h -CONFIG_CHIP_BYPASS_RENDEZVOUS=n CONFIG_MBED_BSD_SOCKET_TRACE=n CONFIG_CHIP_PW_RPC=y CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 1accdfe81fe6bb..fb7cdfc7e3f671 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -376,11 +376,6 @@ void AppTask::StartThreadHandler(AppEvent * aEvent) if (aEvent->ButtonEvent.PinNo != THREAD_START_BUTTON) return; - if (chip::Server::GetInstance().AddTestCommissioning() != CHIP_NO_ERROR) - { - LOG_ERR("Failed to add test pairing"); - } - if (!ConnectivityMgr().IsThreadProvisioned()) { StartDefaultThreadNetwork(); diff --git a/examples/ota-provider-app/esp32/main/CHIPDeviceManager.cpp b/examples/ota-provider-app/esp32/main/CHIPDeviceManager.cpp index f4be7aacd8bf08..add55587dd3eb7 100644 --- a/examples/ota-provider-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/ota-provider-app/esp32/main/CHIPDeviceManager.cpp @@ -69,12 +69,6 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) ConnectivityMgr().SetBLEAdvertisingEnabled(false); ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); } - else - { - // If rendezvous is bypassed, enable SoftAP so that the device can still - // be communicated with via its SoftAP as needed. - ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); - } // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/ota-provider-app/esp32/main/Kconfig.projbuild b/examples/ota-provider-app/esp32/main/Kconfig.projbuild index b5a506f24a24fc..483b7585dc68c6 100644 --- a/examples/ota-provider-app/esp32/main/Kconfig.projbuild +++ b/examples/ota-provider-app/esp32/main/Kconfig.projbuild @@ -26,8 +26,6 @@ menu "Demo" help Specifies the Rendezvous mode of the peripheral. - config RENDEZVOUS_MODE_BYPASS - bool "Bypass" config RENDEZVOUS_MODE_WIFI bool "Wi-Fi" config RENDEZVOUS_MODE_BLE @@ -41,7 +39,6 @@ menu "Demo" config RENDEZVOUS_MODE int range 0 8 - default 0 if RENDEZVOUS_MODE_BYPASS default 1 if RENDEZVOUS_MODE_WIFI default 2 if RENDEZVOUS_MODE_BLE default 4 if RENDEZVOUS_MODE_THREAD diff --git a/examples/ota-requestor-app/esp32/main/CHIPDeviceManager.cpp b/examples/ota-requestor-app/esp32/main/CHIPDeviceManager.cpp index f4be7aacd8bf08..add55587dd3eb7 100644 --- a/examples/ota-requestor-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/ota-requestor-app/esp32/main/CHIPDeviceManager.cpp @@ -69,12 +69,6 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) ConnectivityMgr().SetBLEAdvertisingEnabled(false); ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); } - else - { - // If rendezvous is bypassed, enable SoftAP so that the device can still - // be communicated with via its SoftAP as needed. - ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); - } // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/ota-requestor-app/esp32/main/Kconfig.projbuild b/examples/ota-requestor-app/esp32/main/Kconfig.projbuild index 96a7f14d5c69ec..a563d7b2ae46ce 100644 --- a/examples/ota-requestor-app/esp32/main/Kconfig.projbuild +++ b/examples/ota-requestor-app/esp32/main/Kconfig.projbuild @@ -26,8 +26,6 @@ menu "Demo" help Specifies the Rendezvous mode of the peripheral. - config RENDEZVOUS_MODE_BYPASS - bool "Bypass" config RENDEZVOUS_MODE_WIFI bool "Wi-Fi" config RENDEZVOUS_MODE_BLE @@ -41,7 +39,6 @@ menu "Demo" config RENDEZVOUS_MODE int range 0 8 - default 0 if RENDEZVOUS_MODE_BYPASS default 1 if RENDEZVOUS_MODE_WIFI default 2 if RENDEZVOUS_MODE_BLE default 4 if RENDEZVOUS_MODE_THREAD diff --git a/examples/ota-requestor-app/mbed/config.in b/examples/ota-requestor-app/mbed/config.in index 93cc98cf544af1..9faec62faac967 100644 --- a/examples/ota-requestor-app/mbed/config.in +++ b/examples/ota-requestor-app/mbed/config.in @@ -1,7 +1,6 @@ CONFIG_CHIP_BUILD_TESTS=n CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS=y CONFIG_CHIP_PROJECT_CONFIG=main/include/CHIPProjectConfig.h -CONFIG_CHIP_BYPASS_RENDEZVOUS=n CONFIG_MBED_BSD_SOCKET_TRACE=n CONFIG_CHIP_OTA_REQUESTOR=y CONFIG_CHIP_DATA_MODEL=y \ No newline at end of file diff --git a/examples/persistent-storage/cc13x2x7_26x2x7/args.gni b/examples/persistent-storage/cc13x2x7_26x2x7/args.gni index 96bab211852345..86ad077d6f40f3 100644 --- a/examples/persistent-storage/cc13x2x7_26x2x7/args.gni +++ b/examples/persistent-storage/cc13x2x7_26x2x7/args.gni @@ -26,4 +26,3 @@ ti_simplelink_board = "LP_CC2652R7" # BLE options chip_config_network_layer_ble = true -chip_bypass_rendezvous = false diff --git a/examples/pigweed-app/mbed/config.in b/examples/pigweed-app/mbed/config.in index 89a6a784e8a438..40d50f04657d32 100644 --- a/examples/pigweed-app/mbed/config.in +++ b/examples/pigweed-app/mbed/config.in @@ -1,7 +1,6 @@ CONFIG_CHIP_BUILD_TESTS=n CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS=y CONFIG_CHIP_PROJECT_CONFIG=main/include/CHIPProjectConfig.h -CONFIG_CHIP_BYPASS_RENDEZVOUS=n CONFIG_MBED_BSD_SOCKET_TRACE=n CONFIG_CHIP_PW_RPC=y CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/pump-app/cc13x2x7_26x2x7/args.gni b/examples/pump-app/cc13x2x7_26x2x7/args.gni index 21aca9d359af72..2b1db21d690d61 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/args.gni +++ b/examples/pump-app/cc13x2x7_26x2x7/args.gni @@ -34,7 +34,6 @@ chip_enable_ota_requestor = true # BLE options chip_config_network_layer_ble = true -chip_bypass_rendezvous = false # Disable lock tracking, since our FreeRTOS configuration does not set # INCLUDE_xSemaphoreGetMutexHolder diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 7e62ce1b054fda..c448c5aeaa3de1 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -371,11 +371,6 @@ void AppTask::StartThreadHandler(AppEvent * aEvent) if (aEvent->ButtonEvent.PinNo != THREAD_START_BUTTON) return; - if (chip::Server::GetInstance().AddTestCommissioning() != CHIP_NO_ERROR) - { - LOG_ERR("Failed to add test pairing"); - } - if (!ConnectivityMgr().IsThreadProvisioned()) { StartDefaultThreadNetwork(); diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/args.gni b/examples/pump-controller-app/cc13x2x7_26x2x7/args.gni index 21aca9d359af72..2b1db21d690d61 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/args.gni +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/args.gni @@ -34,7 +34,6 @@ chip_enable_ota_requestor = true # BLE options chip_config_network_layer_ble = true -chip_bypass_rendezvous = false # Disable lock tracking, since our FreeRTOS configuration does not set # INCLUDE_xSemaphoreGetMutexHolder diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index c5e28e1f7c12fe..aea8dca3512337 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -368,11 +368,6 @@ void AppTask::StartThreadHandler(AppEvent * aEvent) if (aEvent->ButtonEvent.PinNo != THREAD_START_BUTTON) return; - if (chip::Server::GetInstance().AddTestCommissioning() != CHIP_NO_ERROR) - { - LOG_ERR("Failed to add test pairing"); - } - if (!ConnectivityMgr().IsThreadProvisioned()) { StartDefaultThreadNetwork(); diff --git a/examples/shell/mbed/config.in b/examples/shell/mbed/config.in index 700185f2f5ceca..768471bfdf866e 100644 --- a/examples/shell/mbed/config.in +++ b/examples/shell/mbed/config.in @@ -1,7 +1,6 @@ CONFIG_CHIP_BUILD_TESTS=n CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS=y CONFIG_CHIP_PROJECT_CONFIG=main/include/CHIPProjectConfig.h -CONFIG_CHIP_BYPASS_RENDEZVOUS=n CONFIG_CHIP_LIB_SHELL=y CONFIG_MBED_BSD_SOCKET_TRACE=n CONFIG_CHIP_OTA_REQUESTOR=y diff --git a/examples/temperature-measurement-app/esp32/README.md b/examples/temperature-measurement-app/esp32/README.md index 5603eec78054ed..c72660fe2f34e9 100644 --- a/examples/temperature-measurement-app/esp32/README.md +++ b/examples/temperature-measurement-app/esp32/README.md @@ -97,18 +97,14 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). ## Commissioning and cluster control -Commissioning can be carried out using WiFi, BLE or Bypass. +Commissioning can be carried out using WiFi or BLE. 1. Set the `Rendezvous Mode` for commissioning using menuconfig; the default Rendezvous mode is BLE. $ idf.py menuconfig -Select the Rendezvous Mode via `Demo -> Rendezvous Mode`. If Rendezvous Mode is -Bypass then set the credentials of the WiFi Network (i.e. SSID and Password from -menuconfig). - -`idf.py menuconfig -> Component config -> CHIP Device Layer -> WiFi Station Options` +Select the Rendezvous Mode via `Demo -> Rendezvous Mode`. 2. Now flash the device with the same command as before. (Use the right `/dev` device) diff --git a/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp b/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp index ae50dddbcb8670..665bb9f6b5133e 100644 --- a/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp @@ -72,12 +72,6 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) ConnectivityMgr().SetBLEAdvertisingEnabled(false); ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); } - else - { - // If rendezvous is bypassed, enable SoftAP so that the device can still - // be communicated with via its SoftAP as needed. - ConnectivityMgr().SetWiFiAPMode(ConnectivityManager::kWiFiAPMode_Enabled); - } // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/temperature-measurement-app/esp32/main/Kconfig.projbuild b/examples/temperature-measurement-app/esp32/main/Kconfig.projbuild index 36dc37930eda26..e2ec051d774fe1 100644 --- a/examples/temperature-measurement-app/esp32/main/Kconfig.projbuild +++ b/examples/temperature-measurement-app/esp32/main/Kconfig.projbuild @@ -26,8 +26,6 @@ menu "Demo" help Specifies the Rendezvous mode of the peripheral. - config RENDEZVOUS_MODE_BYPASS - bool "Bypass" config RENDEZVOUS_MODE_WIFI bool "Wi-Fi" config RENDEZVOUS_MODE_BLE @@ -55,7 +53,6 @@ menu "Demo" config RENDEZVOUS_MODE int range 0 8 - default 0 if RENDEZVOUS_MODE_BYPASS default 1 if RENDEZVOUS_MODE_WIFI default 2 if RENDEZVOUS_MODE_BLE default 4 if RENDEZVOUS_MODE_THREAD diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 949affe999294d..63af6a1a07d555 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -57,17 +57,6 @@ using chip::Transport::UdpListenParameters; namespace { -constexpr bool isRendezvousBypassed() -{ -#if defined(CHIP_BYPASS_RENDEZVOUS) && CHIP_BYPASS_RENDEZVOUS - return true; -#elif defined(CONFIG_RENDEZVOUS_MODE) - return static_cast(CONFIG_RENDEZVOUS_MODE) == RendezvousInformationFlag::kNone; -#else - return false; -#endif -} - void StopEventLoop(intptr_t arg) { CHIP_ERROR err = chip::DeviceLayer::PlatformMgr().StopEventLoopTask(); @@ -222,12 +211,7 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint SuccessOrExit(err); #endif - if (isRendezvousBypassed()) - { - ChipLogProgress(AppServer, "Rendezvous and secure pairing skipped"); - SuccessOrExit(err = AddTestCommissioning()); - } - else if (GetFabricTable().FabricCount() != 0) + if (GetFabricTable().FabricCount() != 0) { // The device is already commissioned, proactively disable BLE advertisement. ChipLogProgress(AppServer, "Fabric already commissioned. Disabling BLE advertisement"); @@ -392,33 +376,4 @@ CHIP_ERROR Server::SendUserDirectedCommissioningRequest(chip::Transport::PeerAdd } #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT -CHIP_ERROR Server::AddTestCommissioning() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - PASESession * testSession = nullptr; - PASESessionSerializable serializedTestSession; - SessionHolder session; - - mTestPairing.ToSerializable(serializedTestSession); - - testSession = chip::Platform::New(); - testSession->FromSerializable(serializedTestSession); - SuccessOrExit(err = mSessions.NewPairing(session, Optional{ PeerAddress::Uninitialized() }, - chip::kTestControllerNodeId, testSession, CryptoContext::SessionRole::kResponder, - kMinValidFabricIndex)); - -exit: - if (testSession) - { - testSession->Clear(); - chip::Platform::Delete(testSession); - } - - if (err != CHIP_NO_ERROR) - { - mFabrics.ReleaseFabricIndex(kMinValidFabricIndex); - } - return err; -} - } // namespace chip diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 0b717ce7cca056..e05c4ae54b4cb2 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -67,8 +67,6 @@ class Server CHIP_ERROR SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner); #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT - CHIP_ERROR AddTestCommissioning(); - /** * @brief Call this function to rejoin existing groups found in the GroupDataProvider */ diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index e5b1fc37f95bdc..a729ecd7f23346 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -509,15 +509,6 @@ FabricTable::~FabricTable() } } -void FabricTable::ReleaseFabricIndex(FabricIndex fabricIndex) -{ - FabricInfo * fabric = FindFabricWithIndex(fabricIndex); - if (fabric != nullptr) - { - fabric->Reset(); - } -} - FabricInfo * FabricTable::FindFabric(P256PublicKeySpan rootPubKey, FabricId fabricId) { static_assert(kMaxValidFabricIndex <= UINT8_MAX, "Cannot create more fabrics than UINT8_MAX"); @@ -750,7 +741,9 @@ CHIP_ERROR FabricTable::Delete(FabricIndex index) } ReturnErrorOnFailure(err); - ReleaseFabricIndex(index); + // Since fabricIsInitialized was true, fabric is not null. + fabric->Reset(); + if (mDelegate != nullptr) { if (mFabricCount == 0) diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index adcfbd680b05a3..5d8bdd15710a7b 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -393,8 +393,6 @@ class DLL_EXPORT FabricTable */ CHIP_ERROR AddNewFabric(FabricInfo & fabric, FabricIndex * assignedIndex); - void ReleaseFabricIndex(FabricIndex fabricIndex); - FabricInfo * FindFabric(Credentials::P256PublicKeySpan rootPubKey, FabricId fabricId); FabricInfo * FindFabricWithIndex(FabricIndex fabricIndex); FabricInfo * FindFabricWithCompressedId(CompressedFabricId fabricId); diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp index 969a1b484b9c14..146c967eb6a3a8 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp @@ -723,10 +723,6 @@ exit: template bool GenericConfigurationManagerImpl::IsFullyProvisioned() { -#if CHIP_BYPASS_RENDEZVOUS - return true; -#else // CHIP_BYPASS_RENDEZVOUS - return #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION ConnectivityMgr().IsWiFiStationProvisioned() && @@ -735,7 +731,6 @@ bool GenericConfigurationManagerImpl::IsFullyProvisioned() ConnectivityMgr().IsThreadProvisioned() && #endif true; -#endif // CHIP_BYPASS_RENDEZVOUS } template diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index f3d466068053ea..1ac8f1bba7f764 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -50,9 +50,6 @@ if (chip_device_platform != "none") { # Use OpenThread ftd or mtd library chip_device_config_thread_ftd = chip_openthread_ftd - # By pass provision and secure session - chip_bypass_rendezvous = false - # Enable including the additional data in the advertisement packets chip_enable_additional_data_advertising = false @@ -107,7 +104,6 @@ if (chip_device_platform != "none") { "CHIP_DEVICE_CONFIG_THREAD_FTD=${chip_device_config_thread_ftd}", "CHIP_WITH_GIO=${chip_with_gio}", "OPENTHREAD_CONFIG_ENABLE_TOBLE=false", - "CHIP_BYPASS_RENDEZVOUS=${chip_bypass_rendezvous}", "CHIP_STACK_LOCK_TRACKING_ENABLED=${chip_stack_lock_tracking_log}", "CHIP_STACK_LOCK_TRACKING_ERROR_FATAL=${chip_stack_lock_tracking_fatal}", "CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING=${chip_enable_additional_data_advertising}", diff --git a/src/platform/telink/CHIPDevicePlatformConfig.h b/src/platform/telink/CHIPDevicePlatformConfig.h index d80369615ca696..c927a95fc001a8 100644 --- a/src/platform/telink/CHIPDevicePlatformConfig.h +++ b/src/platform/telink/CHIPDevicePlatformConfig.h @@ -70,7 +70,3 @@ #else #define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART #endif // CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART - -#ifdef CONFIG_CHIP_ENABLE_RENDEZVOUS_BYPASS -#define CHIP_BYPASS_RENDEZVOUS CONFIG_CHIP_ENABLE_RENDEZVOUS_BYPASS -#endif // CONFIG_CHIP_ENABLE_RENDEZVOUS_BYPASS