-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwps_iwpriv_usage.txt
173 lines (138 loc) · 5.47 KB
/
wps_iwpriv_usage.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
* README: WPS STA as an Enrollee or Registrar
*/
0. Build WPS function. Please set 'HAS_WSC=y'.
1. Enrollee Mode
1.1) PIN mode:
Running Scenarios (case 'a' and 'b')
--------------------------------------------------------
a. Adding an Enrollee to AP+Registrar (EAP)
[AP+Registrar]<----EAP--->[Enrollee Client]
--------------------------------------------------------
b. Adding an Enrollee with external Registrar (UPnP/EAP)
[External Registrar]<----UPnP--->[AP_Proxy]<---EAP--->[Enrollee Client]
--------------------------------------------------------
Note: 'EAP' indicates to use wireless medium and 'UPnP' indicates to use
wired or wireless medium.
(i) [Registrar] or [AP+Registrar]
Enter the Enrollee PinCode on the Registrar and start WPS on the Registrar.
Note: How to get the Enrollee PinCode? Use 'iwpriv ra0 stat' on the Enrollee.
(ii)[RT2860 Linux WPS STA]
iwpriv ra0 wsc_conf_mode 1 ;; Enrollee
iwpriv ra0 wsc_mode 1 ;; PIN
iwpriv ra0 wsc_ap_band 0 (or 1) ;; 0: prefer 2.4G, 1: prefer 5G
iwpriv ra0 wsc_ssid "AP's SSID"
iwpriv ra0 wsc_start
{iii) If the registration is successful, the Enrollee will be re-configured
with the new parameters, and will connect to the AP with these new parameters.
1.2) PBC mode:
Running Scenarios (case 'a' only)
--------------------------------------------------------
a. Adding an Enrollee to AP+Registrar (EAP)
[AP+Registrar]<----EAP--->[Client]
--------------------------------------------------------
(i) [AP+Registrar]
Start PBC on the Registrar.
{ii)[RT2860 Linux WPS STA]
iwpriv ra0 wsc_conf_mode 1 ;; Enrollee
iwpriv ra0 wsc_mode 2 ;; PBC
iwpriv ra0 wsc_ap_band 0 (or 1) ;; 0: prefer 2.4G, 1: prefer 5G
iwpriv ra0 wsc_start
{iii) If the registration is successful, the Enrollee will be re-configured
with the new parameters, and will connect to the AP with these new parameters.
2. Registrar Mode
2.1) PIN mode:
Running Scenarios (case 'a' and 'b')
--------------------------------------------------------
a. Configure the un-configured AP
[Unconfigured AP]<----EAP--->[Registrar]
--------------------------------------------------------
b. Configure the configured AP
[Configured AP]<----EAP--->[Registrar]
--------------------------------------------------------
(i) [AP]
Start PIN on the Enrollee WPS AP.
(ii)[RT2860 Linux WPS STA]
iwpriv ra0 wsc_conf_mode 2 ;; Registrar
iwpriv ra0 wsc_mode 1 ;; PIN
iwpriv ra0 wsc_pin xxxxxxxx ;; AP's PIN Code
iwpriv ra0 wsc_ap_band 0 (or 1) ;; 0: prefer 2.4G, 1: prefer 5G
iwpriv ra0 wsc_ssid "AP's SSID"
iwpriv ra0 wsc_start
{iii) If the registration is successful;
in case 'a':
The Registrar will be re-configured with the new parameters,
and will connect to the AP with these new parameters;
in case 'b':
The Registrar will be re-configured with AP's configurations,
and will connect to the AP with these new parameters.
2.2) PBC mode:
same scenarios as PIN mod
(i) [AP]
Start PBC on the Enrollee WPS AP.
(ii)[RT2860 Linux WPS STA]
iwpriv ra0 wsc_conf_mode 2 ;; Registrar
iwpriv ra0 wsc_mode 2 ;; PBC
iwpriv ra0 wsc_ap_band 0 (or 1) ;; 0: prefer 2.4, 1: prefer 5G
iwpriv ra0 wsc_start
{iii) If the registration is successful;
in case 'a':
The Registrar will be re-configured with the new parameters,
and will connect to the AP with these new parameters;
in case 'b':
The Registrar will be re-configured with AP's configurations,
and will connect to the AP with these new parameters.
3. Others
iwpriv ra0 wsc_cred_count 1 ;; Set count of credentials, Only support one credential for M8 in Registrar mode.
integer: 1 ~ 8
iwpriv ra0 wsc_cred_ssid "idx ssid_str" ;; Set SSID into credtentail[idx]
string:
idx: 0 ~ 7
ssid_str: SSID for AP
example:
iwpriv ra0 wsc_cred_ssid "0 wps_ap1"
iwpriv ra0 wsc_cred_auth "idx auth_str" ;; Set AuthMode into credtentail[idx]
string:
idx: 0 ~ 7
auth_str: OPEN, WPAPSK, WPA2PSK, SHARED, WPA, WPA2
example:
iwpriv ra0 wsc_cred_auth "0 WPAPSK"
iwpriv ra0 wsc_cred_encr "idx encr_str" ;; Set EncrypType into credtentail[idx]
string:
idx: 0 ~ 7
encr_str: NONE, WEP, TKIP, AES
example:
iwpriv ra0 wsc_cred_encr "0 TKIP"
iwpriv ra0 wsc_cred_keyIdx "idx key_index" ;; Set Key Index into credtentail[idx]
string:
idx: 0 ~ 7
key_index: 1 ~ 4
example:
iwpriv ra0 wsc_cred_keyIdx "0 1"
iwpriv ra0 wsc_cred_key "idx key" ;; Set Key into credtentail[idx]
string:
idx: 0 ~ 7
key: ASCII string (wep_key_len(=5,13), passphrase_len(=8~63))
OR
Hex string (wep_key_len(=10,26), passphrase_len(=64))
example:
iwpriv ra0 wsc_cred_key "0 12345678" ;; Passphrase
iwpriv ra0 wsc_cred_key "0 abcd" ;; WEP Key
iwpriv ra0 wsc_cred_mac "idx mac_str" ;; Set AP's MAC into credtentail[idx]
string:
idx: 0 ~ 7
mac_str: xx:xx:xx:xx:xx:xx
example:
iwpriv ra0 wsc_cred_mac "0 00:11:22:33:44:55"
iwpriv ra0 wsc_conn_by_idx 0 ;; Connect AP by credential index.
integer: 0 ~ 7
iwpriv ra0 wsc_auto_conn 0 ;; If the registration is successful, driver will re-connect to AP or not.
integer: 0 ;; Disabled, driver won't re-connect to AP with new configurations.
1 ;; Enabled, driver will re-connect to AP with new configurations.
Note. Default value is 1.
iwpriv ra0 wsc_stop ;; Stop WSC work and don't wait upon two-minute timeout
iwpriv ra0 wsc_ap_band val
val: 0 ;; prefer 2.4G AP
1 ;; prefer 5G AP
2 ;; Auto
iwpriv ra0 stat ;; Read statistics counter and WPS status.