You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 3 Next »
Internal page, review is in progress.
Unified (One)Wi-Fi is an 802.11 protocol stack designed for the configuration, statistics, steering, and telemetry of Wi-Fi driver and basebands. It has been architected based on years of experience addressing field and deployment challenges. The implementation is largely generic due to the use of open-source modules (hostap) and Linux libraries (netlink, cfg80211), enabling the stack to operate seamlessly across multiple Wi-Fi chipsets and ensuring easy portability to new devices. The stack supports various management protocols, including WebConfig, TR-181, WFA Data Elements, and TR-181 USP. Additionally, it also supports wide range of Wi-Fi applications, such as motion detection, device typing, connection admission control, and EasyMesh.

OneWifi offers a comprehensive set of features, as illustrated in the diagram below. The feature set includes support for

OneWifi provides significant advantages for adopters, in addition to its extensive feature set.
OneWifi is primarily built using open-source code that has been widely deployed at scale. This code has been thoroughly vetted for various use cases, resulting in fewer new defects. Additionally, any existing issues are well-documented, with fixes readily available.
The OneWifi codebase is largely generic, with platform-specific differences abstracted by a limited set of HAL functions. This allows for rapid feature development, as common business logic is shared across platforms. New features can be developed on one platform and quickly tested on others.
OneWifi includes robust logging and real-time event visualization capabilities. In addition to informative log files that are periodically uploaded to the cloud, there are several methods for triaging and debugging field issues.
Detailed debugging of specific OneWifi modules can be enabled by creating corresponding tokens in the /tmp directory (e.g., touch /tmp/<token_name>).
Note: Once debugging is complete, the token must be removed from the /tmp directory to restore normal system operation.

OneWifi automatically logs key real-time events to /rdklogs/logs/wifiAnalytics.txt in UML format. This file can be processed by any UML reader to visualize event transfers in real time. This feature is particularly useful for diagnosing client-device-specific connection issues or related problems.
OneWifi utilizes native Linux libraries to interact with lower-layer Wi-Fi drivers. These interactions are based on the cfg80211 and mac80211 specifications, which are supported in most Linux distributions through netlink library functions. If the System on Chip (SoC) vendor’s driver is compliant with cfg80211 and mac80211, OneWifi can typically run on the new SoC with minimal porting effort required for the Wi-Fi HAL functionality.
Overview of OneWifi's Architecture and Design Evolution
OneWifi was developed to address the architectural challenges faced during the development and field deployment of its predecessor, CcspWifiAgent. The previous Wi-Fi stack utilized an overlay of multiple Wi-Fi processes, as depicted on the left side of below diagram. In this architecture, the CcspWifiAgent and Wireless Manager processes acted as independent configuration components for Wi-Fi parameters, which led to significant synchronization issues between states and data.
A dedicated process, the Mesh Agent, was used to synchronize these components. However, if any adverse events impacted the Mesh Agent, the synchronization between the processes would often become misaligned.
In addition to these synchronization challenges, the Stats Manager and Band Steering Manager introduced further complexity to the Wi-Fi stack. The numerous interfaces between the Wi-Fi driver and the baseband also led to reentrancy issues.
Beyond synchronization and reentrancy concerns, the previous architecture also faced other significant challenges, including:
These challenges necessitated the development of OneWifi to streamline the architecture, improve reliability, and enhance maintainability.

The following sections outline the key components of the OneWifi architecture, as depicted in below diagram

The Wi-Fi driver, shown in [1] of the above diagram, is provided by the SoC vendor as part of the Software Development Kit (SDK). It primarily interfaces with the baseband hardware to perform lower MAC (Medium Access Control) functionalities, including:
The Wi-Fi HAL, represented in [2] of the above diagram, provides an abstraction layer that enables upper-layer software components to perform SoC-independent function calls. This layer is largely built using open-source software such as HostAp and cfg80211/netlink80211 libraries.
If the vendor’s driver is cfg80211 compliant, the existing HAL implementation will seamlessly provide the required abstraction functionalities to upper-layer components. If the driver is not compliant, the vendor must implement the specified HAL functions as defined in HAL Specifications 3.0.
The Wi-Fi Core Controller, shown in [3] of the above diagram, acts as the central component of the OneWifi stack. It interfaces with the Wi-Fi driver through the HAL abstraction layer for both control and statistics planes. The Core Controller serializes all configuration and statistics-related queries to the driver, ensuring serialized access and preventing reentrancy issues.
The Services Framework, illustrated in [4] of the above diagram, provides the capability to create, configure, and manage Wi-Fi Virtual Access Point (VAP) services, also known as Wi-Fi networks. The types of network services that can be created include:
The Wi-Fi Applications Framework, shown in [5] of the above diagram, serves as a registry for Wi-Fi applications. It allows applications to register their requirements, such as event notifications, statistics, and periodicity of data collection. This framework provides access to:

The high-level architecture of the OneWifi Applications Framework is illustrated in above diagram. Applications can register with the framework, specifying their capabilities, and begin receiving events and statistics from the core components of the OneWifi stack. This integration allows the applications' algorithms to take real-time actions based on the incoming data.
A variety of application types are currently supported and tested, including:
Applications can either be an integral part of the OneWifi process or run as external processes on the CPE (Customer Premises Equipment). In the latter case, the framework creates a virtual adapter that facilitates seamless data communication between the OneWifi stack and the application.

