基於Client 2G/5G,Router2G only的WPS連接方式

#通訊
#無線
日期:2026-11-09

WPS 介紹(Wi-Fi Protected Setup)
是一種用於簡化Wi-Fi網絡連接過程的標準和協議。它的主要目的是讓使用者能夠更容易地將新設備連接到Wi-Fi網絡,同時也提供了一種安全的方式來建立這些連接。WPS的設計是為了減少使用者輸入長、複雜的Wi-Fi密碼的需求,從而提高使用者友好性和便利性。


PBC:這是最常見的WPS連接方法。路由器上有一個WPS按鈕,使用者只需按下該按鈕,然後在要連接的設備上也按下WPS按鈕或在設備上的設置中選擇WPS連接。一旦兩者都執行了這個操作,它們會自動交換所需的信息,建立安全的Wi-Fi連接,而無需使用者輸入Wi-Fi密碼。


PIN:此方法需要使用者在設備上輸入一個特定的8位數字PIN碼,該PIN碼通常可以在路由器的標籤上找到。一旦設備輸入了正確的PIN碼,它將能夠連接到Wi-Fi網絡,而無需輸入Wi-Fi密碼。

 

特殊的WPS連線流程說明
     當client 支援2G / 5G,與AP支援2G時的特殊流程。

初始化(Initial State):client支援2.4G / 5G,且AP處在2G頻段開啟的狀態
頻段掃描(Scan Setup):Client 在2.4G / 5G頻段發出頻段掃描,檢測環境中的AP資訊

 

*Client掃描正在廣播已輸入PIN且準備註冊的AP封包。
*如果Client 發現符合第一項的Router,Client將與當前連接/關聯的任何設備斷開連接,並連到目標Router。
*如果PIN正確,繼續進行WPS(停止掃描)。
*如果PIN不正確,斷開連接並移動到下一個發廣播封包PIN的Router。
*如果沒有更多的PIN廣播封包Router,返回到先前連接的Router(如有必要,使用先前的加密金鑰與設定)。

 

1) Client scan* for beacons from APs that are broadcasting that they have a PIN entered and are ready to register an enrolee 
2) If Client finds an AP per (1), client will disassociate from whatever (if anything) it is currently connected/associated to, and associate to the target AP 
3) If PIN is correct, continue WPS, (stop scanning) 
4) If PIN is incorrect, disassociate and move to the next PIN- broadcasting AP 
5) If no more PIN-broadcasting AP, go back to the previously associated AP (with the previous encryption key/settings if necessary)

 

*SCANNING / Start Listening 
A) On boot and on idle (no data frames exchanged for X time) (or predefined timer) 
B) Stay on, or connect to, or prefer previously connected (or currently connected) profile if profile is encrypted 
C) If not connected (and no profile per B) - search for AP with PIN 
D) If no AP with PIN found, go back to defaults or last connected profile (open)

*Client掃描正在廣播已輸入PIN且準備註冊的AP封包。
*如果Client 發現符合第一項的Router,Client將與當前連接/關聯的任何設備斷開連接,並連到目標Router。
*如果PIN正確,繼續進行WPS(停止掃描)。
*如果PIN不正確,斷開連接並移動到下一個發廣播封包PIN的Router。
*如果沒有更多的PIN廣播封包Router,返回到先前連接的Router(如有必要,使用先前的加密金鑰與設定)。

★方案內容均由個人提供,與平台無關,如有違法或侵權,請聯繫大大芯方案專屬信箱