diff --git a/examples/ota-requestor-app/esp32/main/OTARequesterImpl.cpp b/examples/ota-requestor-app/esp32/main/OTARequesterImpl.cpp index f357a5792c32a2..32c14e804f2bfb 100644 --- a/examples/ota-requestor-app/esp32/main/OTARequesterImpl.cpp +++ b/examples/ota-requestor-app/esp32/main/OTARequesterImpl.cpp @@ -32,7 +32,7 @@ using chip::ByteSpan; using chip::CharSpan; -using chip::DeviceProxy; +using chip::OperationalDeviceProxy; using chip::EndpointId; using chip::FabricIndex; using chip::NodeId; @@ -56,7 +56,7 @@ void OnQueryImageFailure(void * context, EmberAfStatus status); void OnApplyUpdateResponse(void * context, const ApplyUpdateResponse::DecodableType & response); void OnApplyUpdateRequestFailure(void * context, EmberAfStatus status); -void OnConnected(void * context, chip::DeviceProxy * deviceProxy); +void OnConnected(void * context, chip::OperationalDeviceProxy * deviceProxy); void OnConnectionFailure(void * context, NodeId deviceId, CHIP_ERROR error); void OnBlockReceived(void * context, const chip::bdx::TransferSession::BlockData & blockdata); @@ -175,7 +175,7 @@ void OnApplyUpdateRequestFailure(void * context, EmberAfStatus status) ChipLogDetail(SoftwareUpdate, "ApplyUpdateRequest failure response %" PRIu8, status); } -void OnConnected(void * context, chip::DeviceProxy * deviceProxy) +void OnConnected(void * context, chip::OperationalDeviceProxy * deviceProxy) { ChipLogDetail(SoftwareUpdate, "Callback OnConnected"); uint8_t * command = reinterpret_cast(context); diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index 3acbe4f8d0d94e..71f5e3b491b95b 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -17,6 +17,8 @@ #include "CHIPDeviceManager.h" #include "DeviceCallbacks.h" +#include "app/util/af-enums.h" +#include "app/util/af.h" #include "esp_heap_caps_init.h" #include "esp_log.h" #include "esp_netif.h" @@ -180,3 +182,14 @@ extern "C" void app_main() ESPInitConsole(); } + +// TODO: We should use the function definition in /src/app/clusters/ota-requestor/ClusterInterface.cpp +// Temporarily add this function. + +bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) +{ + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); + return true; +}