[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],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"]]