Table of Contents
title
| title |
|---|
| prplMesh Wireless Hardware Manager (pWHM) |
pWHM is the software module of prplMesh which implements all interactions with the Wifi driver.
- It configures WiFi through nl802.11 Linux APIs and acts as the prplMesh executor agent.
- It handles WiFi radios/access-points/SSIDs/Endpoints configuration through TR181 data-model, accessible through the system bus.
- It can be configured using prplmesh NB API. The default configuration is installed by odl generator.
pWHM is loaded as an amx-rt plugin (.so file) (not like a classic standalone Linux process).
- It therefore gets naturally connected to all available system buses (i.e via available ubus, usp, ... bus connectors), and can interact (answer requests, send notifications) with all running processes regardless their used bus.
- In addition the plugin can load, at runtime, additional add-ons that can customize and extend the native features available in the default wifi nl80211 implementation. This typically includes a "vendor module", which will provide vendor specific implementations for a given feature. This can also include other features, that need direct interaction with the wifi driver, such vendor proprietary wifi features .
All the plugin configuration are indicated in odl file: including the path of the plugin .so file, the logging zones with their default log levels, ...
PWHM component additionally includes an internal library (the wld lib) implementing write handlers for all generic TR181 WiFi data-model, which are calling the relevant functions in the vendor function table, to actually push the request to the driver module.
Also, the lib wld offers methods for nl80211 and hostapd/wpa_supplicant configuration and communication, and some other generic linux APIs (ioctl, user space utils, etc.) These APIs are used by the pWHM plugin but are also available for vendor modules.
Datamodel
pwhm datamodel is documented in its different odl files : https://gitlab.com/prpl-foundation/prplmesh/pwhm/plugins/pwhm/-/tree/main/odl?ref_type=heads The ODL file follows the DataModel structure of the WiFi object.
- Radio object : https://gitlab.com/prpl-foundation/prplmesh/pwhm/plugins/pwhm/-/blob/main/odl/wld_radio.odl
- SSID object : https://gitlab.com/prpl-foundation/prplmesh/pwhm/plugins/pwhm/-/blob/main/odl/wld_ssid.odl
- AccessPoint object : https://gitlab.com/prpl-foundation/prplmesh/pwhm/plugins/pwhm/-/blob/main/odl/wld_accesspoint.odl
- Endpoint object : https://gitlab.com/prpl-foundation/prplmesh/pwhm/plugins/pwhm/-/blob/main/odl/wld_endpoint.odl
- MLD object : https://gitlab.com/prpl-foundation/prplmesh/pwhm/plugins/pwhm/-/blob/main/odl/wld_mld.odl
It generally refers to TR181 standards datamodel, as defined in the USP specifications.
Low Layer APIs
pwhm interacts with the Wi-Fi driver through two main ways :
-
hostapd and wpa-supplicant daemon. pwhm uses different means to interact with hostapd :
- hostapd and wpa-supplicant configuration file
- wpa-ctrl interface
-
Kernel driver.
- NL802.11 APIs are used to interact with the Wi-Fi driver
- pwhm also interact with the Linux Wi-Fi Netdev interface
All interactions are documented in the Architecture document available on Confluence.
References :
Architecture Documentation
Main page
Security daemon management : https://prplfoundationcloud.atlassian.net/wiki/spaces/PRPLMESH/pages/995459077/pWHM+security+daemons+management
Wi-Fi 7 management :
(https://prplfoundationcloud.atlassian.net/wiki/spaces/PRPLMESH/pages/995262497/pWHM+WiFi7+management)
Source code :
pwhm service :
https://gitlab.com/prpl-foundation/prplmesh/pwhm/plugins/pwhm
SWLa library
https://gitlab.com/prpl-foundation/prplmesh/pwhm/libraries/libswla
SWLc Library
https://gitlab.com/prpl-foundation/prplmesh/pwhm/libraries/libswlc