本文以《Wi-Fi Simple Configuration Technical Specification Version 2.0.5》为参考。
从使用场景来说,WPS有三种触发方式:
- PBC (Push Button Configuration)
- Supplicant PIN (Personal Identification Number, device password)
- AP PIN
PBC - 指在enrolle和registrar上通过物理按钮触发的方式,也可以通过软件,调用与按钮触发相同的处理逻辑开启。
Supplicant PIN - supplicant端,比如手机、无线网卡等,产生PIN码,registrar端输入相同PIN码完成自动配置流程。此时,supplicant作为enrollee。在802.1X连接初始化时,其会在EAP-Response/Identity中声明为"WFA-SimpleConfig-Enrollee-1-0"。所谓PIN码,其实就是一个由4或8位数字组成的设备密码(WSC文档中为device password),需要根据特定的算法规则生成。
AP PIN - AP端产生PIN码,supplicant端输入相同的PIN码。此时,supplicant作为registrar注册到AP。在802.1X连接初始化时,其会在EAP-Response/Identity中声明为"WFA-SimpleConfig-Registrar-1-0"。比如,无线路由器(AP)产生PIN码,在无线网卡(STA)上输入相同的PIN码,此时,STA为registrar,AP类似enrollee,在EAP消息交互中,