For applications running as external processes, as depicted in above diagram, RBUS handles all categories of data exchanges between the OneWifi stack and the external application.
The Data Model Manager, shown in first diagram, abstracts various Wi-Fi data model specifications, including TR-181, WFA MultiAP Data Elements, and BBF Data Models. This module also manages the database technology used by OneWifi for persistent storage.
OneWifi supports two main data model specifications:
To manage persistent storage of configuration, RFC, and other operational parameters, OneWifi utilizes a database abstraction layer. This layer hides the complexities of using different relational databases, allowing OneWifi to work with various database technologies, such as MySQL, OVS, or PostgreSQL. OneWifi uses the OVS database as its primary persistent storage mechanism.
The Platform Manager, depicted in first diagram, abstracts platform-specific intricacies and differences, enabling OneWifi to operate on various platforms.
The Bus Abstraction layer allows OneWifi to operate on multiple bus technologies. The supported bus technologies include:
RBUS: The default bus technology in OneWifi. All RDK builds automatically include RBUS unless overridden by specific macro definitions, such as USE_UBUS or USE_HEBUS in makefiles or build scripts.
DBUS: OneWifi can be built and run on DBUS by enabling the USE_DBUS macro in the makefile or build script.
UBUS: To build and run OneWifi on UBUS, the USE_UBUS macro should be enabled in the makefile or build script.
HEBUS: A high-efficiency bus used for high-throughput data transfers between OneWifi and applications that require large volumes of Wi-Fi events data for operating algorithms (e.g., Motion Detection). This can be enabled using the USE_HEBUS macro
The OS Abstraction layer allows OneWifi to run across multiple operating systems. Currently supported operating systems include:
The OneWifi process is multi-threaded, as depicted in below diagram. The various threads communicate with one another through a priority-enabled events queue to manage their interactions.

The primary thread, referred to as the Core Thread (color-coded in green), is responsible for interacting with lower-layer entities, such as the drivers. This thread serializes all interactions with the driver, whether they occur in the control plane or the statistics plane. Additionally, the Core Thread is tasked with publishing statistical data to Wi-Fi applications at the required periodicity, as specified by the applications.
The Stats Orchestration Thread (color-coded in yellow) handles the orchestration of statistics and event requirements for all registered Wi-Fi applications. It maintains a stats cache, which is periodically updated by the Core Thread, and organizes the stats data into specific buckets according to the needs of the registered applications.
The Data Model Thread (color-coded in pink) is responsible for maintaining a data model cache, which is updated by the Core Thread whenever operational data changes. The cache is also updated in response to any changes in statistics. This thread implements the handler functions for the data model's SET and GET operations.
The HAL Events Thread (color-coded in sky blue) remains dormant until an event or management frame is received. Upon activation, this thread submits the event or frame to the Core Thread for further processing.

This step by step guide provides detailed instructions to assist the RDK-B community in porting the OneWifi component to the RPi4 reference platform
It is recommended to use the rdkb-2023q2-dunfell release as the base for porting OneWifi, and to integrate this release on top of the System-on-Chip (SoC) SDK. However, the documentation is applicable to Kirkstone release too
onewifi.service
Target Platform: MediaTek platform (using RPi4 as a reference)
Platform Layer: Create a platform layer for MediaTek, using RPi4 as the reference.
OneWifi Process Bringup Patches
OneWifi component entry: onewifi manifest
HAL component entry: rdk-wifi-hal manifest
Generic Bug Fixes:
Any bug fixes or feature enhancements that are generic enough should be committed to the OneWifi generic repository.
Platform-Specific Flags:
RPi4 has certain limitations related to driver support and end-to-end functionality for OneWifi. To manage these limitations, a flag _PLATFORM_RASPBERRYPI_ has been introduced to enable conditional compilation.
Bulk Atomic HAL APIs:
For bulk atomic HAL APIs related to common configuration, refer to the HAL APIs documentation.
rdkb-wifi.db
At present, support for 64-bit platforms is limited. However, the RDK team provides support for 64-bit builds on RPi4 platforms, with full integration of OneWifi. Many alignment issues and warnings that were previously treated as errors have been resolved in this support.
CcspWifiAgent:
dmcli eRT setv Device.WiFi.Radio.2.X_CISCO_COM_ApplySetting bool true dmcli eRT setv Device.WiFi.Radio.1.X_CISCO_COM_ApplySetting bool true
OneWifi:
#Any dmcli commands specific to SSID and AccessPoint execute the Below Access Point Related apply settings dmcli eRT setv Device.WiFi.ApplyAccessPointSettings bool true #Any dmcli executions specific to Radio level use the below Radio apply settings command dmcli eRT setv Device.WiFi.ApplyRadioSettings bool true
Below is the list of logs present in /rdklogs/logs for Debugging OneWifi issues. For Additional in-depth Debugging one should enable below commands:
check for the respective logs in /tmp:
Initial headers are available in this commit. The following features will be supported by OneWifi as part of Wi-Fi 7, which includes changes in OneWifi, rdk-wifi-hal and libhostap (for Wi-Fi 7 we use libhostap 2.11 version):
For more info refer Porting Guide - OneWifi
DISCLAIMER: Please note that the use of the RDK Wiki is subject to its Privacy Policy & Terms of Use. In addition, this Wiki may be accessed by all RDK licensees and their contractors.
Powered by a free Atlassian Confluence Open Source Project License granted to RDKCentral. Evaluate Confluence today.