Skip to content
Open

Sync #21

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/gdbus_proxy_L1_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ jobs:
&&
cmake --build build/ThunderInterfaces --target install -j8

- name: Install IPowerManager header
run: |
IFACE_DIR=$(find ${{github.workspace}}/install/usr/include -maxdepth 2 -name "interfaces" -type d | head -1)
cp ${{github.workspace}}/networkmanager/tests/mocks/thunder/IPowerManager.h "$IFACE_DIR/"

- name: Build networkmanager with Gnome GDBUS Proxy
run: >
cmake
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/legacy_L1_L2_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ jobs:
&&
cmake --build build/ThunderInterfaces --target install -j8

- name: Install IPowerManager header
run: |
IFACE_DIR=$(find ${{github.workspace}}/install/usr/include -maxdepth 2 -name "interfaces" -type d | head -1)
cp ${{github.workspace}}/networkmanager/tests/mocks/thunder/IPowerManager.h "$IFACE_DIR/"

- name: Generate IARM headers
run: |
touch install/usr/lib/libIARMBus.so
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/libnm_proxy_L1_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ env:
jobs:
L1-tests:
name: Build and run unit tests
runs-on: ubuntu-22.04
# Note: Ubuntu 24.04 is required for libnm 1.46 which is needed for NetworkManagerPowerClient support
runs-on: ubuntu-24.04

steps:
# Set up Thunder cache
Expand Down Expand Up @@ -107,11 +108,16 @@ jobs:
&&
cmake --build build/ThunderInterfaces --target install -j8

- name: Install IPowerManager header
run: |
IFACE_DIR=$(find ${{github.workspace}}/install/usr/include -maxdepth 2 -name "interfaces" -type d | head -1)
cp ${{github.workspace}}/networkmanager/tests/mocks/thunder/IPowerManager.h "$IFACE_DIR/"

- name: Generate dependency files
run: |
sudo bash -c 'echo "ETHERNET_INTERFACE=eth0
WIFI_INTERFACE=wlan0
DEVICE_NAME=rdk_test_device " > /etc/device.properties'
DEFAULT_HOSTNAME=rdk_test_device " > /etc/device.properties'

- name: Generate IARM headers
run: |
Expand Down Expand Up @@ -160,7 +166,7 @@ jobs:

- name: Generate coverage
run: |
lcov -c -o coverage.info -d build/networkmanager_libnm/
lcov --rc geninfo_unexecuted_blocks=1 -c -o coverage.info -d build/networkmanager_libnm/ --ignore-errors mismatch
lcov -e coverage.info '*/networkmanager/plugin/gnome/*' -o filtered_coverage.info

- name: Generate the html report
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/rdk_proxy_L1_L2_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ jobs:
&&
cmake --build build/ThunderInterfaces --target install -j8

- name: Install IPowerManager header
run: |
IFACE_DIR=$(find ${{github.workspace}}/install/usr/include -maxdepth 2 -name "interfaces" -type d | head -1)
cp ${{github.workspace}}/networkmanager/tests/mocks/thunder/IPowerManager.h "$IFACE_DIR/"

- name: Generate IARM headers
run: |
touch install/usr/lib/libIARMBus.so
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate_pr_desc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
# Define valid ticket IDs
VALID_TICKET_IDS=("RDKEMW")
VALID_TICKET_IDS=("RDKEMW" "RDK")

