Skip to content

RDK-61444 : Network Manager Plugin to support Scan Specific SSID#306

Open
jincysam87 wants to merge 74 commits into
rdkcentral:developfrom
jincysam87:feature/RDK-61444-1
Open

RDK-61444 : Network Manager Plugin to support Scan Specific SSID#306
jincysam87 wants to merge 74 commits into
rdkcentral:developfrom
jincysam87:feature/RDK-61444-1

Conversation

@jincysam87
Copy link
Copy Markdown
Contributor

Reason for change: Support to scan multiple SSIDs
Test Procedure: Test wifi scan API with multiple SSIDs
Risks: Low
Signed-off-by: jincysaramma_sam@comcast.com

Copilot AI review requested due to automatic review settings May 8, 2026 15:59
@jincysam87 jincysam87 requested a review from a team as a code owner May 8, 2026 15:59
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 3a19acc

Report detail: gist'

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 the GNOME NetworkManager WiFi scan path to support scanning with multiple SSID filters (instead of a single optional SSID string), aligning the plugin with the requirement to “scan multiple SSIDs”.

Changes:

  • Updated wifiScanRequest API to accept a std::vector<std::string> of SSIDs to filter.
  • Built a GVariant aay SSID list for nm_device_wifi_request_scan_options_async() when filters are provided; otherwise falls back to a normal scan.
  • Updated the GNOME proxy to pass the SSID filter list through to the WiFi manager.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
plugin/gnome/NetworkManagerGnomeWIFI.h Changes wifiScanRequest signature to take a vector of SSIDs.
plugin/gnome/NetworkManagerGnomeWIFI.cpp Implements building a multi-SSID scan options payload and triggers filtered vs unfiltered scan.
plugin/gnome/NetworkManagerGnomeProxy.cpp Passes the SSID filter list to the updated scan request API.

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

Comment thread plugin/gnome/NetworkManagerGnomeWIFI.h Outdated
bool wifiConnectedSSIDInfo(Exchange::INetworkManager::WiFiSSIDInfo &ssidinfo);
bool wifiConnect(const Exchange::INetworkManager::WiFiConnectTo &ssidInfo);
bool wifiScanRequest(std::string ssidReq = "");
bool wifiScanRequest(std::vector<std::string> ssidsToFilter = {});
Comment thread plugin/gnome/NetworkManagerGnomeWIFI.cpp Outdated
if(!ssidsToFilter.empty())
{
NMLOG_INFO("starting wifi scanning .. %s", ssidReq.c_str());
NMLOG_INFO("Starting wifi scanning for %d SSIDs:", ssidsToFilter.size());
Comment thread plugin/gnome/NetworkManagerGnomeWIFI.cpp
Comment thread plugin/gnome/NetworkManagerGnomeProxy.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 16:05
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: ec5d3a2

Report detail: gist'

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 3 out of 3 changed files in this pull request and generated 4 comments.

Comment thread plugin/gnome/NetworkManagerGnomeWIFI.h Outdated
Comment thread plugin/gnome/NetworkManagerGnomeWIFI.h
Comment thread plugin/gnome/NetworkManagerGnomeWIFI.h Outdated
bool wifiConnectedSSIDInfo(Exchange::INetworkManager::WiFiSSIDInfo &ssidinfo);
bool wifiConnect(const Exchange::INetworkManager::WiFiConnectTo &ssidInfo);
bool wifiScanRequest(std::string ssidReq = "");
bool wifiScanRequest(std::vector<std::string> ssidsToFilter = {});
if(!ssidsToFilter.empty())
{
NMLOG_INFO("starting wifi scanning .. %s", ssidReq.c_str());
NMLOG_INFO("Starting wifi scanning for %d SSIDs:", ssidsToFilter.size());
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 16:13
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 3aba5bb

Report detail: gist'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 7032c46

Report detail: gist'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 9b03709

Report detail: gist'

Copilot AI review requested due to automatic review settings May 22, 2026 00:58
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 46af7b2

Report detail: gist'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: d509681

Report detail: gist'

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 6 comments.

Comments suppressed due to low confidence (1)

tests/l2Test/rdk/l2_test_rdkproxy.cpp:677

  • This test sends the parameter name frequency, but the JSON-RPC handler parses frequencies (plural). As written, the request won’t exercise the updated frequency parsing and will be treated as “no frequency filter”. Update the payload key to frequencies to match the API.
    EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("StartWiFiScan"), 
        _T("{\"frequency\":[\"2.4\"]}"), response));
    EXPECT_EQ(response, _T("{\"success\":false}"));

