Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
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:
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
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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Wi-Fi STA/AP concurrency\n\nAndroid 9 introduces the ability for devices to\noperate in STA and AP mode concurrently. For devices supporting Dual Band\nSimultaneous (DBS), this feature opens up new capabilities such as not\ndisrupting STA Wi-Fi when a user wants to enable hotspot (softAP).\n\nExamples and source\n-------------------\n\nWi-Fi STA/AP concurrency is supported in the default AOSP Android framework\ncode. It is also supported by the reference HAL implementation described in\n[Wi-Fi HAL](/docs/core/connect/wifi-hal). The\n`WIFI_HIDL_FEATURE_DUAL_INTERFACE` build-time flag described in\n[Implementation](#implementation) enables an interface concurrency specification\nindicating concurrent support for STA and AP.\n\nImplementation\n--------------\n\nTo implement Wi-Fi STA/AP concurrency on your device:\n\n1. Turn on a build-time flag to enable support for two interfaces in the HAL.\n The flag is located in `device/\u003coem\u003e/\u003cdevice\u003e/BoardConfig-common.mk`.\n\n - **WIFI_HIDL_FEATURE_DUAL_INTERFACE := true**\n2. Expose two network interfaces:\n\n - **wlan0** and **wlan1**\n\n| **Note:** To avoid performance issues, only use this feature on devices with a Wi-Fi chip that supports multiple independent hardware MACs (radio chains).\n\nThe `WIFI_HIDL_FEATURE_DUAL_INTERFACE` flag is ignored if the\n`WIFI_HAL_INTERFACE_COMBINATIONS`\nflag is specified. For more information, see\n[Wi-Fi multi-interface\nconcurrency](/docs/core/connect/wifi-hal#wi-fi_multi-interface_concurrency).\n\nValidation\n----------\n\nTo validate that the feature is working as intended, run a manual test.\n\nTo manually validate this feature, turn the STA and AP interfaces on and off\nindependently from UI.\n\nIf both AP and STA are on the same subnet, routing issues on the\ndevice-under-test (DUT) may occur. To avoid collisions, try moving the AP to a\ndifferent subnet.\n\nSome Wi-Fi chip vendors place the radio in time-sharing mode if STA and AP are\non the same band but on different channels. This leads to a severe drop in\nperformance. To address this issue, the chip can use Channel Switch Avoidance\n(CSA) to either:\n\n- Move the AP to the same channel as the STA\n- Move the AP to a different band from the STA"]]