ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
Wi-Fi Easy Connect
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Android 10 รองรับโปรโตคอล Wi-Fi Easy Connect หรือที่เรียกว่า Device Provisioning Protocol (DPP)
Wi-Fi Easy Connect เปิดตัวโดย Wi-Fi Alliance (WFA) เพื่อใช้เป็นทางเลือกแทนการตั้งค่าการป้องกัน Wi-Fi (WPS) WPS เลิกใช้งานแล้วใน Android 9
Wi-Fi Easy Connect มีวิธีการที่ง่ายและปลอดภัยในการดำเนินการต่อไปนี้
- เชื่อมต่ออุปกรณ์ Wi-Fi (รวมถึงอุปกรณ์แบบไม่มีส่วนหัว) กับเครือข่ายโดยไม่ต้องป้อนรหัสผ่าน
- เข้าร่วมเครือข่าย Wi-Fi โดยไม่ต้องทราบหรือป้อนรหัสผ่าน
การกำหนดค่าการเริ่มต้นระบบและการรับรองจะดำเนินการโดยใช้ URI ซึ่งรับมาจากการสแกนคิวอาร์โค้ด (โดยใช้กล้อง) หรือกำหนดค่านอกแบนด์ เช่น โดยใช้ BLE หรือ NFC
Wi-Fi Easy Connect ใช้ช่องทางที่เข้ารหัสเพื่อส่งข้อมูลเข้าสู่ระบบ Wi-Fi ระหว่างอุปกรณ์ และเนื่องจากมีการใช้เฟรมการดำเนินการแบบสาธารณะ อุปกรณ์จึงใช้จุดเข้าใช้งานที่มีอยู่ได้
Android 10 รองรับ Wi-Fi Easy Connect เฉพาะในโหมดผู้เริ่ม (ไม่รองรับโหมดผู้ตอบ) ระบบรองรับโหมดการทํางานต่อไปนี้
- ผู้เริ่มใช้งานและผู้กำหนดค่า: ส่งข้อมูลเข้าสู่ระบบเครือข่ายไปยังอุปกรณ์เครื่องใหม่ด้วยการสแกนคิวอาร์โค้ด
- ผู้เริ่มใช้งาน-ผู้ลงทะเบียน: เข้าร่วมเครือข่ายโดยการสแกนคิวอาร์โค้ดของเครือข่าย
Android 10 รองรับโปรโตคอลคีย์ที่แชร์ล่วงหน้า (PSK) สำหรับ WPA2 และโปรโตคอลการตรวจสอบสิทธิ์แบบเท่ากันพร้อมกัน (SAE) สำหรับ WPA3
อุปกรณ์รองรับ Wi-Fi Easy Connect ในโหมดไคลเอ็นต์เท่านั้น (ไม่รองรับโหมด SoftAP)
การใช้งาน
หากต้องการรองรับ Wi-Fi Easy Connect ให้ใช้อินเทอร์เฟซ Supplicant ที่ระบุไว้ในโปรเจ็กต์โอเพนซอร์ส Android (AOSP)
ซึ่งอยู่ที่ตำแหน่งต่อไปนี้โดยขึ้นอยู่กับอินเทอร์เฟซที่ใช้
ต้องมีสิ่งต่อไปนี้เพื่อรองรับ DPP
การแก้ไขเคอร์เนล Linux เพื่อรองรับ DPP
wpa_supplicant
รองรับ DPP
ไดรเวอร์ Wi-Fi ที่รองรับ DPP
เฟิร์มแวร์ Wi-Fi ที่รองรับ DPP
API สาธารณะพร้อมให้ใช้งานใน Android 10 สำหรับแอปต่อไปนี้
เปิดใช้ Wi-Fi Easy Connect
หากต้องการเปิดใช้ Wi-Fi Easy Connect ในเฟรมเวิร์ก Android ให้ใส่ตัวเลือก compiling CONFIG_DPP
ในไฟล์การกําหนดค่า wpa_supplicant
ดังนี้ android.config
# Easy Connect (Device Provisioning Protocol - DPP)
CONFIG_DPP=y
การตรวจสอบความถูกต้อง
หากต้องการทดสอบการใช้งาน ให้ทําการทดสอบต่อไปนี้
การทดสอบ 1 หน่วย
เรียกใช้
DppManagerTest
เพื่อยืนยันลักษณะการทำงานของ Flag ความสามารถสําหรับ DPP
atest DppManagerTest
การทดสอบ VTS
หากมีการใช้อินเทอร์เฟซ HIDL ให้เรียกใช้
VtsHalWifiSupplicantV1_2TargetTest
เพื่อทดสอบลักษณะการทำงานของ HAL ของโปรแกรมขอสิทธิ์ v1.2
หากมีการใช้อินเทอร์เฟซ AIDL ให้เรียกใช้ VtsHalWifiSupplicantStaIfaceTargetTest
เพื่อทดสอบลักษณะการทำงานของ HAL ของผู้ขอเชื่อมต่อ
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","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 Easy Connect\n\nAndroid 10 introduces support for the Wi-Fi Easy\nConnect protocol, also known as the device provisioning protocol (DPP).\n[Wi-Fi Easy Connect](https://www.wi-fi.org/discover-wi-fi/wi-fi-easy-connect)\nwas introduced by the Wi-Fi Alliance (WFA) as an alternative to\nWi-Fi Protected Setup (WPS). WPS was deprecated in Android 9.\n\nWi-Fi Easy Connect provides a simple and secure method to:\n\n- Onboard Wi-Fi devices (including headless devices) to a network without entering a password.\n- Join Wi-Fi networks without knowing or entering a password.\n\nBootstrapping and authentication is configured using a URI, which is acquired\nby scanning a QR code (using a camera), or is configured out-of-band,\nfor example, using BLE or NFC.\n\nWi-Fi Easy Connect uses an encrypted channel to send Wi-Fi credentials between\ndevices, and because public action frames are used, devices can use existing\naccess points.\n\nAndroid 10 supports Wi-Fi Easy Connect only in\ninitiator mode (responder mode is\nnot supported). These modes of operation are supported:\n\n- **Initiator-Configurator:** Send network credentials to a new device by scanning its QR code.\n- **Initiator-Enrollee:** Join a network by scanning the network QR code.\n\nAndroid 10 supports the pre-shared key (PSK) protocol\nfor WPA2 and the simultaneous authentication of equals (SAE) protocol for WPA3.\n\nWi-Fi Easy Connect is only supported in client mode (SoftAP mode is not\nsupported).\n\nImplementation\n--------------\n\nTo support Wi-Fi Easy Connect, implement the supplicant interface\nprovided in the Android Open Source Project (AOSP).\nDepending on the interface that was implemented, this is at:\n\n- [`hardware/interfaces/wifi/supplicant/1.2/`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/wifi/supplicant/1.2/) or a later version for HIDL\n- [`hardware/interfaces/wifi/supplicant/aidl/`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/wifi/supplicant/aidl/android/hardware/wifi/supplicant) for AIDL\n\nThe following are required to support DPP:\n\n- Linux kernel patches to support DPP:\n\n - cfg80211\n - nl80211\n- [`wpa_supplicant`](https://android.googlesource.com/platform/external/wpa_supplicant_8/+/refs/heads/main)\n with support for DPP\n\n- Wi-Fi driver with support for DPP\n\n- Wi-Fi firmware with support for DPP\n\nPublic APIs are available in Android 10 for use by\napps:\n\n- [`WifiManager#isEasyConnectSupported`](https://developer.android.com/reference/android/net/wifi/WifiManager#isEasyConnectSupported()): Queries the framework to determine whether the device supports Wi-Fi Easy Connect.\n- [`Activity#startActivityForResult(ACTION_PROCESS_WIFI_EASY_CONNECT_URI)`](https://developer.android.com/reference/android/provider/Settings.html#ACTION_PROCESS_WIFI_EASY_CONNECT_URI): Allows apps to integrate Wi-Fi Easy Connect into their onboarding/setup flow.\n\n### Enable Wi-Fi Easy Connect\n\nTo enable Wi-Fi Easy Connect in the Android framework, include the\n`CONFIG_DPP` compilation\noption in the `wpa_supplicant` configuration file,\n[`android.config`](https://android.googlesource.com/platform/external/wpa_supplicant_8/+/refs/heads/android16-release/wpa_supplicant/android.config): \n\n```\n# Easy Connect (Device Provisioning Protocol - DPP)\nCONFIG_DPP=y\n```\n\nValidation\n----------\n\nTo test your implementation, run the following tests.\n\n### Unit tests\n\nRun\n[`DppManagerTest`](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/DppManagerTest.java)\nto verify the behavior of the capability flags for DPP. \n\n```\natest DppManagerTest\n```\n\n### VTS tests\n\nIf the HIDL interface is implemented, run\n[`VtsHalWifiSupplicantV1_2TargetTest`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/wifi/supplicant/1.2/vts/functional/supplicant_sta_iface_hidl_test.cpp)\nto test the behavior of the supplicant HAL v1.2.\n\nIf the AIDL interface is implemented, run\n[`VtsHalWifiSupplicantStaIfaceTargetTest`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/wifi/supplicant/aidl/vts/functional/supplicant_sta_iface_aidl_test.cpp)\nto test the behavior of the supplicant HAL."]]