Fix compiling errors for ESP32H2 (#19365)
diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp
index 748ad7e..28a6f8b 100644
--- a/examples/lighting-app/esp32/main/main.cpp
+++ b/examples/lighting-app/esp32/main/main.cpp
@@ -32,6 +32,7 @@
using namespace ::chip;
using namespace ::chip::DeviceManager;
+using namespace ::chip::DeviceLayer;
LEDWidget AppLED;
diff --git a/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 b/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2
index ee5067a..3a6d8da 100644
--- a/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2
+++ b/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2
@@ -65,5 +65,9 @@
# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y
+# Disable STA and AP for ESP32H2
+CONFIG_ENABLE_WIFI_STATION=n
+CONFIG_ENABLE_WIFI_AP=n
+
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=y
diff --git a/examples/platform/esp32/common/Esp32AppServer.cpp b/examples/platform/esp32/common/Esp32AppServer.cpp
index 2d8e42d..ee3dbdd 100644
--- a/examples/platform/esp32/common/Esp32AppServer.cpp
+++ b/examples/platform/esp32/common/Esp32AppServer.cpp
@@ -19,6 +19,7 @@
#include "Esp32AppServer.h"
#include "CHIPDeviceManager.h"
#include <app/clusters/network-commissioning/network-commissioning.h>
+#include <app/server/Dnssd.h>
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
@@ -31,6 +32,7 @@
using namespace chip;
using namespace chip::Credentials;
using namespace chip::DeviceLayer;
+
namespace {
#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
app::Clusters::NetworkCommissioning::Instance
@@ -67,7 +69,7 @@
if (chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned() &&
(chip::Server::GetInstance().GetFabricTable().FabricCount() != 0))
{
- ESP_LOGI(TAG, "Thread has been provisioned, publish the dns service now");
+ ESP_LOGI("ESP32AppServer", "Thread has been provisioned, publish the dns service now");
chip::app::DnssdServer::Instance().StartServer();
}
#endif