diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index 5e7a6fa8bbc517..88a6f8be8916ca 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -273,6 +273,7 @@ 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) chip_gn_arg_bool ("chip_build_pw_rpc_echo_proto" CONFIG_CHIP_PW_RPC_ECHO_PROTO) chip_gn_arg_bool ("chip_build_pw_rpc_common_proto" CONFIG_CHIP_PW_RPC_COMMON_PROTO) diff --git a/examples/all-clusters-app/mbed/config.in b/examples/all-clusters-app/mbed/config.in index 2542a38c16f4c3..06344ef792c72e 100644 --- a/examples/all-clusters-app/mbed/config.in +++ b/examples/all-clusters-app/mbed/config.in @@ -2,4 +2,5 @@ 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 \ No newline at end of file +CONFIG_MBED_BSD_SOCKET_TRACE=n +CONFIG_CHIP_DATA_MODEL=y \ No newline at end of file diff --git a/examples/lighting-app/mbed/config.in b/examples/lighting-app/mbed/config.in index a13a8e62e17b43..b5afd1d4490db4 100644 --- a/examples/lighting-app/mbed/config.in +++ b/examples/lighting-app/mbed/config.in @@ -3,4 +3,5 @@ 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 \ No newline at end of file +CONFIG_CHIP_PW_RPC=y +CONFIG_CHIP_DATA_MODEL=y \ No newline at end of file diff --git a/examples/lock-app/mbed/config.in b/examples/lock-app/mbed/config.in index a13a8e62e17b43..b5afd1d4490db4 100644 --- a/examples/lock-app/mbed/config.in +++ b/examples/lock-app/mbed/config.in @@ -3,4 +3,5 @@ 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 \ No newline at end of file +CONFIG_CHIP_PW_RPC=y +CONFIG_CHIP_DATA_MODEL=y \ No newline at end of file diff --git a/examples/ota-requestor-app/mbed/config.in b/examples/ota-requestor-app/mbed/config.in index 262822b1ca58df..93cc98cf544af1 100644 --- a/examples/ota-requestor-app/mbed/config.in +++ b/examples/ota-requestor-app/mbed/config.in @@ -3,4 +3,5 @@ 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 \ No newline at end of file +CONFIG_CHIP_OTA_REQUESTOR=y +CONFIG_CHIP_DATA_MODEL=y \ No newline at end of file diff --git a/examples/pigweed-app/mbed/config.in b/examples/pigweed-app/mbed/config.in index a13a8e62e17b43..ad9fab5f6a2b19 100644 --- a/examples/pigweed-app/mbed/config.in +++ b/examples/pigweed-app/mbed/config.in @@ -3,4 +3,5 @@ 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 \ No newline at end of file +CONFIG_CHIP_PW_RPC=y +CONFIG_CHIP_DATA_MODEL=n \ No newline at end of file diff --git a/examples/shell/mbed/config.in b/examples/shell/mbed/config.in index 33fc7acf3c4a8f..e22298ab16948c 100644 --- a/examples/shell/mbed/config.in +++ b/examples/shell/mbed/config.in @@ -4,3 +4,4 @@ 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_DATA_MODEL=n \ No newline at end of file diff --git a/src/platform/mbed/ConnectivityManagerImpl_WiFi.cpp b/src/platform/mbed/ConnectivityManagerImpl_WiFi.cpp index 94a942180b2772..57aca8b67b5183 100644 --- a/src/platform/mbed/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/mbed/ConnectivityManagerImpl_WiFi.cpp @@ -38,10 +38,12 @@ using namespace ::chip::DeviceLayer::Internal; namespace chip { namespace DeviceLayer { +#if CHIP_DEVICE_ENABLE_DATA_MODEL namespace { app::Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::WiFiDriverImpl::GetInstance())); } // namespace +#endif // CHIP_DEVICE_ENABLE_DATA_MODEL CHIP_ERROR ConnectivityManagerImpl::InitWiFi() { @@ -51,10 +53,12 @@ CHIP_ERROR ConnectivityManagerImpl::InitWiFi() mWiFiStationState = kWiFiStationState_NotConnected; mWiFiStationReconnectInterval = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL); - +#if CHIP_DEVICE_ENABLE_DATA_MODEL err = sWiFiNetworkCommissioningInstance.Init(); - VerifyOrExit(err == CHIP_NO_ERROR, - ChipLogError(DeviceLayer, "WiFi network commissioning instance init failed: %s", chip::ErrorStr(err))); +#else + err = NetworkCommissioning::WiFiDriverImpl::GetInstance().Init(); +#endif + VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DeviceLayer, "WiFi driver init failed: %s", chip::ErrorStr(err))); mWiFiStationMode = kWiFiStationMode_Enabled; networks = NetworkCommissioning::WiFiDriverImpl::GetInstance().GetNetworks(); diff --git a/src/test_driver/mbed/unit_tests/config.in b/src/test_driver/mbed/unit_tests/config.in index 11e0c0f68a10a9..a05daae71a9792 100644 --- a/src/test_driver/mbed/unit_tests/config.in +++ b/src/test_driver/mbed/unit_tests/config.in @@ -2,3 +2,4 @@ CONFIG_CHIP_BUILD_TESTS=y CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS=y CONFIG_CHIP_PROJECT_CONFIG=main/include/CHIPProjectConfig.h CONFIG_MBED_BSD_SOCKET_TRACE=n +CONFIG_CHIP_DATA_MODEL=n \ No newline at end of file