Android 12 introduces Wi-Fi AP/AP concurrency, which lets devices create two access point (AP) interfaces. This feature lets devices support tethering through a dual band simultaneous (DBS) Wi-Fi hotspot (soft AP). For details on supporting tethering through a single Wi-Fi hotspot, see Wi-Fi Hotspot (Soft AP) Support.
This page describes the device behavior when this feature is enabled and implementation details for device manufacturers and vendors.
How it works
When Wi-Fi AP/AP concurrency is supported, the device can create two AP interfaces, for example, one interface working on the 2.4 GHz band and one on the 5 GHz band. Clients can then connect to each of the AP interfaces.
The Wi-Fi HAL generates a single bridged interface with the two AP interfaces and exposes it to the Wi-Fi and connectivity stack when the stack enables a soft AP. After the soft AP is enabled, the Wi-Fi HAL indicates that two interfaces are available and updates the information (such as operation channel, bandwidth, and BSSID) for each AP.
To save power, the framework disables an unused AP (2.4 GHz, 5 GHz, or 6 GHz) after a period of inactivity. The framework considers an AP to be inactive when no client is connected. Device manufacturers can customize the length of this inactive period. For more information, see Customize the inactivity period.
Devices support Wi-Fi AP/AP concurrency by using one of the following bridged soft AP configurations:
- Configuring two bands (the channel is automatically selected by the framework or the driver)
- Configuring two channels on a dual-band AP
Requirements
To implement Wi-Fi AP/AP concurrency, devices must meet the following requirements:
The Wi-Fi chip or firmware must support two concurrent AP connections. The firmware must support all channel and band combinations for both connections. To avoid performance issues, we recommend using a 2x2+2x2 DBS capable Wi-Fi chip.
The device must support the following methods in the Wi-Fi Vendor HAL:
IWifiChip.createBridgedApIface()
IWifiChip.removeIfaceInstanceFromBridgedApIface()
IWifiApIface.resetToFactoryMacAddress()
IWifiApIface.getBridgedInstances()
Implementation
To implement Wi-Fi AP/AP concurrency, do the following:
Enable at least one of the following functions (disabled by default) using runtime resource overlays:
config_wifiBridgedSoftApSupported
: Supports multiple APs that are bridged together.config_wifiStaWithBridgedSoftApConcurrencySupported
: Supports concurrency of a station (STA) and multiple bridged APs.
For devices using the AIDL Wi-Fi HAL or HIDL Wi-Fi HAL 1.6, define
AP_BRIDGED
in the Wi-Fi HAL interface combination. For more details, see Wi-Fi multi-interface concurrency.Configure the bridged soft AP configuration by calling one of the following methods:
Register a callback to obtain the device capabilities using
WifiManager#registerSoftApCallback
. TheSoftApCallback
callback provides the following methods for a bridged soft AP configuration:SoftApCallback#onInfoChanged
: Provides information about the running soft AP instances.SoftApCallback#onConnectedClientsChanged
: Provides a list of connected clients for a soft AP instance.
Customize the inactivity period
To customize the length of the inactivity period, configure the following
overlay, which is found
in packages/modules/Wifi/service/ServiceWifiResources/res/values/config.xml
:
config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond
: The default shutdown timeout interval. Only valid ifSoftApConfiguration#setBridgedModeOpportunisticShutdownEnabled
is enabled.(Available from 13)
config_wifiFrameworkSoftApDisableBridgedModeShutdownIdleInstanceWhenCharging
: Indicates whether to disable the inactivity shutdown timer when charging.