Comment thread plugin/NetworkManagerImplementation.cpp
Comment thread plugin/rdk/NetworkManagerRDKProxy.cpp
Comment on lines +991 to +995
while (frequencies->Next(frequencyList) == true)
{
m_filterFrequencies.push_back(frequencyList.c_str());
NMLOG_DEBUG("%s added to Frequency filtering", frequencyList.c_str());
}
Comment thread docs/NetworkManagerPlugin.md
Comment thread definition/NetworkManager.json Outdated
Comment on lines +863 to +869
"`ALL`",
"`2.4`",
"`5`",
"`6`"
],
"example": "2.4"
}
Comment on lines 663 to 665
EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("StartWiFiScan"),
_T("{\"frequency\":\"2.4GHz\"}"), response));
_T("{\"frequency\":[\"2.4\"]}"), response));
EXPECT_EQ(response, _T("{\"success\":true}"));
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 1aed44b

Report detail: gist'

Copilot AI review requested due to automatic review settings May 22, 2026 01:30
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 0cb18b0

Report detail: gist'

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 3 comments.

Comments suppressed due to low confidence (2)

tests/l2Test/rdk/l2_test_rdkproxy.cpp:677

  • This test payload uses the frequency parameter name, but the JSON-RPC API implementation/docs for StartWiFiScan now expect frequencies (plural) as an array. As-is, this test can still pass without validating the new request shape.
    EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("StartWiFiScan"), 
        _T("{\"frequency\":[\"2.4\"]}"), response));
    EXPECT_EQ(response, _T("{\"success\":false}"));

plugin/NetworkManagerJsonRpc.cpp:683

  • index.Current().String() already returns a std::string. Converting it to c_str() and then back to std::string is unnecessary and can truncate values containing embedded NULs (possible in SSIDs represented as JSON strings with \u0000). Push the std::string directly.
                    if (Core::JSON::Variant::type::STRING == index.Current().Content())
                    {
                        ssidslist.push_back(index.Current().String().c_str());
                    }

Comment thread docs/NetworkManagerPlugin.md
Comment thread tests/l2Test/rdk/l2_test_rdkproxy.cpp
Comment thread plugin/gnome/NetworkManagerGnomeProxy.cpp
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 0516339

Report detail: gist'

Copilot AI review requested due to automatic review settings May 22, 2026 01:59
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 3af5cf7

Report detail: gist'

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 4 comments.

Comments suppressed due to low confidence (1)

tests/l2Test/rdk/l2_test_rdkproxy.cpp:677

  • The JSON-RPC StartWiFiScan handler expects frequencies (plural). Using frequency here means the test does not validate the updated API contract and may ignore the provided filter.
    EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("StartWiFiScan"), 
        _T("{\"frequency\":[\"2.4\"]}"), response));
    EXPECT_EQ(response, _T("{\"success\":false}"));

Comment thread tests/l2Test/rdk/l2_test_rdkproxy.cpp
Comment thread plugin/rdk/NetworkManagerRDKProxy.cpp
Comment thread plugin/NetworkManagerImplementation.cpp
Comment thread plugin/NetworkManagerImplementation.cpp
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: d97af8a

Report detail: gist'

Copilot AI review requested due to automatic review settings May 22, 2026 20:44
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/networkmanager/306/rdkcentral/networkmanager

  • Commit: 42520a4

Report detail: gist'

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 5 comments.

Comment on lines 663 to 665
EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("StartWiFiScan"),
_T("{\"frequency\":\"2.4GHz\"}"), response));
_T("{\"frequency\":[\"2.4\"]}"), response));
EXPECT_EQ(response, _T("{\"success\":true}"));
Comment on lines 675 to 677
EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("StartWiFiScan"),
_T("{\"frequency\":\"2.4GHz\"}"), response));
_T("{\"frequency\":[\"2.4\"]}"), response));
EXPECT_EQ(response, _T("{\"success\":false}"));
Comment on lines 303 to 305
std::thread m_registrationThread;
string m_filterfrequency;
std::vector<std::string> m_filterFrequencies;
std::vector<std::string> m_filterSsidslist;
Comment on lines +648 to +652
if (parameters.HasLabel("frequencies"))
{
JsonArray array = parameters["frequencies"].Array();
std::vector<std::string> frequencyList;
JsonArray::Iterator index(array.Elements());
Comment on lines +1021 to +1033
Core::JSON::EnumType<Exchange::INetworkManager::WIFIFrequency> parsedFrequency;
parsedFrequency.FromString(frequency);
const string normalizedFrequency = parsedFrequency.Data();
if ((!normalizedFrequency.empty()) && (normalizedFrequency == frequency))
{
m_filterFrequencies.push_back(normalizedFrequency);
NMLOG_DEBUG("Frequency %s added to scan filtering", normalizedFrequency.c_str());
}
else
{
NMLOG_ERROR("Invalid frequency value: %s", frequency.c_str());
return Core::ERROR_BAD_REQUEST;
}
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.

4 participants