Android 9 ช่วยให้อุปกรณ์ทำงานในโหมด STA และ AP ได้พร้อมกัน สำหรับอุปกรณ์ที่รองรับย่านความถี่ 2 ย่านพร้อมกัน (DBS) ฟีเจอร์นี้จะเปิดโอกาสให้ใช้ความสามารถใหม่ๆ เช่น ไม่รบกวน Wi-Fi ของ STA เมื่อผู้ใช้ต้องการเปิดใช้ฮอตสปอต (SoftAP)
ตัวอย่างและแหล่งที่มา
รองรับการทำงานพร้อมกันของ STA/AP ของ Wi-Fi ในโค้ดเฟรมเวิร์ก Android ของ AOSP เริ่มต้น นอกจากนี้ การใช้งาน HAL อ้างอิงที่อธิบายไว้ในWi-Fi HAL ยังรองรับการทำงานนี้ด้วย WIFI_HIDL_FEATURE_DUAL_INTERFACE Flag ของเวลาสร้างที่อธิบายไว้ในการใช้งานจะเปิดใช้ข้อกําหนดแบบพร้อมกันของอินเทอร์เฟซ ซึ่งระบุการรองรับ STA และ AP พร้อมกัน
การใช้งาน
วิธีใช้ STA/AP พร้อมกันของ Wi-Fi ในอุปกรณ์
เปิด Flag ของเวลาสร้างเพื่อเปิดใช้การรองรับอินเทอร์เฟซ 2 รายการใน HAL
ธงอยู่ใน device/<oem>/<device>/BoardConfig-common.mk
[[["เข้าใจง่าย","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 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"]]