Skip to content

Rebase#408

Open
Abhinavpv28 wants to merge 126 commits into
topic/RDKEMW-14888from
develop
Open

Rebase#408
Abhinavpv28 wants to merge 126 commits into
topic/RDKEMW-14888from
develop

Conversation

@Abhinavpv28

Copy link
Copy Markdown
Contributor

No description provided.

Abhinavpv28 and others added 13 commits March 5, 2026 10:21
…373)

* Update Device_DeviceInfo.cpp

* RKEMW-14685

* Update src/hostif/parodusClient/waldb/data-model/data-model-tv.xml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/hostif/profiles/DeviceInfo/Device_DeviceInfo.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Device_DeviceInfo.cpp

---------

Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>
* Squashed commit of the following:

commit a63b72a
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Fri Mar 6 16:17:48 2026 +0530

    Update Device_Time.cpp

commit c866060
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 17:03:45 2026 +0530

    Update Device_Time.cpp

commit 03b6d0a
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:18:44 2026 +0530

    Update data-model-tv.xml

commit c84d849
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:17:11 2026 +0530

    Update data-model-stb.xml

commit 9e24d50
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:14:54 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit c83612a
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:11:50 2026 +0530

    Update Device_Time.cpp

commit 3853b2b
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:08:28 2026 +0530

    Update Device_Time.h

commit 6908f2b
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 22:34:19 2026 +0530

    Update data-model-stb.xml

commit 8f717a9
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 22:33:08 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit 7a3dbac
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 22:30:30 2026 +0530

    Update Device_Time.h

commit ab34324
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 22:29:50 2026 +0530

    Update Device_Time.cpp

commit 0f386b9
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 17:12:41 2026 +0530

    Update Device_Time.cpp

commit e24d793
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:29:58 2026 +0530

    Update data-model-tv.xml

commit bf25e34
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:29:05 2026 +0530

    Update data-model-stb.xml

commit 7f69be3
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:27:51 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit 6de2b88
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:26:53 2026 +0530

    Update Device_Time.cpp

commit 989316f
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:18:49 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit 8f019c8
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:18:19 2026 +0530

    Update data-model-stb.xml

commit dc8a607
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 14:53:59 2026 +0530

    Update Device_Time.cpp

commit 05ebbe9
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 14:19:11 2026 +0530

    Update Device_Time.cpp

commit fe409e5
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 13:01:00 2026 +0530

    Update Device_Time.cpp

commit 6ccb7a7
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 12:49:46 2026 +0530

    Update Device_Time.h

commit a50d3e1
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 12:49:10 2026 +0530

    Update Device_Time.cpp

commit af488db
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 11:56:03 2026 +0530

    Update Device_Time.h

commit c961c30
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 11:01:10 2026 +0530

    Update Device_Time.h

commit 103b13a
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:58:09 2026 +0530

    Update Device_Time.cpp

commit 825bed1
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:55:55 2026 +0530

    Update Device_Time.cpp

commit 8f51409
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:45:31 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit 6379e74
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:40:23 2026 +0530

    Update Device_Time.cpp

commit e27f2c4
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:39:10 2026 +0530

    Update Device_Time.h

commit ade233f
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Tue Mar 3 17:53:02 2026 +0530

    Update Device_Time.h

commit 7711325
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Tue Mar 3 17:48:07 2026 +0530

    Update data-model-stb.xml

commit 508b167
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Tue Mar 3 16:39:51 2026 +0530

    Update data-model-stb.xml

* Update Device_Time.cpp

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update hostIf_TimeClient_ReqHandler.cpp

* Update data-model-stb.xml

* Update data-model-tv.xml

* Update Device_Time.cpp

* Update Device_Time.h

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Device_Time.cpp

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Device_Time.h

* Update Device_Time.cpp

* Update Device_Time.cpp

* Update Device_Time.cpp

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Device_Time.cpp

* Update Device_Time.cpp

* Update Device_Time.cpp

---------

