diff --git a/examples/lock-app/cc13x2x7_26x2x7/BUILD.gn b/examples/lock-app/cc13x2x7_26x2x7/BUILD.gn index 57792e12f69e0c..f885f8dc87fa5c 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/lock-app/cc13x2x7_26x2x7/BUILD.gn @@ -78,6 +78,7 @@ ti_simplelink_executable("lock_app") { "${project_dir}/main/BoltLockManager.cpp", "${project_dir}/main/ZclCallbacks.cpp", "${project_dir}/main/main.cpp", + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", ] deps = [ @@ -96,6 +97,7 @@ ti_simplelink_executable("lock_app") { include_dirs = [ "${project_dir}", "${project_dir}/main", + "${chip_root}/examples/providers/", ] cflags = [ diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp index a0d30130644e43..4854eb4c5af0d8 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR @@ -63,6 +64,7 @@ static LED_Handle sAppRedHandle; static LED_Handle sAppGreenHandle; static Button_Handle sAppLeftHandle; static Button_Handle sAppRightHandle; +static DeviceInfoProviderImpl sExampleDeviceInfoProvider; AppTask AppTask::sAppTask; @@ -166,6 +168,11 @@ int AppTask::Init() PLAT_LOG("Initialize Server"); static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); + + // Initialize info provider + sExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); + SetDeviceInfoProvider(&sExampleDeviceInfoProvider); + chip::Server::GetInstance().Init(initParams); // Initialize device attestation config