Wi-Fi AP/AP Concurrency

Android 12 introduces Wi-Fi AP/AP concurrency, which allows devices to create two access point (AP) interfaces. This feature allows devices to 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 for Tethering.

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.4Ghz band and one on the 5Ghz 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.4Ghz or 5GHz) 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 Customizing 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 APIs in vendor HAL version 1.5

    • IWifiChip.createBridgedApIface()
    • IWifiChip.removeIfaceInstanceFromBridgedApIface()
    • IWifiApIface.resetToFactoryMacAddress()
    • IWifiApIface.getBridgedInstances()
  • The HAL Wi-Fi interface combination can't have two concurrent AP interfaces exposed using a specifaction format such as [{AP} <= 2, ...]. This is because the Wi-Fi HAL exposes a single bridged interface to the Wi-Fi and connectivity stack. For more information, see Wi-Fi multi-interface concurrency.

Implementation

To implement Wi-Fi AP/AP concurrency, do the following:

  1. 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
  2. Configure the bridged soft AP configuration by calling one of the following methods:

  3. Register a callback to obtain the device capabilities using WifiManager#registerSoftApCallback. The SoftApCallback callback provides the following methods for a bridged soft AP configuration:

Customizing 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 if SoftApConfiguration#setBridgedModeOpportunisticShutdownEnabled is enabled.