How rdkcentral/onewifi works
Purpose and runtime entry
OneWifi is an RDK-B C/C++ component that centrally manages WiFi radios, VAPs, clients, security, statistics, telemetry, and optional mesh/optimization features. It runs as a system service, with SSP lifecycle/bootstrap code starting the WiFi manager and platform bus integration.
• source/dml/wifi_ssp/ssp_main.c
• source/dml/wifi_ssp/ssp_loop.c
• scripts/onewifi.service
Core orchestration and control
wifi_mgr owns global WiFi state, hardware capabilities, and subsystem handles. The control engine is the asynchronous boundary: northbound changes, HAL indications, timers, and app requests are queued and processed before hardware/state updates. This separates request handlers from potentially slow apply operations.
• source/core/wifi_mgr.c
• source/core/wifi_ctrl.c
• source/core/wifi_ctrl_queue_handlers.c
Northbound management interfaces
TR-181/DML exposes Device.WiFi.* through RBus/CCSP-facing callbacks. Cloud configuration enters through WebConfig JSON decoding, schema-specific handlers, validation, and encoding. Both paths converge on manager/database/control flows rather than directly manipulating the HAL.
• source/dml/tr_181/ml/cosa_wifi_dml.c
• source/dml/dml_webconfig/dml_onewifi_api.c
• source/webconfig/wifi_decoder.c
Configuration, persistence, and schema boundary
The database layer mediates WiFi configuration and operational state, backed by OVSDB support and cached structures. WebConfig supports distinct subdocuments for radio, private/home SSIDs, mesh, steering, telemetry-related data, and other features. Schemas are a compatibility contract with configuration producers.
• source/db/wifi_db.c
• lib/ovsdb/ovsdb.c
• config/rdkb-wifi.ovsschema
Southbound WiFi and service application
Core data-plane/control code translates normalized state into WiFi HAL operations and reacts to hardware events. VAP services encode service-specific behavior—private, public, and mesh gateway/pod/extender—rather than scattering VAP policy across the controller. The platform layer abstracts Linux, OpenWrt, RDK-B, DBus, and bus differences.
• source/core/wifi_data_plane.c
• source/core/services/vap_svc.c
• source/platform/rdkb/bus.c
Applications, measurement, and telemetry
An application manager hosts independently enabled modules such as EasyMesh, statistics monitoring, active Blaster tests, CAC, CSI/motion sensing, station management, analytics, and client steering. Statistics collection is a major outbound flow: radio/VAP/client measurements are gathered, transformed, and can use Avro/OpenSync datapipeline artifacts for telemetry.
• source/apps/wifi_apps_mgr.c
• source/stats/wifi_monitor.c
• lib/datapipeline/dppline.c
Infrastructure and dependencies
The component targets Linux-based RDK-B and OpenWrt builds, with platform-specific makefiles and deployment configuration. Material runtime integrations are WiFi HAL/hostapd-wpa_supplicant beneath the component; RBus/CCSP PSM/PandM alongside it; OVSDB for local persistence; and WebConfig, WebPA/Parodus, and telemetry services for cloud interaction. Feature flags select mesh, WiFi 7/MLO, CSI, CAC, and other app modules.
• build/linux/makefile.common
• build/openwrt/Makefile_package
• configure.ac
Main entry points: wifi_mgr.c WiFi manager · ssp_main.c SSP lifecycle · wifi_ctrl_queue_handlers.c Control queue handlers · wifi_ctrl.c Async control engine
Components 19
Service runtime
- OneWifi service · Starts the SSP-managed WiFi component.
scripts/onewifi.service - SSP lifecycle · Initializes lifecycle and platform bus integration.
source/dml/wifi_ssp/ssp_main.c
Core control
- WiFi manager · Owns global WiFi state, capabilities, and subsystem handles.
source/core/wifi_mgr.c - Async control engine · Queues requests, indications, timers, and app actions before apply.
source/core/wifi_ctrl.c - Control queue handlers
source/core/wifi_ctrl_queue_handlers.c - WiFi database · Mediates cached configuration and operational state.
source/db/wifi_db.c - OVSDB support
lib/ovsdb/ovsdb.c
Management & config
- TR-181 DML · Exposes Device.WiFi callbacks over RBus/CCSP.
source/dml/tr_181/ml/cosa_wifi_dml.c - WebConfig API
source/dml/dml_webconfig/dml_onewifi_api.c - WebConfig decoder · Decodes, validates, and encodes feature subdocuments.
source/webconfig/wifi_decoder.c - OVSDB schema · Defines the persisted WiFi configuration contract.
config/rdkb-wifi.ovsschema - Cloud services · WebConfig, WebPA/Parodus, and telemetry services.
Platform & WiFi
- WiFi data plane · Applies normalized state and handles hardware events.
source/core/wifi_data_plane.c - VAP services · Implements private, public, and mesh VAP behavior.
source/core/services/vap_svc.c - RDK-B platform bus · Abstracts platform bus differences.
source/platform/rdkb/bus.c - WiFi HAL & hostapd
Apps & telemetry
- WiFi apps manager · Hosts optional mesh, steering, sensing, CAC, and test modules.
source/apps/wifi_apps_mgr.c - Statistics monitor · Collects radio, VAP, and client measurements.
source/stats/wifi_monitor.c - Telemetry datapipeline · Transforms measurements for outbound telemetry artifacts.
lib/datapipeline/dppline.c
Connections 20
- OneWifi service → SSP lifecycle: starts
- SSP lifecycle → WiFi manager: initializes
- SSP lifecycle → RDK-B platform bus: integrates
- TR-181 DML → WiFi manager: management changes
- WebConfig API → WebConfig decoder: configuration JSON
- Cloud services → WebConfig API: cloud configuration
- WebConfig decoder → WiFi manager: validated subdocuments
- WiFi manager → WiFi database: reads and writes state
- WiFi database → OVSDB support: persists through
- OVSDB schema → OVSDB support: defines data model
- WiFi manager → Async control engine: dispatches control work
- Async control engine → Control queue handlers: processes queued events
- Control queue handlers → WiFi data plane: applies normalized state
- WiFi data plane → WiFi HAL & hostapd: HAL operations and events
- Control queue handlers → VAP services: VAP service actions
- VAP services → WiFi data plane: service policy
- WiFi apps manager → Async control engine: app requests
- Statistics monitor → WiFi apps manager: hosted module
- Statistics monitor → Telemetry datapipeline: measurements
- Telemetry datapipeline → Cloud services: telemetry output