Wi-Fi STA/AP concurrency

Android 9 introduces the ability for devices to operate in STA and AP mode concurrently. For devices supporting Dual Band Simultaneous (DBS), this feature opens up new capabilities such as not disrupting STA Wi-Fi when a user wants to enable hotspot (softAP).

Examples and source

Wi-Fi STA/AP concurrency is supported in the default AOSP Android framework code. It is also supported by the reference HAL implementation described in Wi-Fi HAL. The WIFI_HIDL_FEATURE_DUAL_INTERFACE build-time flag described in Implementation enables an interface concurrency specification indicating concurrent support for STA and AP.

Implementation

To implement Wi-Fi STA/AP concurrency on your device:

  1. Turn on a build-time flag to enable support for two interfaces in the HAL. The flag is located in device/<oem>/<device>/BoardConfig-common.mk.

    • WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
  2. Expose two network interfaces:

    • wlan0 and wlan1

The WIFI_HIDL_FEATURE_DUAL_INTERFACE flag is ignored if the WIFI_HAL_INTERFACE_COMBINATIONS flag is specified. For more information, see Wi-Fi multi-interface concurrency.

Validation

To validate that the feature is working as intended, run a manual test.

To manually validate this feature, turn the STA and AP interfaces on and off independently from UI.

If both AP and STA are on the same subnet, routing issues on the device-under-test (DUT) may occur. To avoid collisions, try moving the AP to a different subnet.

Some Wi-Fi chip vendors place the radio in time-sharing mode if STA and AP are on the same band but on different channels. This leads to a severe drop in performance. To address this issue, the chip can use Channel Switch Avoidance (CSA) to either:

  • Move the AP to the same channel as the STA
  • Move the AP to a different band from the STA