diff --git a/CHANGELOG.md b/CHANGELOG.md index b14d8315b..98e67ffa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [1.2.1](https://github.com/rdkcentral/tr69hostif/compare/1.2.0...1.2.1) + +- RDK-58526 : Default IPControl RFC for EU partners [`#203`](https://github.com/rdkcentral/tr69hostif/pull/203) +- RDK-57868 : Default IPControl RFC for EU partners [`#200`](https://github.com/rdkcentral/tr69hostif/pull/200) +- RDK-57867 : Default the IUI layer separation RFC globally for EntOS [`#193`](https://github.com/rdkcentral/tr69hostif/pull/193) +- Merge tag '1.2.0' into develop [`9b98df0`](https://github.com/rdkcentral/tr69hostif/commit/9b98df0330008138a47b6f18a4314df6f0a7adc1) + #### [1.2.0](https://github.com/rdkcentral/tr69hostif/compare/1.1.9...1.2.0) +> 27 June 2025 + - RDK-57649 [RDKE] - TR69HostIf Performance Monitoring and Optimized Logging [`#185`](https://github.com/rdkcentral/tr69hostif/pull/185) +- 1.2.0 release changelog updates [`0e68c7e`](https://github.com/rdkcentral/tr69hostif/commit/0e68c7e79ca5b155a93fa1ac6a11db218486504d) - Merge tag '1.1.9' into develop [`083a042`](https://github.com/rdkcentral/tr69hostif/commit/083a042ce2eb4bcfc24bf95f24e8f04e897fe7c4) #### [1.1.9](https://github.com/rdkcentral/tr69hostif/compare/1.1.8...1.1.9) diff --git a/src/hostif/handlers/Makefile.am b/src/hostif/handlers/Makefile.am index 687ef8eb5..bdb7fbf5b 100644 --- a/src/hostif/handlers/Makefile.am +++ b/src/hostif/handlers/Makefile.am @@ -94,7 +94,7 @@ if WITH_SNMP_ADAPTER AM_CXXFLAGS += -DSNMP_ADAPTER_ENABLED -I$(top_srcdir)/src/hostif/snmpAdapter endif -AM_LDFLAGS = $(GLIB_LIBS) $(G_THREAD_LIBS) $(SOUP_LIBS) $(PROCPS_LIBS) -lIARMBus -lyajl -lds -ldshalcli -ldbus-1 +AM_LDFLAGS = $(GLIB_LIBS) $(G_THREAD_LIBS) $(SOUP_LIBS) $(PROCPS_LIBS) -lIARMBus -lyajl -lds -ldshalcli -ldbus-1 -lsecure_wrapper if WIFI_CLIENT_ROAMING AM_CXXFLAGS += -DWIFI_CLIENT_ROAMING endif diff --git a/src/hostif/handlers/include/hostIf_XREClient_ReqHandler.h b/src/hostif/handlers/include/hostIf_XREClient_ReqHandler.h index 64f922c2f..2f4cb38c0 100755 --- a/src/hostif/handlers/include/hostIf_XREClient_ReqHandler.h +++ b/src/hostif/handlers/include/hostIf_XREClient_ReqHandler.h @@ -50,6 +50,7 @@ #include "hostIf_msgHandler.h" #include "hostIf_updateHandler.h" #include "hostIf_main.h" +#include "secure_wrapper.h" /** * @brief This class provides the interface for getting XRE request handler information. @@ -78,6 +79,8 @@ class XREClientReqHandler : public msgHandler static msgHandler* getInstance(); }; +int set_Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow(HOSTIF_MsgData_t *stMsgData); +int get_Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow(HOSTIF_MsgData_t *stMsgData); #endif /* HOSTIF_XRECLIENT_REQHANDLER_H_ */ /* End of HOSTIF_XRECLIENT_REQHANDLER_H_ doxygen group */ /** diff --git a/src/hostif/handlers/src/hostIf_XREClient_ReqHandler.cpp b/src/hostif/handlers/src/hostIf_XREClient_ReqHandler.cpp index e4add2545..0c5ee286d 100644 --- a/src/hostif/handlers/src/hostIf_XREClient_ReqHandler.cpp +++ b/src/hostif/handlers/src/hostIf_XREClient_ReqHandler.cpp @@ -45,6 +45,8 @@ updateCallback XREClientReqHandler::mUpdateCallback = NULL; GMutex XREClientReqHandler::m_mutex; int XREClientReqHandler::numOfEntries = 0; +#define XCONF_CHECKNOW_SCRIPT_CMD "backgroundrun /usr/bin/rdkvfwupgrader 0 3 >> /opt/logs/swupdate.log" + msgHandler* XREClientReqHandler::getInstance() { @@ -199,6 +201,10 @@ int XREClientReqHandler::handleGetMsg(HOSTIF_MsgData_t *stMsgData) { ret = get_Device_X_COMCAST_COM_Xcalibur_Client_XRE_xreEnable(stMsgData); } + else if(strcasecmp(stMsgData->paramName,"Device.X_COMCAST-COM_Xcalibur.Client.xconfCheckNow") == 0) + { + ret = get_Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow(stMsgData); + } else if(strcasecmp(stMsgData->paramName,"Device.X_COMCAST-COM_Xcalibur.Client.XRE.xreStatus") == 0) { ret = get_Device_X_COMCAST_COM_Xcalibur_Client_XRE_xreStatus(stMsgData); @@ -469,6 +475,48 @@ void XREClientReqHandler::registerUpdateCallback(updateCallback cb) mUpdateCallback = cb; } +int set_Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow(HOSTIF_MsgData_t *stMsgData) +{ + FILE *file = fopen("/tmp/xconfchecknow_val", "w"); + if (file == NULL) { + RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF, "[%s:%s:%d]Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow: Error opening file for write.\n",__FILE__,__FUNCTION__,__LINE__); + return NOK; + } + fprintf(file, "%s", stMsgData->paramValue); + fclose(file); + if(0 == strncasecmp("TRUE",stMsgData->paramValue ,strlen("TRUE")) || 0 == strncasecmp("CANARY",stMsgData->paramValue ,strlen("CANARY"))) + { + /*On setting xconfCheckNow,results the device to connect with the XCONF server + for the purpose of firmware and configuration checks.*/ + if(-1 == v_secure_system(XCONF_CHECKNOW_SCRIPT_CMD)) + { + RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF, "[%s:%s:%d]Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow: Running checkNow script failed.\n",__FILE__,__FUNCTION__,__LINE__); + + return NOK; + } + + RDK_LOG(RDK_LOG_INFO,LOG_TR69HOSTIF, "[%s:%s:%d]Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow: CheckNow Running... \n",__FILE__,__FUNCTION__,__LINE__); + } + else + { + RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF, "[%s:%s:%d]Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow: \"%s\" Invalid Input. Valid Input is \"TRUE\" \n",__FILE__,__FUNCTION__,__LINE__,stMsgData->paramValue); + return NOK; + } + return OK; +} + +int get_Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow(HOSTIF_MsgData_t *stMsgData) +{ + FILE *file = fopen("/tmp/xconfchecknow_val", "r"); + if (file == NULL) { + RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF, "[%s:%s:%d]Device_X_COMCAST_COM_Xcalibur_Client_xconfCheckNow: Error opening file for read.\n",__FILE__,__FUNCTION__,__LINE__); + return NOK; + } + fscanf(file, "%9s", stMsgData->paramValue); + fclose(file); + return OK; +} + void XREClientReqHandler::checkForUpdates() { HOSTIF_MsgData_t msgData; diff --git a/src/hostif/parodusClient/waldb/data-model/data-model-generic.xml b/src/hostif/parodusClient/waldb/data-model/data-model-generic.xml index 8702609b7..7a0d81180 100755 --- a/src/hostif/parodusClient/waldb/data-model/data-model-generic.xml +++ b/src/hostif/parodusClient/waldb/data-model/data-model-generic.xml @@ -224,13 +224,13 @@ - + - + @@ -511,6 +511,14 @@ + + + + + + + + @@ -3554,6 +3562,18 @@ + + + + + + + + + + + + diff --git a/src/hostif/profiles/DeviceInfo/Device_DeviceInfo.cpp b/src/hostif/profiles/DeviceInfo/Device_DeviceInfo.cpp index 7e94754e6..48e2323b0 100644 --- a/src/hostif/profiles/DeviceInfo/Device_DeviceInfo.cpp +++ b/src/hostif/profiles/DeviceInfo/Device_DeviceInfo.cpp @@ -3904,6 +3904,14 @@ int hostIf_DeviceInfo::set_xRDKCentralComRFC(HOSTIF_MsgData_t * stMsgData) ret = set_Device_DeviceInfo_X_RDKCENTRAL_COM_RDKRemoteDebuggerWebCfgData(stMsgData); } #endif + else if (strcasecmp(stMsgData->paramName,CANARY_START_TIME) == 0) + { + ret = set_Device_DeviceInfo_X_RDKCENTRAL_COM_Canary_wakeUpStart(stMsgData); + } + else if (strcasecmp(stMsgData->paramName,CANARY_END_TIME) == 0) + { + ret = set_Device_DeviceInfo_X_RDKCENTRAL_COM_Canary_wakeUpEnd(stMsgData); + } else if (strcasecmp(stMsgData->paramName,RDK_REBOOTSTOP_ENABLE) == 0) { ret = set_Device_DeviceInfo_X_RDKCENTRAL_COM_RebootStopEnable(stMsgData); @@ -4227,6 +4235,32 @@ int hostIf_DeviceInfo::set_Device_DeviceInfo_X_RDKCENTRAL_COM_RDKRemoteDebuggerW } #endif +int hostIf_DeviceInfo::set_Device_DeviceInfo_X_RDKCENTRAL_COM_Canary_wakeUpStart (HOSTIF_MsgData_t *stMsgData) +{ + int startTime = 0; + int retVal = NOK; + RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s] Entering... \n",__FUNCTION__); + startTime = atoi(stMsgData->paramValue); + RDK_LOG(RDK_LOG_INFO,LOG_TR69HOSTIF,"[%s] Start Time Value is %d \n",__FUNCTION__, startTime); + retVal = OK; + + RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s] Exiting... \n",__FUNCTION__); + return retVal; +} + +int hostIf_DeviceInfo::set_Device_DeviceInfo_X_RDKCENTRAL_COM_Canary_wakeUpEnd (HOSTIF_MsgData_t *stMsgData) +{ + int endTime = 0; + int retVal = NOK; + RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s] Entering... \n",__FUNCTION__); + endTime = atoi(stMsgData->paramValue); + RDK_LOG(RDK_LOG_INFO,LOG_TR69HOSTIF,"[%s] End Time Value is %d \n",__FUNCTION__, endTime); + retVal = OK; + + RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s] Exiting... \n",__FUNCTION__); + return retVal; +} + int hostIf_DeviceInfo::set_Device_DeviceInfo_X_RDKCENTRAL_COM_RebootStopEnable(HOSTIF_MsgData_t *stMsgData) { int ret = NOK; diff --git a/src/hostif/profiles/DeviceInfo/Device_DeviceInfo.h b/src/hostif/profiles/DeviceInfo/Device_DeviceInfo.h index be3597b97..60f10be50 100644 --- a/src/hostif/profiles/DeviceInfo/Device_DeviceInfo.h +++ b/src/hostif/profiles/DeviceInfo/Device_DeviceInfo.h @@ -192,6 +192,10 @@ #define RDK_REBOOTSTOP_ENABLE "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RebootStop.Enable" #define APPARMOR_BLOCKLIST_PROCESS "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.NonRootSupport.ApparmorBlocklist" +/* Profile: X_RDKCENTRAL-COM_RFC.Canary */ +#define CANARY_START_TIME "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Canary.wakeUpStart" +#define CANARY_END_TIME "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Canary.wakeUpEnd" + /** * @brief This class provides the interface for getting device information. * @ingroup TR69_HOSTIF_DEVICEINFO_CLASSES @@ -1228,6 +1232,23 @@ class hostIf_DeviceInfo { int set_Device_DeviceInfo_X_RDKCENTRAL_COM_RDKRemoteDebuggerIssueType(HOSTIF_MsgData_t *); int set_Device_DeviceInfo_X_RDKCENTRAL_COM_RDKRemoteDebuggerWebCfgData(HOSTIF_MsgData_t *); #endif + + /* + * @brief set_Device_DeviceInfo_X_RDKCENTRAL_COM_CanaryStartTime, set_Device_DeviceInfo_X_RDKCENTRAL_COM_CanaryEndTime, set_Device_DeviceInfo_X_RDKCENTRAL_COM_CanaryExtendTime + * + * This method is to get the Issuetype from QA. + * with following TR-069 definition: + * Parameter Name: Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Canary.wakeUpStart, + * Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Canary.wakeUpEnd, + * Data type: String - Arguments Start/End Time + * + * @retval OK if it is successful. + * @retval NOK if operation fails. + */ + + int set_Device_DeviceInfo_X_RDKCENTRAL_COM_Canary_wakeUpStart(HOSTIF_MsgData_t *); + int set_Device_DeviceInfo_X_RDKCENTRAL_COM_Canary_wakeUpEnd(HOSTIF_MsgData_t *); + /* * @brief set_Device_DeviceInfo_X_RDKCENTRAL_COM_RebootStopEnable *