diff --git a/oem/ibm/libpldmresponder/inband_code_update.cpp b/oem/ibm/libpldmresponder/inband_code_update.cpp
index 7055c46..bb06882 100644
--- a/oem/ibm/libpldmresponder/inband_code_update.cpp
+++ b/oem/ibm/libpldmresponder/inband_code_update.cpp
@@ -13,7 +13,6 @@
 
 #include <exception>
 #include <fstream>
-
 namespace pldm
 {
 namespace responder
@@ -96,6 +95,53 @@
     return PLDM_SUCCESS;
 }
 
+int CodeUpdate::setRequestedApplyTime()
+{
+    int rc = PLDM_SUCCESS;
+    pldm::utils::PropertyValue value =
+        "xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.OnReset";
+    DBusMapping dbusMapping;
+    dbusMapping.objectPath = "/xyz/openbmc_project/software/apply_time";
+    dbusMapping.interface = "xyz.openbmc_project.Software.ApplyTime";
+    dbusMapping.propertyName = "RequestedApplyTime";
+    dbusMapping.propertyType = "string";
+    try
+    {
+        pldm::utils::DBusHandler().setDbusProperty(dbusMapping, value);
+    }
+    catch (const std::exception& e)
+    {
+        std::cerr << "Failed To set RequestedApplyTime property "
+                  << "ERROR=" << e.what() << std::endl;
+        rc = PLDM_ERROR;
+    }
+    return rc;
+}
+
+int CodeUpdate::setRequestedActivation()
+{
+    int rc = PLDM_SUCCESS;
+    pldm::utils::PropertyValue value =
+        "xyz.openbmc_project.Software.Activation.RequestedActivations.Active";
+    DBusMapping dbusMapping;
+    dbusMapping.objectPath = newImageId;
+    dbusMapping.interface = "xyz.openbmc_project.Software.Activation";
+    dbusMapping.propertyName = "RequestedActivation";
+    dbusMapping.propertyType = "string";
+    try
+    {
+        pldm::utils::DBusHandler().setDbusProperty(dbusMapping, value);
+    }
+    catch (const std::exception& e)
+    {
+        std::cerr << "Failed To set RequestedActivation property"
+                  << "ERROR=" << e.what() << std::endl;
+        rc = PLDM_ERROR;
+    }
+    newImageId.clear();
+    return rc;
+}
+
 void CodeUpdate::setVersions()
 {
     static constexpr auto mapperService = "xyz.openbmc_project.ObjectMapper";
diff --git a/oem/ibm/libpldmresponder/inband_code_update.hpp b/oem/ibm/libpldmresponder/inband_code_update.hpp
index 28c7c9c..77ada56 100644
--- a/oem/ibm/libpldmresponder/inband_code_update.hpp
+++ b/oem/ibm/libpldmresponder/inband_code_update.hpp
@@ -101,6 +101,20 @@
      */
     void clearDirPath(const std::string& dirPath);
 
+    /* @brief Method to set the RequestApplyTime D-Bus property
+     *        on start update to OnReset
+     * @return - Completion codes
+     */
+    int setRequestedApplyTime();
+
+    /* @brief Method to set the RequestedActivation D-Bus property
+     *        on end update to Active by fetching the newImageID and
+     *        clearning it once RequestedActivation is set or on error
+     * @param[in] codeUpdate - codeUpdate pointer
+     * @return - Completion codes
+     */
+    int setRequestedActivation();
+
     virtual ~CodeUpdate()
     {}
 
diff --git a/oem/ibm/libpldmresponder/oem_ibm_handler.cpp b/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
index 53c1bfc..1c6b3fd 100644
--- a/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
+++ b/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
@@ -3,8 +3,9 @@
 #include "libpldm/entity.h"
 #include "libpldm/requester/pldm.h"
 
+#include "file_io_type_lid.hpp"
+#include "libpldmresponder/file_io.hpp"
 #include "libpldmresponder/pdr_utils.hpp"
-
 namespace pldm
 {
 namespace responder
@@ -58,6 +59,37 @@
                 rc = setBootSide(entityInstance, currState, stateField,
                                  codeUpdate);
             }
+            else if (entityType == PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE &&
+                     stateSetId == PLDM_OEM_IBM_FIRMWARE_UPDATE_STATE)
+            {
+                if (stateField[currState].effecter_state ==
+                    uint8_t(CodeUpdateState::START))
+                {
+                    codeUpdate->setCodeUpdateProgress(true);
+                    rc = codeUpdate->setRequestedApplyTime();
+                }
+                else if (stateField[currState].effecter_state ==
+                         uint8_t(CodeUpdateState::END))
+                {
+                    codeUpdate->setCodeUpdateProgress(false);
+                }
+                else if (stateField[currState].effecter_state ==
+                         uint8_t(CodeUpdateState::ABORT))
+                {
+                    codeUpdate->setCodeUpdateProgress(false);
+                    codeUpdate->clearDirPath(LID_STAGING_DIR);
+                }
+                else if (stateField[currState].effecter_state ==
+                         uint8_t(CodeUpdateState::ACCEPT))
+                {
+                    // TODO Set new Dbus property provided by code update app
+                }
+                else if (stateField[currState].effecter_state ==
+                         uint8_t(CodeUpdateState::REJECT))
+                {
+                    // TODO Set new Dbus property provided by code update app
+                }
+            }
             else
             {
                 rc = PLDM_PLATFORM_SET_EFFECTER_UNSUPPORTED_SENSORSTATE;
diff --git a/oem/ibm/libpldmresponder/oem_ibm_handler.hpp b/oem/ibm/libpldmresponder/oem_ibm_handler.hpp
index bacc3f0..17ad008 100644
--- a/oem/ibm/libpldmresponder/oem_ibm_handler.hpp
+++ b/oem/ibm/libpldmresponder/oem_ibm_handler.hpp
@@ -1,5 +1,4 @@
 #pragma once
-
 #include "libpldm/platform.h"
 
 #include "inband_code_update.hpp"