Co-authored-by: smuthu545 <Sindhuja_Muthukrishnan@comcast.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nhanas001c <naveenkumar_hanasi@comcast.com>
* RDKEMW-14685 : Implement Product Class Data Model Parameter for RDKE (#373)

* Update Device_DeviceInfo.cpp

* RKEMW-14685

* Update src/hostif/parodusClient/waldb/data-model/data-model-tv.xml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/hostif/profiles/DeviceInfo/Device_DeviceInfo.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Device_DeviceInfo.cpp

---------

Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nhanasi <navihansi@gmail.com>

* Add the datamodel entries in generic (#384)

Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>

* RDKEMW-14726: Implement Chrony runtime selection for Time Sync (#385)

* Squashed commit of the following:

commit a63b72a
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Fri Mar 6 16:17:48 2026 +0530

    Update Device_Time.cpp

commit c866060
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 17:03:45 2026 +0530

    Update Device_Time.cpp

commit 03b6d0a
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:18:44 2026 +0530

    Update data-model-tv.xml

commit c84d849
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:17:11 2026 +0530

    Update data-model-stb.xml

commit 9e24d50
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:14:54 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit c83612a
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:11:50 2026 +0530

    Update Device_Time.cpp

commit 3853b2b
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Thu Mar 5 16:08:28 2026 +0530

    Update Device_Time.h

commit 6908f2b
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 22:34:19 2026 +0530

    Update data-model-stb.xml

commit 8f717a9
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 22:33:08 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit 7a3dbac
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 22:30:30 2026 +0530

    Update Device_Time.h

commit ab34324
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 22:29:50 2026 +0530

    Update Device_Time.cpp

commit 0f386b9
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 17:12:41 2026 +0530

    Update Device_Time.cpp

commit e24d793
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:29:58 2026 +0530

    Update data-model-tv.xml

commit bf25e34
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:29:05 2026 +0530

    Update data-model-stb.xml

commit 7f69be3
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:27:51 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit 6de2b88
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:26:53 2026 +0530

    Update Device_Time.cpp

commit 989316f
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:18:49 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit 8f019c8
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 16:18:19 2026 +0530

    Update data-model-stb.xml

commit dc8a607
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 14:53:59 2026 +0530

    Update Device_Time.cpp

commit 05ebbe9
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 14:19:11 2026 +0530

    Update Device_Time.cpp

commit fe409e5
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 13:01:00 2026 +0530

    Update Device_Time.cpp

commit 6ccb7a7
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 12:49:46 2026 +0530

    Update Device_Time.h

commit a50d3e1
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 12:49:10 2026 +0530

    Update Device_Time.cpp

commit af488db
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 11:56:03 2026 +0530

    Update Device_Time.h

commit c961c30
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 11:01:10 2026 +0530

    Update Device_Time.h

commit 103b13a
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:58:09 2026 +0530

    Update Device_Time.cpp

commit 825bed1
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:55:55 2026 +0530

    Update Device_Time.cpp

commit 8f51409
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:45:31 2026 +0530

    Update hostIf_TimeClient_ReqHandler.cpp

commit 6379e74
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:40:23 2026 +0530

    Update Device_Time.cpp

commit e27f2c4
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Wed Mar 4 10:39:10 2026 +0530

    Update Device_Time.h

commit ade233f
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Tue Mar 3 17:53:02 2026 +0530

    Update Device_Time.h

commit 7711325
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Tue Mar 3 17:48:07 2026 +0530

    Update data-model-stb.xml

commit 508b167
Author: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Date:   Tue Mar 3 16:39:51 2026 +0530

    Update data-model-stb.xml

* Update Device_Time.cpp

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update hostIf_TimeClient_ReqHandler.cpp

* Update data-model-stb.xml

* Update data-model-tv.xml

* Update Device_Time.cpp

* Update Device_Time.h

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Device_Time.cpp

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Device_Time.h

* Update Device_Time.cpp

* Update Device_Time.cpp

* Update Device_Time.cpp

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Device_Time.cpp

* Update Device_Time.cpp

* Update Device_Time.cpp

---------

Co-authored-by: smuthu545 <Sindhuja_Muthukrishnan@comcast.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* tr69hostif 1.3.5 release changelog updates

---------

Co-authored-by: nhanas001c <naveenkumar_hanasi@comcast.com>
Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>
Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Vismal S Kumar <ajvismal@yahoo.com>
Co-authored-by: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Co-authored-by: smuthu545 <Sindhuja_Muthukrishnan@comcast.com>
Tr69hostif Release 1.3.5
)

* RDKEMW:14684: Add base code for below Device.WiFi.Radio. parameters
    Device.WiFi.Radio.1.OperatingChannelBandwidth
    Device.WiFi.Radio.1.Stats.PacketsReceived
    Device.WiFi.Radio.1.Stats.Noise

* RDKEMW:14684: Add implementation for below Device.WiFi.Radio. parameters
    Device.WiFi.Radio.1.OperatingChannelBandwidth
    Device.WiFi.Radio.1.Stats.PacketsReceived
    Device.WiFi.Radio.1.Stats.Noise

---------

Co-authored-by: Vismal S Kumar <ajvismal@yahoo.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
…EndPoint::refreshCache" function and different fingerprint (#393)

* Added the checks for the crash issue

* Update Device_WiFi_EndPoint.cpp

* Initial plan

* Initial plan

* Fix misleading 'curl init failed' log messages to accurately reflect getJsonRPCData() failure

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
@Abhinavpv28
Abhinavpv28 requested a review from a team as a code owner March 12, 2026 11:33
Copilot AI review requested due to automatic review settings March 12, 2026 11:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates TR-069 host interface support across WiFi and Time profiles by expanding the data model and adding new runtime-backed parameter handlers (notably Chrony-related Time Sync settings and additional WiFi radio stats/bandwidth fields), along with some robustness improvements in JSON parsing.

Changes:

  • Add Chrony/NTP tuning parameters under Device.Time.* (get/set handlers) and expose them in the data model XMLs.
  • Add non-RDKV_NM implementations for selected Device.WiFi.Radio.{i} and Device.WiFi.Radio.{i}.Stats fields using CLI/procfs parsing, and wire them into the WiFi request handler for non-TR69 builds.
  • Harden Thunder JSON parsing in Device_WiFi_EndPoint::refreshCache().

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/hostif/profiles/wifi/Device_WiFi_Radio_Stats.h Adjust radio stats types (e.g., NoiseFloor to signed int) and expose props fetch helpers unconditionally.
src/hostif/profiles/wifi/Device_WiFi_Radio_Stats.cpp Add non-RDKV_NM radio stats collection (procfs + wpa_cli) and reorganize feature guards.
src/hostif/profiles/wifi/Device_WiFi_Radio.h Expose props fetch helpers unconditionally (removes previous RDKV_NM guard).
src/hostif/profiles/wifi/Device_WiFi_Radio.cpp Add non-RDKV_NM OperatingChannelBandwidth collection (iw) and reorganize feature guards.
src/hostif/profiles/wifi/Device_WiFi_EndPoint.cpp Improve JSON validation and boolean parsing for NetworkManager Thunder responses.
src/hostif/profiles/Time/Device_Time.h Add new Chrony/NTP parameter getter/setter declarations.
src/hostif/profiles/Time/Device_Time.cpp Implement Chrony enable + NTP poll/directive/maxstep get/set backed by /opt/secure/RFC/chrony/* files.
src/hostif/parodusClient/waldb/data-model/data-model-tv.xml Add Device.DeviceInfo.ProductClass and Device.Time.* Chrony/NTP params.
src/hostif/parodusClient/waldb/data-model/data-model-stb.xml Add Device.DeviceInfo.ProductClass, add Device.Time.* Chrony/NTP params, and remove WiFiReset object (moved to generic).
src/hostif/parodusClient/waldb/data-model/data-model-generic.xml Add WiFi radio bandwidth + selected stats, and add WiFiReset RFC object.
src/hostif/handlers/src/hostIf_WiFi_ReqHandler.cpp Add non-TR69 handling for new WiFi radio bandwidth/stats parameters.
src/hostif/handlers/src/hostIf_TimeClient_ReqHandler.cpp Route new Device.Time.* Chrony/NTP parameters to the Time profile.
CHANGELOG.md Add 1.3.5 section and update 1.3.4 date entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +228 to +232
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "Error in popen() : Opening /proc/net/dev failed \n");
}

return OK;
}

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wifi_getRadioTrafficStats() returns OK even when opening/reading /proc/net/dev fails, so callers can't distinguish real stats from default zeros. Return NOK on failure paths (and consider propagating the error to the caller) so the TR-181 values don't silently degrade.

Copilot uses AI. Check for mistakes.
Comment on lines +312 to 316
#ifdef RDKV_NM

int hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_BytesSent(HOSTIF_MsgData_t *stMsgData,int radioIndex )
{
RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s:%s] Entering..\n", __FUNCTION__, __FILE__);

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several Radio Stats getters are now compiled only when RDKV_NM is defined, but WiFiReqHandler calls these (e.g., Stats.BytesSent/BytesReceived/Errors*) under the RDKV_TR69 build. If RDKV_TR69 can be built without RDKV_NM, this will cause undefined references at link time; either provide non-RDKV_NM implementations or guard the call sites with the same feature macro.

Copilot uses AI. Check for mistakes.
{
int noise;
wifi_radioTrafficStats_t stats = {0};
wifi_getRadioTrafficStats(0, &stats);

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The non-RDKV_NM stats path ignores the requested radioIndex (wifi_getRadioTrafficStats is called with 0 and helpers use wlan0). This will report incorrect values on multi-radio devices; map radioIndex to the correct interface and pass it through consistently.

Suggested change
wifi_getRadioTrafficStats(0, &stats);
wifi_getRadioTrafficStats(dev_id, &stats);

Copilot uses AI. Check for mistakes.
Comment on lines +593 to 597
#ifdef RDKV_NM

int hostIf_WiFi_Radio::get_Device_WiFi_Radio_ExtensionChannel(HOSTIF_MsgData_t *stMsgData,int radioIndex )
{
RDK_LOG(RDK_LOG_TRACE1,LOG_TR69HOSTIF,"[%s:%s] Entering..\n", __FUNCTION__, __FILE__);

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These Radio getters are now behind #ifdef RDKV_NM, but hostIf_WiFi_ReqHandler (RDKV_TR69 path) calls ExtensionChannel/GuardInterval/etc. If there are builds where RDKV_TR69 is enabled but RDKV_NM is not, this will break at link time. Consider aligning the feature guards (or providing stubs/non-NM implementations) so the handler and profile compile consistently.

Copilot uses AI. Check for mistakes.
Comment on lines +159 to +163
static int wifi_getRadioOperatingChannelBandwidth(int radioIndex, char *output_buffer, size_t output_buffer_size)
{
char resultBuff[64];
char cmd[64];
char interfaceName[10] = "wlan0";

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wifi_getRadioOperatingChannelBandwidth() hard-codes interfaceName="wlan0" and doesn't use radioIndex, so it will return the wrong bandwidth for multi-radio devices. Either remove the unused parameter or use radioIndex to select the proper interface (e.g., wlan0/wlan1).

Copilot uses AI. Check for mistakes.
if (minpoll < 4 || minpoll > 24) {
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF,
"[%s:%s:%d] Invalid NTPMinpoll value: %s\n",
__FUNCTION__, __FILE__, __LINE__, minpollStr.c_str());

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_Device_Time_NTPMinpoll() rejects invalid/out-of-range values but doesn't set stMsgData->faultCode. Setting fcInvalidParameterValue here (and in other new validated setters) would make failures diagnosable by callers.

Suggested change
__FUNCTION__, __FILE__, __LINE__, minpollStr.c_str());
__FUNCTION__, __FILE__, __LINE__, minpollStr.c_str());
if (stMsgData)
stMsgData->faultCode = fcInvalidParameterValue;

Copilot uses AI. Check for mistakes.
Comment on lines +726 to +730
std::ofstream file(NTP_MAXSTEP_FILE, std::ios::trunc);
if (!file.is_open())
return NOK;
file << input;
file.close();

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_Device_Time_NTPMaxstep() writes under /opt/secure/RFC/chrony but doesn't ensure the directory exists, and it returns NOK on file-open failure without setting faultCode. Consider creating the directory and setting an appropriate faultCode for I/O failures.

Copilot uses AI. Check for mistakes.
Comment on lines +123 to +126
snprintf(cmd, sizeof(cmd), "wpa_cli -i wlan0 signal_poll");

FILE *fp = popen(cmd, "r");
if (NULL == fp)

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new code uses popen() directly. Elsewhere in this repo command execution is typically done via v_secure_popen()/v_secure_system() wrappers; using the wrapper here would be more consistent and reduces risk (shell invocation, environment quirks, etc.).

Copilot uses AI. Check for mistakes.
Comment on lines +178 to +182
snprintf(cmd, sizeof(cmd), "iw dev %s info | grep channel | cut -f 2 -d ','", interfaceName);

if (NULL != (fp = popen(cmd,"r")))
{
if ((fgets(resultBuff, sizeof (resultBuff), fp) != NULL) && (resultBuff[0] != '\0'))

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wifi_getRadioOperatingChannelBandwidth() invokes shell commands via popen(). The codebase generally uses v_secure_popen() for this; please switch to the secure wrapper to match repository conventions and avoid raw shell execution pitfalls.

Copilot uses AI. Check for mistakes.
Comment thread CHANGELOG.md
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [1.3.5](https://github.com/rdkcentral/tr69hostif/compare/1.3.4...1.3.5)

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1.3.5 changelog section doesn’t include a release date line (most other versions include a '> ' line). Add the date for consistency with the rest of CHANGELOG.md.

Suggested change
> 4 March 2026

Copilot uses AI. Check for mistakes.
sborushevsky and others added 2 commits March 12, 2026 13:54
* RDKEMW-14813 : Added support for Hotel checkout time.

* Changed LastResetTime type to unsigned long.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated according to CoPilot suggestions.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ds (#399)

* Update Device_WiFi_SSID.cpp

* Update Device_WiFi_SSID.cpp

* Update Device_WiFi_EndPoint.cpp

* Update Device_WiFi_SSID.cpp

* Update src/hostif/profiles/wifi/Device_WiFi_SSID.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Initial plan

* Initial plan

* Fix response.c_str() checks to use !response.empty() in Device_WiFi_SSID.cpp

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Fix inconsistent indentation in Device_WiFi_SSID.cpp parsing block

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Initial plan

* Update src/hostif/profiles/wifi/Device_WiFi_SSID.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Initial plan

* Remove redundant response.empty() check and unreachable else branch

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Initial plan

* Fix misleading "curl init failed" error log to "getJsonRPCData() failed"

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Initial plan

* Add null and type check for state cJSON item before valueint access in GetWifiState

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Update Device_WiFi_SSID.cpp

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
Copilot AI review requested due to automatic review settings March 12, 2026 18:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
}

#ifdef RDKV_NM

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most hostIf_WiFi_Radio::* getter implementations are now wrapped in #ifdef RDKV_NM, but the methods remain declared unconditionally in Device_WiFi_Radio.h. This can cause missing-symbol linker errors in non-RDKV_NM builds if any of these getters are referenced. Consider either providing non-RDKV_NM implementations (even if limited) or restoring consistent #ifdef guards in the header/call sites.

Suggested change
#ifdef RDKV_NM
#if 1

Copilot uses AI. Check for mistakes.
Comment on lines 379 to 382
switch (res) {
case 0:
rc=strcpy_s(status,sizeof(status),"UNINSTALLED");
break;

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

res values outside the handled cases (0-13) will leave status unchanged and rc potentially set from a previous operation, which can report an incorrect SSID status. Add a default case to set a safe status (e.g., "ERROR"/"UNKNOWN") and set rc accordingly before the ERR_CHK check.

Copilot uses AI. Check for mistakes.
Comment on lines +725 to +728

std::ofstream file(NTP_MAXSTEP_FILE, std::ios::trunc);
if (!file.is_open())
return NOK;

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_Device_Time_NTPMaxstep() writes to NTP_MAXSTEP_FILE but doesn't ensure /opt/secure/RFC/chrony exists, and on file open failure it returns NOK without logging or setting a faultCode. Consider creating the directory (consistent with other setters) and returning a meaningful faultCode/log when persistence fails.

Suggested change
std::ofstream file(NTP_MAXSTEP_FILE, std::ios::trunc);
if (!file.is_open())
return NOK;
// Ensure the chrony configuration directory exists before writing the file
const char *chronyDir = "/opt/secure/RFC/chrony";
struct stat st;
if (stat(chronyDir, &st) != 0)
{
if (errno == ENOENT)
{
if (mkdir(chronyDir, 0700) != 0)
{
stMsgData->faultCode = fcInternalError;
fprintf(stderr, "set_Device_Time_NTPMaxstep: Failed to create directory %s: %s\n",
chronyDir, strerror(errno));
return NOK;
}
}
else
{
stMsgData->faultCode = fcInternalError;
fprintf(stderr, "set_Device_Time_NTPMaxstep: Failed to stat directory %s: %s\n",
chronyDir, strerror(errno));
return NOK;
}
}
else if (!S_ISDIR(st.st_mode))
{
stMsgData->faultCode = fcInternalError;
fprintf(stderr, "set_Device_Time_NTPMaxstep: Path %s exists but is not a directory\n",
chronyDir);
return NOK;
}
std::ofstream file(NTP_MAXSTEP_FILE, std::ios::trunc);
if (!file.is_open())
{
stMsgData->faultCode = fcInternalError;
fprintf(stderr, "set_Device_Time_NTPMaxstep: Failed to open %s for writing: %s\n",
NTP_MAXSTEP_FILE, strerror(errno));
return NOK;
}

Copilot uses AI. Check for mistakes.
string resp = getJsonRPCData(std::move(postData));
if (resp.empty())
{
RDK_LOG (RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s] Empty outpu from Thunder call\n", __FUNCTION__);

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in log message: "Empty outpu from Thunder call" -> "Empty output from Thunder call".

Suggested change
RDK_LOG (RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s] Empty outpu from Thunder call\n", __FUNCTION__);
RDK_LOG (RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s] Empty output from Thunder call\n", __FUNCTION__);

Copilot uses AI. Check for mistakes.
{
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "Error in popen() : Opening /proc/net/dev failed \n");
}

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wifi_getRadioTrafficStats() returns OK even when popen() fails, /proc/net/dev can't be read, or parsing fails (only logs an error). This makes callers treat the stats as valid (often all zeros). Consider returning NOK on failure (and/or only returning OK when all expected fields are parsed successfully).

Suggested change
if (numParams == 0)
{
return NOK;
}

Copilot uses AI. Check for mistakes.

std::string minpollStr = getStringValue(stMsgData);

// Validate that minpollStr is a number in a valid range [4, 17] for NTP

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says the valid NTPMinpoll range is "[4, 17]" but the validation allows up to 24 (if (minpoll < 4 || minpoll > 24)). Please align the comment and the actual allowed range (either tighten the check to 17 or update the comment/spec reference).

Suggested change
// Validate that minpollStr is a number in a valid range [4, 17] for NTP
// Validate that minpollStr is a number in a valid range [4, 24] for NTP

Copilot uses AI. Check for mistakes.
Comment on lines +574 to +583
int hostIf_Time::set_Device_Time_NTPServer1Directive(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
{
std::string directive = getStringValue(stMsgData);
std::ofstream file(NTP_SERVER1_DIRECTIVE_FILE);
if (!file.is_open()) {
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF,
"[%s:%s:%d] Failed to open %s for writing: %s\n",
__FUNCTION__, __FILE__, __LINE__,
NTP_SERVER1_DIRECTIVE_FILE, strerror(errno));
return NOK;

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_Device_Time_NTPServer1Directive() writes to /opt/secure/RFC/chrony/... but doesn't ensure the chrony directory exists (unlike the minpoll/maxpoll/enable setters). If this is the first chrony parameter set, the open will fail. Consider creating the directory (or factoring a shared helper) in all setters that write under /opt/secure/RFC/chrony.

Copilot uses AI. Check for mistakes.
string resp = getJsonRPCData(std::move(postData));
if (resp.empty())
{
RDK_LOG (RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s] Empty outpu from Thunder call\n", __FUNCTION__);

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in log message: "Empty outpu from Thunder call" -> "Empty output from Thunder call".

Suggested change
RDK_LOG (RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s] Empty outpu from Thunder call\n", __FUNCTION__);
RDK_LOG (RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s] Empty output from Thunder call\n", __FUNCTION__);

Copilot uses AI. Check for mistakes.
Abhinavpv28 and others added 2 commits March 12, 2026 14:54
…ostif - Fingerprint: 87349961 (#409)

* Update tr69hostif.service

* Update hostIf_main.cpp

* Update hostIf_main.cpp

---------

Co-authored-by: Shibu Kakkoth Vayalambron <shibu.kakkoth@gmail.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
…ostif (#412)

* Revert "RDKEMW-12857: Observed tr69hostif crash on shutdown (#361)"

This reverts commit 2495ecb.

* Update hostIf_main.cpp
Copilot AI review requested due to automatic review settings March 12, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 12 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tr69hostif.service
ExecStartPre=/bin/mkdir -p /opt/tr-181
ExecStart=/bin/sh -c '/usr/bin/tr69hostif -c /etc/mgrlist.conf -p 10999 -s 11999'
ExecStop=/bin/kill -15 $MAINPID
ExecStop=/bin/kill -9 $MAINPID

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using SIGKILL (-9) in ExecStop prevents the process from handling shutdown signals and running cleanup (e.g., exit_gracefully), which can lead to corrupted state or skipped teardown. Prefer SIGTERM (or omit ExecStop and let systemd send SIGTERM followed by SIGKILL after TimeoutStopSec) so the daemon can exit cleanly.

Suggested change
ExecStop=/bin/kill -9 $MAINPID

Copilot uses AI. Check for mistakes.
Comment on lines +354 to +360
int hostIf_Time::set_Device_Time_Chrony_Enable(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
{
std::string chronyEnableStr = getStringValue(stMsgData);

// If the value is empty, remove the file
if (chronyEnableStr.empty() || chronyEnableStr == "false" || chronyEnableStr == "0") {
RDK_LOG(RDK_LOG_DEBUG, LOG_TR69HOSTIF,

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New Chrony/NTP parameter get/set handlers were added (ChronyEnable, NTPMinpoll/Maxpoll, NTPServer*Directive, NTPMaxstep), but there are existing gtests for Device_Time. Adding unit tests for these new handlers (default values, range validation, and file creation/removal behavior) would help prevent regressions.

Copilot uses AI. Check for mistakes.
Comment on lines +5494 to +5503
int hostIf_DeviceInfo::get_HotelCheckoutLastResetTime(HOSTIF_MsgData_t* stMsgData)
{
std::string postData = "{\"jsonrpc\":\"2.0\",\"id\":\"3\",\"method\": \"org.rdk.Account.getLastCheckoutResetTime\" }";

string resp = getJsonRPCData(std::move(postData));
if (resp.empty())
{
RDK_LOG (RDK_LOG_ERROR, LOG_TR69HOSTIF, "[%s] Empty outpu from Thunder call\n", __FUNCTION__);
return NOK;
}

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New HotelCheckout getters were added, but the repository already has gtests for DeviceInfo. Adding unit tests for get_HotelCheckoutLastResetTime/get_HotelCheckoutStatus (including JSON-RPC parse failures and empty responses) would help validate the new data model behavior.

Copilot uses AI. Check for mistakes.
hostIf_HttpServerStop();

// Stop update polling and wait for the worker to exit before further teardown
updateHandler::stop();

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exit_gracefully() calls updateHandler::stop() but no longer waits for the update thread to exit. Since updateHandler::run sleeps for up to 60s between polls, the thread can keep running while teardown continues (IARM stop, hash destroys, etc.), risking use-after-free/crashes. Add a shutdown path that wakes the thread and joins it (or make the thread detached and ensure it cannot touch torn-down resources).

Suggested change
updateHandler::stop();
updateHandler::stop();
if (updateHandler_runThread) {
g_thread_join(updateHandler_runThread);
updateHandler_runThread = NULL;
}

Copilot uses AI. Check for mistakes.
@@ -108,14 +108,6 @@ void updateHandler::stop()
stopped = true;

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateHandler::stop() only flips a flag, but updateHandler::run() can remain blocked in sleep(60) for up to a minute. Without a join/wakeup mechanism, shutdown cannot reliably ensure the thread has stopped before other subsystems are torn down. Consider replacing sleep(60) with a condition variable / g_cond wait that can be signaled on stop(), and provide a join (or join internally in stop()).

Suggested change
stopped = true;
stopped = true;
if (thread != NULL)
{
g_thread_join(thread);
thread = NULL;
}

Copilot uses AI. Check for mistakes.
Comment on lines +120 to +172
static bool getNoise(int &noise_value)
{
char cmd[50];
snprintf(cmd, sizeof(cmd), "wpa_cli -i wlan0 signal_poll");

FILE *fp = popen(cmd, "r");
if (NULL == fp)
{
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "Error in popen() : signal_poll failed \n");
return false;
}

char line[256];
char noise[64] = { 0 };

while (fgets(line, sizeof(line), fp))
{
if (strncmp(line, "NOISE=", 6) == 0)
{
strncpy(noise, line + 6, sizeof(noise) - 1);
// Strip trailing newline if present
size_t len = strlen(noise);
if (len > 0 && noise[len - 1] == '\n')
noise[len - 1] = '\0';
}
}
pclose(fp);

if (noise[0] == '\0')
{
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "NOISE not found in signal_poll.\n");
return false;
}

noise_value = atoi(noise);
RDK_LOG(RDK_LOG_INFO, LOG_TR69HOSTIF, "\n noise = %d ", noise_value);

return true;
}

struct wifi_radioTrafficStats_t
{
unsigned long bytesSent;
unsigned long bytesReceived;
unsigned long packetsSent;
unsigned long packetsReceived;
unsigned int errorsSent;
unsigned int errorsReceived;
unsigned int discardPacketsSent;
unsigned int discardPacketsReceived;
};

static int wifi_getRadioTrafficStats(int radioIndex, wifi_radioTrafficStats_t *output_struct)

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getNoise() / wifi_getRadioTrafficStats() are defined unconditionally but only referenced in the non-RDKV_NM branch. With -Wall/-Werror builds, this can fail compilation under RDKV_NM due to unused static functions. Wrap these helpers in #ifndef RDKV_NM (or annotate maybe_unused) so they are only built when needed.

Copilot uses AI. Check for mistakes.
{
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "Error in popen() : Opening /proc/net/dev failed \n");
}

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wifi_getRadioTrafficStats() logs errors when popen()/parsing fails, but still returns OK. Callers will treat the stats as valid (often all zeros or partially parsed). Return NOK on failure (including numParams != expected) and have callers handle/report the error appropriately.

Suggested change
if (numParams != 8)
{
RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF, "wifi_getRadioTrafficStats: Failed to parse /proc/net/dev for interface %s (numParams=%d)\n", interfaceName, numParams);
return NOK;
}

Copilot uses AI. Check for mistakes.
Comment on lines +306 to +314
hostIf_WiFi_Radio *pDev = hostIf_WiFi_Radio::getInstance(dev_id);
if (pDev)
{
// snprintf(OperatingChannelBandwidth, BUFF_MIN_16, "80MHz");
wifi_getRadioOperatingChannelBandwidth(0, OperatingChannelBandwidth, sizeof (OperatingChannelBandwidth));
// TODO: what's this for?
radioFirstExTime = time (NULL);
return OK;
}

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the non-RDKV_NM path, wifi_getRadioOperatingChannelBandwidth()'s return value is ignored and get_Device_WiFi_Radio_Props_Fields() still returns OK. If the command fails, OperatingChannelBandwidth may remain empty/stale while callers believe the fetch succeeded. Propagate the failure (return NOK) or set a clear fallback value and log appropriately when the bandwidth cannot be determined.

Copilot uses AI. Check for mistakes.
Comment on lines +351 to +354
else if (strcasecmp(pSetting,"Stats.PacketsReceived") == 0)
{
ret = pWifiRadioStats->get_Device_WiFi_Radio_Stats_PacketsReceived(stMsgData,radioIndex);
}

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new handling for "Stats.PacketsReceived" returns whatever hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_PacketsReceived provides. Currently that getter reports hostIf_UnsignedIntType with a 4-byte length, but the updated data model defines PacketsReceived as unsignedLong. Update the getter to use an unsigned long type/length to avoid truncation and keep the response consistent with the model.

Copilot uses AI. Check for mistakes.
Comment on lines +159 to +170
static int wifi_getRadioOperatingChannelBandwidth(int radioIndex, char *output_buffer, size_t output_buffer_size)
{
char resultBuff[64];
char cmd[64];
char interfaceName[10] = "wlan0";
int bandWidth = 0;
FILE *fp = NULL;
int ret = NOK;
bool iw_info_failed = false;
char *bandwidth_string = NULL;
char *bandwidth_token = NULL;
bool bandwidth_found = false;

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new helper function wifi_getRadioOperatingChannelBandwidth() is defined unconditionally, but only used in the non-RDKV_NM code path. With the project's -Wall/-Werror builds, this will trigger an unused-function warning (error) when RDKV_NM is enabled. Guard the helper with #ifndef RDKV_NM (or mark it maybe_unused) so RDKV_NM builds don't fail.

Copilot uses AI. Check for mistakes.
nhanasi and others added 3 commits March 12, 2026 16:19
* Update data-model-stb.xml

* Update data-model-tv.xml

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update data-model-stb.xml

* Update data-model-tv.xml

* Update data-model-stb.xml

* Update data-model-generic.xml

---------

Co-authored-by: Vismal S Kumar <ajvismal@yahoo.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Garpathi, Uday Krishna <UdayKrishna_GARPATHI@comcast.com>
* tr69hostif 1.3.5 release changelog updates (#391)

Co-authored-by: nhanas001c <naveenkumar_hanasi@comcast.com>

* RDKEMW:14684: Add implementation for Device.WiFi.Radio. parameters (#398)

* RDKEMW:14684: Add base code for below Device.WiFi.Radio. parameters
    Device.WiFi.Radio.1.OperatingChannelBandwidth
    Device.WiFi.Radio.1.Stats.PacketsReceived
    Device.WiFi.Radio.1.Stats.Noise

* RDKEMW:14684: Add implementation for below Device.WiFi.Radio. parameters
    Device.WiFi.Radio.1.OperatingChannelBandwidth
    Device.WiFi.Radio.1.Stats.PacketsReceived
    Device.WiFi.Radio.1.Stats.Noise

---------

Co-authored-by: Vismal S Kumar <ajvismal@yahoo.com>
Co-authored-by: nhanasi <navihansi@gmail.com>

* RDKEMW-14755-[develop] Observed "tr69hostif" crash with "hostIf_WiFi_EndPoint::refreshCache" function and different fingerprint (#393)

* Added the checks for the crash issue

* Update Device_WiFi_EndPoint.cpp

* Initial plan

* Initial plan

* Fix misleading 'curl init failed' log messages to accurately reflect getJsonRPCData() failure

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nhanasi <navihansi@gmail.com>

* RDKEMW-14813 : Added support for Hotel checkout time. (#387)

* RDKEMW-14813 : Added support for Hotel checkout time.

* Changed LastResetTime type to unsigned long.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated according to CoPilot suggestions.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* RDKEMW-14686: Wifi DataModel Params Retuning Empty Value on RDKE Builds (#399)

* Update Device_WiFi_SSID.cpp

* Update Device_WiFi_SSID.cpp

* Update Device_WiFi_EndPoint.cpp

* Update Device_WiFi_SSID.cpp

* Update src/hostif/profiles/wifi/Device_WiFi_SSID.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Initial plan

* Initial plan

* Fix response.c_str() checks to use !response.empty() in Device_WiFi_SSID.cpp

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Fix inconsistent indentation in Device_WiFi_SSID.cpp parsing block

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Initial plan

* Update src/hostif/profiles/wifi/Device_WiFi_SSID.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Initial plan

* Remove redundant response.empty() check and unreachable else branch

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Initial plan

* Fix misleading "curl init failed" error log to "getJsonRPCData() failed"

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Initial plan

* Add null and type check for state cJSON item before valueint access in GetWifiState

Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>

* Update Device_WiFi_SSID.cpp

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Co-authored-by: nhanasi <navihansi@gmail.com>

* RDKEMW-14888 : Observing error logs captured from RTMessages in tr69hostif - Fingerprint: 87349961 (#409)

* Update tr69hostif.service

* Update hostIf_main.cpp

* Update hostIf_main.cpp

---------

Co-authored-by: Shibu Kakkoth Vayalambron <shibu.kakkoth@gmail.com>
Co-authored-by: nhanasi <navihansi@gmail.com>

* RDKEMW-14888 : Observing error logs captured from RTMessages in tr69hostif (#412)

* Revert "RDKEMW-12857: Observed tr69hostif crash on shutdown (#361)"

This reverts commit 2495ecb.

* Update hostIf_main.cpp

* RDKEMW-14881: Update New Datamodel for WifiReset (#376)

* Update data-model-stb.xml

* Update data-model-tv.xml

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update data-model-stb.xml

* Update data-model-tv.xml

* Update data-model-stb.xml

* Update data-model-generic.xml

---------

Co-authored-by: Vismal S Kumar <ajvismal@yahoo.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Garpathi, Uday Krishna <UdayKrishna_GARPATHI@comcast.com>

* tr69hostif 1.3.6  release changelog updates

---------

Co-authored-by: nhanas001c <naveenkumar_hanasi@comcast.com>
Co-authored-by: tukken-comcast <tony_ukken2@comcast.com>
Co-authored-by: Vismal S Kumar <ajvismal@yahoo.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: sborushevsky <sborushevsky@users.noreply.github.com>
Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>
Co-authored-by: Shibu Kakkoth Vayalambron <shibu.kakkoth@gmail.com>
Co-authored-by: Aravindan NC <35158113+AravindanNC@users.noreply.github.com>
Co-authored-by: Garpathi, Uday Krishna <UdayKrishna_GARPATHI@comcast.com>
naveenkumarhanasi and others added 4 commits June 29, 2026 14:00
tr69hostif release 1.4.7 tag
…ression Coverage (#487)

Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
Copilot AI review requested due to automatic review settings June 29, 2026 14:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

madhubabutt and others added 2 commits June 29, 2026 13:06
…497)

Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com>
Co-authored-by: apatel859 <48992974+apatel859@users.noreply.github.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
* Added the Latest L2 Coverage

* L2 Covreage updated

---------

Co-authored-by: Hanasi <nhanas001c@cable.comcast.com>
Copilot AI review requested due to automatic review settings June 30, 2026 14:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

…ode from RDKE (#505)

Reason for change: Deprecated DataModel Removal for HWSelftest and SNMP code from RDKE
Test Procedure: Build and verify
Risks: Medium
Priority: P1

Signed-off-by: Tirumala, Madhubabu (Contractor) <Madhubabu_Tirumala@comcast.com>
Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com>
Copilot AI review requested due to automatic review settings July 10, 2026 16:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings July 10, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

* Refactor Docker exec command in L2-tests.yml

* Update L2-tests.yml

---------

Co-authored-by: nhanasi <navihansi@gmail.com>
Copilot AI review requested due to automatic review settings July 15, 2026 16:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com>
Copilot AI review requested due to automatic review settings July 16, 2026 17:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.