diff --git a/examples/lighting-app/bouffalolab/bl602/BUILD.gn b/examples/lighting-app/bouffalolab/bl602/BUILD.gn index a6ef75ec04a1a0..ef0424f16ed10d 100644 --- a/examples/lighting-app/bouffalolab/bl602/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl602/BUILD.gn @@ -104,6 +104,7 @@ bouffalolab_executable("lighting_app") { } sources += [ + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", "${example_common_dir}/AppTask.cpp", "${example_common_dir}/ZclCallbacks.cpp", "${examples_plat_common_dir}/plat/LEDWidget.cpp", diff --git a/examples/lighting-app/bouffalolab/bl702/BUILD.gn b/examples/lighting-app/bouffalolab/bl702/BUILD.gn index 19dfe7aa7e70af..75eeba1aaf569d 100644 --- a/examples/lighting-app/bouffalolab/bl702/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702/BUILD.gn @@ -137,6 +137,7 @@ bouffalolab_executable("lighting_app") { deps = [ ":sdk", "${chip_root}/examples/lighting-app/lighting-common", + "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", "${chip_root}/third_party/openthread/platforms:libopenthread-platform", diff --git a/examples/platform/bouffalolab/common/plat/platform.cpp b/examples/platform/bouffalolab/common/plat/platform.cpp index a6d142a1a75575..692b469eeb2c3b 100644 --- a/examples/platform/bouffalolab/common/plat/platform.cpp +++ b/examples/platform/bouffalolab/common/plat/platform.cpp @@ -58,6 +58,8 @@ #include "Rpc.h" #endif +#include + #if CONFIG_ENABLE_CHIP_SHELL || PW_RPC_ENABLED #include "uart.h" #endif @@ -77,6 +79,8 @@ chip::app::Clusters::NetworkCommissioning::Instance } #endif +static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + void ChipEventHandler(const ChipDeviceEvent * event, intptr_t arg) { switch (event->Type) @@ -201,11 +205,15 @@ CHIP_ERROR PlatformManagerImpl::PlatformInit(void) chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(EXT_DISCOVERY_TIMEOUT_SECS); #endif + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + static CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); ReturnLogErrorOnFailure(chip::Server::GetInstance().Init(initParams)); + gExampleDeviceInfoProvider.SetStorageDelegate(&chip::Server::GetInstance().GetPersistentStorage()); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); #if CHIP_ENABLE_OPENTHREAD