# Function to validate ticket format and ID
validate_ticket() {
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ All notable changes to this RDK Service will be documented in this file.

* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

## [3.3.0] - 2026-06-12
### Fixed
- Fixed the memory leak that caused by the persistent m_nmClient and m_nmContext.

## [3.2.0] - 2026-06-09
### Added
- Implemented IP Caching logic to avoid multiple hard fetches from Gnome & invalidating the cache on change.

## [3.1.0] - 2026-06-08
### Changed
- Handled Power State changes within NetworkManager as below,
- Transition to DeepSleep will disconnect when NSM is OFF
- Transition from DeepSleep will Renew IP when NSM is ON

## [3.0.0] - 2026-05-28
### Changed
- The device hostname header that used to retrive has changed as "DEFAULT_HOSTNAME"
- Updated the WiFiStartScan to scan for specific SSID and also updated to take array of freq band as input instead of single freq

## [2.3.0] - 2026-05-21
### Fixed
- Fixed the issue which leads Enabling and Disabling of interfaces are taking longer
Expand Down
17 changes: 16 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (NOT WPEFramework_FOUND AND NOT Thunder_FOUND)
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
set(VERSION_MAJOR 2)
set(VERSION_MAJOR 3)
set(VERSION_MINOR 3)
set(VERSION_PATCH 0)

Expand All @@ -55,6 +55,21 @@ option(ENABLE_LEGACY_PLUGINS "Enable Legacy Plugins" ON)
option(USE_RDK_LOGGER "Enable RDK Logger for logging" OFF )
option(ENABLE_UNIT_TESTING "Enable unit tests" OFF)
option(USE_TELEMETRY "Enable Telemetry T2 support" OFF)
option(ENABLE_ETHERNET_CONNECTION_HANDLING
"Enable pre-sleep Ethernet deactivation" OFF)

if(ENABLE_ETHERNET_CONNECTION_HANDLING)
add_definitions(-DENABLE_ETHERNET_CONNECTION_HANDLING)
message(STATUS "Ethernet connection handling: enabled")
endif()

# Backend identity macros are consumed by shared headers; define them globally
# so all targets (plugin, tests, tools) compile against the same API surface.
if(ENABLE_GNOME_NETWORKMANAGER AND ENABLE_GNOME_GDBUS)
add_compile_definitions(NM_BACKEND_GDBUS=1)
elseif(NOT ENABLE_GNOME_NETWORKMANAGER)
add_compile_definitions(NM_BACKEND_RDK=1)
endif()

if (USE_TELEMETRY)
find_package(T2 REQUIRED)
Expand Down
34 changes: 22 additions & 12 deletions definition/NetworkManager.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"status": "production",
"description": "A Unified `NetworkManager` plugin that allows you to manage Ethernet and Wifi interfaces on the device.",
"sourcelocation": "https://github.com/rdkcentral/networkmanager/blob/main/definition/NetworkManager.json",
"version": "2.3.0"
"version": "3.3.0"
},
"definitions": {
"success": {
Expand Down Expand Up @@ -47,9 +47,9 @@
"example": 24
},
"ula": {
"summary": "The IPv6 Unified Local Address",
"summary": "The IPv6 Unique Local Address",
"type": "string",
"example": "d00:410:2016::"
"example": "fd00:410:2016::"
},
"gateway": {
"summary": "The gateway address",
Expand Down Expand Up @@ -846,17 +846,27 @@
}
},
"StartWiFiScan":{
"summary": "Initiates WiFi scaning. This method supports scanning for specific range of frequency like 2.4GHz only or 5GHz only or 6GHz only or ALL. When no input passed about the frequency to be scanned, it scans for all. When list of SSIDs to be scanned specifically, it can be passed as input. It publishes 'onAvailableSSIDs' event upon completion.",
"summary": "Initiates WiFi scanning. This method supports scanning specific frequency bands (2.4GHz, 5GHz, 6GHz). When no input is passed for frequency, it scans all supported frequencies. When list of SSIDs to be scanned specifically, it can be passed as input. It publishes 'onAvailableSSIDs' event upon completion.",
"events": {
"onAvailableSSIDs" : "Triggered when list of SSIDs is available after the scan completes."
},
"params": {
"type": "object",
"properties": {
"frequency": {
"summary": "The frequency to scan. An empty or `null` value scans all frequencies.",
"type": "string",
"example": "5"
"frequencies": {
"summary": "Frequency bands to scan. Omit this field or pass \"ALL\" to scan all frequencies.",
"type": "array",
"items": {
"summary": "The frequency to scan.",
"type": "string",
"enum": [
"ALL",
"2.4",
"5",
"6"
],
"example": "2.4"
}
},
"ssids": {
"summary": "The list of SSIDs to be scanned.",
Expand Down Expand Up @@ -1233,7 +1243,7 @@
}
},
"GetWiFiSignalQuality":{
"summary": "Get WiFi signal quality of currently connected SSID. The signal quality is identifed based on the Signal to Noise ratio which is calculated as SNR = rssi - noise. The possible states are\n* 'Excellent' : More than 40 dBm\n* 'Good' : 40 dBm to 25 dBm\n* 'Fair' : 25 dBm to 18 dBm\n* 'Weak' : 18 dBm to 0 dBm\n* 'Disconnected' : 0 dBm\n",
"summary": "Get WiFi signal quality of currently connected SSID. The signal quality is identified based on the Signal to Noise ratio which is calculated as SNR = rssi - noise. The possible states are\n* 'Excellent' : More than 40 dBm\n* 'Good' : 40 dBm to 25 dBm\n* 'Fair' : 25 dBm to 18 dBm\n* 'Weak' : 18 dBm to 0 dBm\n* 'Disconnected' : 0 dBm\n",
"events":{
"onWiFiSignalQualityChange" : "Triggered when Wifi signal strength switches between Excellent, Good, Fair, Weak."
},
Expand Down Expand Up @@ -1294,7 +1304,7 @@
"example": 2
},
"EAP": {
"summary": "Supports security mode WPA enterpise",
"summary": "Supports security mode WPA enterprise",
"type": "integer",
"example": 3
}
Expand Down Expand Up @@ -1341,7 +1351,7 @@
}
},
"SetHostname": {
"summary": "To configure a custom DHCP hostname instead of the default (which is typically the device name).\n\nSetting host name will take effect upon reconnect; like, device reboot, wake-up from deepsleep, while connecting to new Wi-Fi connection, WiFi On/Off, or renewal of the DHCP lease.",
"summary": "To configure a custom DHCP hostname instead of the default (which is typically the default hostname).\n\nSetting host name will take effect upon reconnect; like, device reboot, wake-up from deepsleep, while connecting to new Wi-Fi connection, WiFi On/Off, or renewal of the DHCP lease.",
"params": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1455,7 +1465,7 @@
"type": "object",
"properties": {
"prevState":{
"summary": "The privious internet connection state",
"summary": "The previous internet connection state",
"type": "integer",
"example": 1
},
Expand Down
29 changes: 16 additions & 13 deletions docs/NetworkManagerPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a name="head.NetworkManager_Plugin"></a>
# NetworkManager Plugin

**Version: 2.3.0**
**Version: 3.3.0**

**Status: :black_circle::black_circle::black_circle:**

Expand All @@ -23,7 +23,7 @@ org.rdk.NetworkManager interface for Thunder framework.
<a name="head.Scope"></a>
## Scope

This document describes purpose and functionality of the org.rdk.NetworkManager interface (version 2.3.0). It includes detailed specification about its methods provided and notifications sent.
This document describes purpose and functionality of the org.rdk.NetworkManager interface (version 3.3.0). It includes detailed specification about its methods provided and notifications sent.

<a name="head.Case_Sensitivity"></a>
## Case Sensitivity
Expand Down Expand Up @@ -89,7 +89,7 @@ NetworkManager interface methods:
| [GetPublicIP](#method.GetPublicIP) | Gets the internet/public IP Address of the device |
| [Ping](#method.Ping) | Pings the specified endpoint with the specified number of packets |
| [Trace](#method.Trace) | Traces the specified endpoint with the specified number of packets using `traceroute` |
| [StartWiFiScan](#method.StartWiFiScan) | Initiates WiFi scaning |
| [StartWiFiScan](#method.StartWiFiScan) | Initiates WiFi scanning |
| [StopWiFiScan](#method.StopWiFiScan) | Stops WiFi scanning |
| [GetKnownSSIDs](#method.GetKnownSSIDs) | Gets list of saved SSIDs |
| [AddToKnownSSIDs](#method.AddToKnownSSIDs) | Saves the SSID, passphrase, and security mode for upcoming and future sessions |
Expand All @@ -103,7 +103,7 @@ NetworkManager interface methods:
| [GetWiFiSignalQuality](#method.GetWiFiSignalQuality) | Get WiFi signal quality of currently connected SSID |
| [GetSupportedSecurityModes](#method.GetSupportedSecurityModes) | Returns the Wifi security modes that the device supports |
| [GetWifiState](#method.GetWifiState) | Returns the current Wifi State |
| [SetHostname](#method.SetHostname) | To configure a custom DHCP hostname instead of the default (which is typically the device name) |
| [SetHostname](#method.SetHostname) | To configure a custom DHCP hostname instead of the default (which is typically the default hostname) |

<a name="method.SetLogLevel"></a>
## *SetLogLevel [<sup>method</sup>](#head.Methods)*
Expand Down Expand Up @@ -418,7 +418,7 @@ Gets the IP setting for the given interface.
| result.ipaddress | string | The IP address |
| result.prefix | integer | The prefix number |
| result.gateway | string | The gateway address |
| result.ula | string | The IPv6 Unified Local Address |
| result.ula | string | The IPv6 Unique Local Address |
| result.primarydns | string | The primary DNS address |
| result.secondarydns | string | The secondary DNS address |
| result.success | boolean | Whether the request succeeded |
Expand Down Expand Up @@ -453,7 +453,7 @@ Gets the IP setting for the given interface.
"ipaddress": "192.168.1.101",
"prefix": 24,
"gateway": "192.168.1.1",
"ula": "d00:410:2016::",
"ula": "fd00:410:2016::",
"primarydns": "192.168.1.1",
"secondarydns": "192.168.1.2",
"success": true
Expand Down Expand Up @@ -1006,7 +1006,7 @@ Traces the specified endpoint with the specified number of packets using `tracer
<a name="method.StartWiFiScan"></a>
## *StartWiFiScan [<sup>method</sup>](#head.Methods)*

Initiates WiFi scaning. This method supports scanning for specific range of frequency like 2.4GHz only or 5GHz only or 6GHz only or ALL. When no input passed about the frequency to be scanned, it scans for all. When list of SSIDs to be scanned specifically, it can be passed as input. It publishes 'onAvailableSSIDs' event upon completion.
Initiates WiFi scanning. This method supports scanning specific frequency bands (2.4GHz, 5GHz, 6GHz). When no input is passed for frequency, it scans all supported frequencies. When list of SSIDs to be scanned specifically, it can be passed as input. It publishes 'onAvailableSSIDs' event upon completion.

Also see: [onAvailableSSIDs](#event.onAvailableSSIDs)

Expand All @@ -1015,7 +1015,8 @@ Also see: [onAvailableSSIDs](#event.onAvailableSSIDs)
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| params | object | |
| params?.frequency | string | <sup>*(optional)*</sup> The frequency to scan. An empty or `null` value scans all frequencies |
| params?.frequencies | array | <sup>*(optional)*</sup> Frequency bands to scan. Omit this field or pass "ALL" to scan all frequencies |
| params?.frequencies[#] | string | <sup>*(optional)*</sup> The frequency to scan |
| params?.ssids | array | <sup>*(optional)*</sup> The list of SSIDs to be scanned |
| params?.ssids[#] | string | <sup>*(optional)*</sup> The SSID to scan |

Expand All @@ -1036,7 +1037,9 @@ Also see: [onAvailableSSIDs](#event.onAvailableSSIDs)
"id": 42,
"method": "org.rdk.NetworkManager.1.StartWiFiScan",
"params": {
"frequency": "5",
"frequencies": [
"2.4"
],
"ssids": [
"Xfinity Mobile"
]
Expand Down Expand Up @@ -1558,7 +1561,7 @@ This method takes no parameters.
<a name="method.GetWiFiSignalQuality"></a>
## *GetWiFiSignalQuality [<sup>method</sup>](#head.Methods)*

Get WiFi signal quality of currently connected SSID. The signal quality is identifed based on the Signal to Noise ratio which is calculated as SNR = rssi - noise. The possible states are
Get WiFi signal quality of currently connected SSID. The signal quality is identified based on the Signal to Noise ratio which is calculated as SNR = rssi - noise. The possible states are
* 'Excellent' : More than 40 dBm
* 'Good' : 40 dBm to 25 dBm
* 'Fair' : 25 dBm to 18 dBm
Expand Down Expand Up @@ -1631,7 +1634,7 @@ This method takes no parameters.
| result.security.NONE | integer | Security mode for open network |
| result.security.WPA_PSK | integer | Supports security mode WPA,WPA-PSK,WPA2-PSK, WPA3-Personal-Transition |
| result.security.SAE | integer | Supports security mode WPA3-Personal |
| result.security.EAP | integer | Supports security mode WPA enterpise |
| result.security.EAP | integer | Supports security mode WPA enterprise |
| result.success | boolean | Whether the request succeeded |

### Example
Expand Down Expand Up @@ -1726,7 +1729,7 @@ This method takes no parameters.
<a name="method.SetHostname"></a>
## *SetHostname [<sup>method</sup>](#head.Methods)*

To configure a custom DHCP hostname instead of the default (which is typically the device name).
To configure a custom DHCP hostname instead of the default (which is typically the default hostname).

Setting host name will take effect upon reconnect; like, device reboot, wake-up from deepsleep, while connecting to new Wi-Fi connection, WiFi On/Off, or renewal of the DHCP lease.

Expand Down Expand Up @@ -1891,7 +1894,7 @@ Triggered when internet connection state changed.The possible internet connectio
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| params | object | |
| params.prevState | integer | The privious internet connection state |
| params.prevState | integer | The previous internet connection state |
| params.prevStatus | string | The previous internet connection status |
| params.state | integer | The internet connection state |
| params.status | string | The internet connection status |
Expand Down
4 changes: 2 additions & 2 deletions interface/INetworkManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ namespace WPEFramework

enum WIFIFrequency : uint8_t
{
WIFI_FREQUENCY_NONE /* @text: NONE */,
WIFI_FREQUENCY_ALL /* @text: ALL */,
WIFI_FREQUENCY_2_4_GHZ /* @text: 2.4GHz */,
WIFI_FREQUENCY_5_GHZ /* @text: 5GHz */,
WIFI_FREQUENCY_6_GHZ /* @text: 6GHz */,
Expand Down Expand Up @@ -248,7 +248,7 @@ namespace WPEFramework

// WiFi Specific Methods
/* @brief Initiate a WIFI Scan; This is Async method and returns the scan results as Event */
virtual uint32_t StartWiFiScan(const string& frequency /* @in */, IStringIterator* const ssids/* @in */) = 0;
virtual uint32_t StartWiFiScan(IStringIterator* const frequencies /* @in */, IStringIterator* const ssids/* @in */) = 0;
virtual uint32_t StopWiFiScan(void) = 0;

virtual uint32_t GetKnownSSIDs(IStringIterator*& ssids /* @out */) = 0;
Expand Down
Loading
Loading