-
Notifications
You must be signed in to change notification settings - Fork 7
/
iwpriv_usage.txt
447 lines (354 loc) · 14.5 KB
/
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
iwpriv
=================
This is detailed explanation of each parameters for iwpriv.
Before reading this document, make sure you already read README.
-------------------------------------------------------------------------------------------------------
USAGE:
iwpriv ra0 commands val
NOTE:
Wireless Extension Private Handlers
where
[commands] [val]
{range}
----------------- -------------------------------------------------
wsc_conf_mode {0, 1, 2}
::Set WPS conf mode
0: WPS Disabled
1: Enrollee
2: Registrar
wsc_mode {1, 2}
::PIN or PBC
1: PIN
2: PBC
wsc_pin {00000000 ~ 99999999}
::Set Enrollee's PIN Code
wsc_ssid {0~z, 1~32 ascii characters}
::Set WPS AP SSID
wsc_start NULL
::Trigger RT2860 STA driver to do WPS process
wsc_stop NULL
::Stop WPS process
wsc_gen_pincode NULL
::Generate new PIN code
wsc_cred_count {1 ~ 8}
::Set count of WPS credential
wsc_cred_ssid {"idx ssid_str"}
::Set SSID into credtentail[idx]
idx: 0 ~ 7
ssid_str: 0~z, 1~32 ascii characters
wsc_cred_auth {"idx auth_str"}
::Set AuthMode into credtentail[idx]
idx: 0 ~ 7
auth_str: OPEN, WPAPSK, WPA2PSK, SHARED, WPA, WPA2
wsc_cred_encr {"idx encr_str"}
::Set EncrypType into credtentail[idx]
idx: 0 ~ 7
encr_str: NONE, WEP, TKIP, AES
wsc_cred_keyIdx {"idx key_index"}
::Set Key Index into credtentail[idx]
idx: 0 ~ 7
key_index: 1 ~ 4
wsc_cred_key {"idx key"}
::Set Key into credtentail[idx]
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))
wsc_cred_mac {"idx mac_str"}
::Set AP's MAC into credtentail[idx]
idx: 0 ~ 7
mac_str: xx:xx:xx:xx:xx:xx
wsc_conn_by_idx {0 ~ 7}
::Connect AP by credential index
wsc_auto_conn {0, 1}
::Set driver to re-connecting to AP or not after registration.
0: Disabled, driver won't re-connect to AP with new configurations.
1: Enabled, driver will re-connect to AP with new configurations.
wsc_ap_band {0, 1, 2}
::Set prefer band to do WPS with dual band WPS AP
0 : prefer 2.4G
1 : prefer 5G
2 : auto
Default value is auto (2)
-------------------------------------------------------------------------------------------------------
USAGE:
iwpriv ra0 set [parameters]=[val]
NOTE:
Execute one iwpriv/set command simultaneously.
where
[parameters] [val]
{range}
----------------- -------------------------------------------------
CountryRegion {0~7}
::Set country region
0: 1 ~ 11 ch
1: 1 ~ 13 ch
2: 10, 11 ch
3: 10 ~ 13 ch
4: 14 ch
5: 1 ~ 14 ch
6: 3 ~ 9 ch
7: 5 ~ 13 ch
31: 1 ~ 14 ch (ch1-11:active scan, ch12-14 passive scan)
CountryRegionABand {0~11}
::Set country region for A band
0: 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165 ch
1: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 ch
2: 36, 40, 44, 48, 52, 56, 60, 64 ch
3: 52, 56, 60, 64, 149, 153, 157, 161 ch
4: 149, 153, 157, 161, 165 ch
5: 149, 153, 157, 161 ch
6: 36, 40, 44, 48 ch
7: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 ch
8: 52, 56, 60, 64 ch
9: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 132, 136, 140, 149, 153, 157, 161, 165 ch
10: 36, 40, 44, 48, 149, 153, 157, 161, 165 ch
11: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 149, 153, 157, 161 ch
SSID {0~z, 1~32 ascii characters}
::Set AP SSID
WirelessMode {0~10}
::Set Wireless Mode
0: legacy 11b/g mixed
1: legacy 11B only
2: legacy 11A only
3: legacy 11a/b/g mixed
4: legacy 11G only
5: 11ABGN mixed
6: 11N only
7: 11GN mixed
8: 11AN mixed
9: 11BGN mixed
10: 11AGN mixed
Channel depends on CountryRegion or CountryRegionForABand
::Set Channel
BGProtection {0~2}
::Set 11B/11G Protection
0:Auto,
1:Always on,
2:Always off
TxPreamble {0~2}
::Set TxPreamble
0:Preamble Long,
1:Preamble Short,
2:Auto
RTSThreshold {1~2347}
::Set RTS Threshold
FragThreshold {256~2346}
::Set Fragment Threshold
TxBurst {0,1}
::Set TxBurst Enable or Disable
0:Disable,
1:Enable
NetworkType {Infra,Adhoc}
::Set Network type
AuthMode {OPEN,SHARED,WEPAUTO,WPAPSK,WPA2PSK,WPANONE}
::Set Authentication Mode
EncrypType {NONE,WEP,TKIP,AES}
::Set Encryption Type
DefaultKeyID {1~4}
::Set Default Key ID
Key1 {5 ascii characters or 10 hex number or
13 ascii characters or 26 hex numbers}
::Set Key1 String
Key2 {5 ascii characters or 10 hex number or
13 ascii characters or 26 hex numbers}
::Set Key2 String
Key3 {5 ascii characters or 10 hex number or
13 ascii characters or 26 hex numbers}
::Set Key3 String
Key4 {5 ascii characters or 10 hex number or
13 ascii characters or 26 hex numbers}
::Set Key4 String
WPAPSK {8~63 ascii or 64 hex characters}
::WPA Pre-Shared Key
WmmCapable {0,1}
::Set WMM Capable
0:Disable WMM,
1:Enable WMM
PSMode {CAM, MAX_PSP, FAST_PSP}
::Set Power Saving Mode
HtBw {0,1}
::Set BandWidth
0: 20Hz
1: 40Hz
HtMcs {0 ~ 15, 33}
::Set MCS
33: Auto Rate
HtGi {0,1}
::Set Guard Interval(GI)
0: long GI
1: short GI
HtOpMode {0,1}
::Set HT Operation Mode
0: HT mixed format
1: HT greenfield format
HtExtcha {0,1}
::Set Extended Channel Switch Announcement
0: Below
1: Above
HtMpduDensity {0 ~ 7}
::Set The Minimum Time Between MPDUs within an AMPDU
HtBaWinSize {1 ~ 64}
::Set BA WinSize
HtRdg {0,1}
::Set RDG Capable
0: Disabled
1: Enabled
HtAmsdu {0,1}
::Set AMSDU Capable
0: Disabled
1: Enabled
HtAutoBa {0,1}
::Set Auto BA Capable
0: Disabled
1: Enabled
HtBaDecline {0,1}
::Reject BA request from AP
0: Disabled
1: Enabled
HtProtect {0,1}
::Set HT Protect Capable
0: Disabled
1: Enabled
FixedTxMode {CCK, OFDM}
:: Set Fixed Tx Mode for fixed rate setting
Mode = CCK
MCS = 0 => 1Mbps
= 1 => 2Mbps
= 2 => 5.5 Mbps
= 3 => 11 Mbps
Mode = OFDM
MCS = 0 => 6Mbps
= 1 => 9Mbps
= 2 => 12Mbps
= 3 => 18Mbps
= 4 => 24Mbps
= 5 => 36Mbps
= 6 => 48Mbps
= 7 => 54Mbps
==> Build Ethernet Convert function. Please set 'HAS_ETH_CONVERT_SUPPORT=y' in os/linux/config.mk
EthConvertMode {dongle, clone, hybrid}
::Set Ethernet Convert Mode
EthCloneMac {xx:xx:xx:xx:xx:xx}
:: Set Clone MAC
LongRetry {0,255}
:: Set Tx Long Retry Limit
ShortRetry {0,255}
:: Set Tx Short Retry Limit
MeshId {Length 1~32 ascii characters}
:: Set Mesh ID
MeshHostName {Length 1~32 ascii characters}
:: Set Mesh Host Name
MeshAutoLink {1,0}
:: Set Mesh Auto Link Capable
0: Disabled
1: Enabled
MeshAddLink {xx:xx:xx:xx:xx:xx}
:: Add Mesh Link
MeshDelLink {xx:xx:xx:xx:xx:xx}
:: Delete Mesh Link
MeshMultiCastAgeOut {20 ~ 65535 seconds}
:: Set AgeOut time for Mesh MultiCast
MeshAuthMode {OPEN, WPANONE}
:: Set Mesh Authentication Mode
MeshEncrypType {NONE, WEP, TKIP, AES}
:: Set Mesh Encryption Type
MeshDefaultkey {1 ~ 4}
:: Set Mesh Default Key ID
MeshWEPKEY {5 ascii characters or 10 hex number or
13 ascii characters or 26 hex numbers}
:: Set Mesh WEP Key String
MeshWPAKEY {8~63 ascii or 64 hex characters}
:: Set Mesh WPA Pre-Shared Key
Examples
===================================================================
-------------------------------------------------------------------------------------------------------
a> Config STA to link with AP which is OPEN/NONE(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=OPEN
3. iwpriv ra0 set EncrypType=NONE
4. iwpriv ra0 set SSID="AP's SSID"
b> Config STA to link with AP which is SHARED/WEP(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=SHARED
3. iwpriv ra0 set EncrypType=WEP
4. iwpriv ra0 set DefaultKeyID=1
5. iwpriv ra0 set Key1="AP's wep key"
6. iwpriv ra0 set SSID="AP's SSID"
c> Config STA to link with AP which is WPAPSK/TKIP(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=WPAPSK
3. iwpriv ra0 set EncrypType=TKIP
4. iwpriv ra0 set SSID="AP's SSID"
5. iwpriv ra0 set WPAPSK="AP's wpa-preshared key"
6. iwpriv ra0 set SSID="AP's SSID"
d> Config STA to link with AP which is WPAPSK/AES(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=WPAPSK
3. iwpriv ra0 set EncrypType=AES
4. iwpriv ra0 set SSID="AP's SSID"
5. iwpriv ra0 set WPAPSK="AP's wpa-preshared key"
6. iwpriv ra0 set SSID="AP's SSID"
e> Config STA to link with AP which is WPA2PSK/TKIP(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Infra
2. iwpriv ra0 set AuthMode=WPA2PSK
3. iwpriv ra0 set EncrypType=TKIP
4. iwpriv ra0 set SSID="AP's SSID"
5. iwpriv ra0 set WPAPSK=12345678
6. iwpriv ra0 set SSID="AP's SSID"
f> Config STA to create/link as adhoc mode, which is OPEN/NONE(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Adhoc
2. iwpriv ra0 set AuthMode=OPEN
3. iwpriv ra0 set EncrypType=NONE
4. iwpriv ra0 set SSID="Adhoc's SSID"
g> Config STA to create/link as adhoc mode, which is WPANONE/TKIP(Authentication/Encryption)
1. iwpriv ra0 set NetworkType=Adhoc
2. iwpriv ra0 set AuthMode=WPANONE
3. iwpriv ra0 set EncrypType=TKIP
4. iwpriv ra0 set SSID="AP's SSID"
5. iwpriv ra0 set WPAPSK=12345678
6. iwpriv ra0 set SSID="AP's SSID"
h> Get site survey
usage: iwpriv ra0 get_site_survey
i> Get Statistics
usage: iwpriv ra0 stat ; read statistic counter
iwpriv ra0 set ResetCounter=0 ; reset statistic counter
j> Link with an AP which is the largest strength ; set ANY SSID (ssidLen=0)
usage: iwconfig ra0 essid ""
or
usage: iwpriv ra0 set SSID=""
k> Config STA to link as dongle mode with STA own MAC
usage: iwpriv ra0 set EthConvertMode=dongle
l> Config STA to link as clone mode
usage: iwpriv ra0 set EthConvertMode=clone
iwpriv ra0 set EthCloneMac="Desired MAC" ;; 00:00:00:00:00:00 means using STA own MAC
;; FF:FF:FF:FF:FF:FF means using source MAC of first packet coming from wired device
m> Config STA to link as hybrid(dongle+clone) mode
usage: iwpriv ra0 set EthConvertMode=hybrid
iwpriv ra0 set EthCloneMac="Desired MAC" ;; 00:00:00:00:00:00 means using STA own MAC
;; FF:FF:FF:FF:FF:FF means using source MAC of first packet coming from wired device
===================================================================
iwlist
=================
This is detailed explanation of each parameters for iwlist.
-------------------------------------------------------------------------------------------------------
iwlist ra0 scanning ; list the results after scanning(manual rescan)
=======================================================================================================
iwconfig
=================
The following are our support in standard configuration - iwconfig
-------------------------------------------------------------------------------------------------------
iwconfig ra0 essid {NN|on|off} ; set essid
iwconfig ra0 mode {managed|ad-hoc|...} ; set wireless mode
>> rt2860sta driver support monitor mode with linux kernel > 2.4.20.
>> Note: For using monitor mode => if mesh interface is ON, please down the mesh interface first.
iwconfig ra0 freq N.NNNN[k|M|G]] ; set frequency
iwconfig ra0 channel N ; set channel
iwconfig ra0 ap {N|off|auto} ; set AP address
iwconfig ra0 nick N ; set nickname
iwconfig ra0 rate {N|auto|fixed} ; set rate (only support legacy rate setting)
iwconfig ra0 rts {N|auto|fixed|off} ; set RTS threshold
iwconfig ra0 frag {N|auto|fixed|off} ; set Fragment threshold
iwconfig ra0 enc {NNNN-NNNN|off} ; set encryption type
iwconfig ra0 power {period N|timeout N} ; set power management modes
*** Wireless extension usage please refer to man page of 'iwconfig', 'iwlist' and 'iwpriv'. ***