This repository has been archived by the owner on Feb 11, 2020. It is now read-only.
forked from lixz789/mt7610u_wifi_sta_v3002_dpo_20130916
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sta_ate_iwpriv_usage.txt
445 lines (378 loc) · 13.5 KB
/
sta_ate_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
===================================================================================================
ATE Test Command Format for station driver
****** IMPORTANT ******
If you are not familiar with hardware, it is recommanded not to modify hardware default value.
It may damage hardware.
===================================================================================================
Usage:
iwpriv ra0 [act] [parameters]=[val]
where
[act] [parameters] [val] constraints explaination
----- ------------- ----------------- --------------------------------
=====================================
1. Set ATE actions.
Value:
ATESTART - Start ATE function and stop station function.
ATESTOP - Stop ATE function and start station function.
TXCONT - Start continuous TX, for power mask.
TXCARR - Start carrier test, for frequency calibration.
TXFRAME - Transmit frame, for EVM.
RXFRAME - Continuous RX, for PER/FER.
1.1 ATEDA
Set ATE frame header destination address.
Value:
xx:xx:xx:xx:xx:xx ; hex
1.2 ATESA
Set ATE frame header source addr.
Value:
xx:xx:xx:xx:xx:xx ; hex
1.3 ATEBSSID
Set ATE frame header BSSID.
Value:
xx:xx:xx:xx:xx:xx ; hex
1.4 ATECHANNEL
Set ATE Channel, deimal.
Value:
802.11b/g: 1 ~ 14 depends on CountryRegion setting
1.5 ATETXPOW0
Set ATE Tx power for Antenna 1.
Value:
0 ~ 31 ; 2.4GHz, deimal
-7 ~15 ; 5.5GHz, deimal
1.6 ATETXPOW1
Set ATE Tx power for Antenna 2.
Value:
0 ~ 31 ; 2.4GHz, decimal
-7 ~15 ; 5.5GHz, deimal
1.7 ATETXFREQOFFSET
Set ATE RF frequency offset.
Value:
0 ~ 63 ; unit: 2KHz, decimal
1.8 ATETXLEN
Set ATE frame length.
Value:
24 ~ 2312 ; decimal
1.9 ATETXCNT
Set ATE frame Tx count.
Value:
1 ~ ; 32-bit, decimal
1.10 ATETXMODE (Refer to TxMode)
Set ATE Tx Mode.
Value:
0: CCK 802.11b
1: OFDM 802.11g
2: HT_MIX 802.11b/g/n
3: Green Field 802.11n
1.11 ATETXBW (Refer to TxMode)
Set ATE Tx and Rx Bandwidth.
Value:
0: 20MHz
1: 40MHz
1.12 ATETXGI (Refer to TxMode)
Set ATE Tx Guard Interval.
Value:
0: Long
1: Short
1.13 ATETXMCS (Refer to TxMode)
Set ATE Tx MCS type.
Value:
0 ~ 15
1.14 ATETXANT
Set ATE TX antenna.
Value:
0: All
1: Antenna one
2: Antenna two
1.15 ATERXANT
Set ATE RX antenna.
Value:
0: All
1: Antenna one
2: Antenna two
3: Antenna three
1.16 ATERXFER
Set ATE to periodically reset and show up RxCount (per-second) and RxTotalCount.
Value:
0: Disable counter visability
1: Enable counter visability
1.17 ATESHOW
Show all parameters of ATE.
Value:
1
1.18 ATEHELP
List all commands of ATE.
Value:
1
1.19 ResetCounter
Reset statistic counter.
Value:
1
1.20 ATERRF
Read all of the RF registers.
Value:
1
1.21 ATEWRF1
Write the RF register 1.
Value:
xxxxxxxx ;32-bit, hex
1.22 ATEWRF2
Write the RF register 2.
Value:
xxxxxxxx ;32-bit, hex
1.23 ATEWRF3
Write the RF register 3.
Value:
xxxxxxxx ;32-bit, hex
1.24 ATEWRF4
Write the RF register 4.
Value:
xxxxxxxx ;32-bit, hex
1.25 ATELDE2P
Overwrite all EEPROM contents
Value:
1
E.g.
iwpriv ra0 set ATELDE2P=1
1.26 ATERE2P
Display all EEPROM content.
Value:
1
E.g.
iwpriv ra0 set ATERE2P=1
===================================================================================================
2. Examples:
=========
2.1 Check EVM & Power
iwpriv ra0 set ATE=ATESTART
iwpriv ra0 set ATEDA=00:11:22:33:44:55
iwpriv ra0 set ATESA=00:aa:bb:cc:dd:ee
iwpriv ra0 set ATEBSSID=00:11:22:33:44:55
iwpriv ra0 set ATECHANNEL=1 ; set Channel
iwpriv ra0 set ATETXMODE=1 ; set TX-Mode.
iwpriv ra0 set ATETXMCS=7 ; set MCS type.
iwpriv ra0 set ATETXBW=0 ; set Bandwidth
iwpriv ra0 set ATETXGI=0 ; set Long GI.
iwpriv ra0 set ATETXLEN=1024 ; set packet length.
iwpriv ra0 set ATETXPOW0=18
iwpriv ra0 set ATETXPOW1=18
iwpriv ra0 set ATETXCNT=100000
iwpriv ra0 set ATE=TXFRAME
¡K
iwpriv ra0 set ATETXPOW0=19
¡K
iwpriv ra0 set ATETXPOW0=20
¡K
iwpriv ra0 set ATE=ATESTART
2.2 Check Carrier
iwpriv ra0 set ATE=ATESTART
iwpriv ra0 set ATECHANNEL=1 ; set Channel
iwpriv ra0 set ATETXMODE=1 ; set TX-Mode.
iwpriv ra0 set ATETXMCS=7 ; set MCS type.
iwpriv ra0 set ATETXBW=0 ; set Bandwidth
iwpriv ra0 set ATETXCNT=200 ; Tx frame count(decmial)
iwpriv ra0 set ATE=TXFRAME ; Start Tx Frame(inform BBP to change, modulation mode)
iwpriv ra0 set ATE=TXCARR ; Start Tx carrier, Measure carrier with instrument
iwpriv ra0 set ATETXPOW0=05
iwpriv ra0 set ATETXPOW1=05
iwpriv ra0 set ATETXFREQOFFSET=19
iwpriv ra0 set ATE=ATESTART
2.3 Check specturm mask
iwpriv ra0 set ATE=ATESTART
iwpriv ra0 set ATECHANNEL=1 ; set Channel
iwpriv ra0 set ATETXMODE=1 ; set TX-Mode.
iwpriv ra0 set ATETXMCS=7 ; set MCS type.
iwpriv ra0 set ATETXBW=0 ; set Bandwidth
iwpriv ra0 set ATETXCNT=200 ; Tx frame count(decmial)
iwpriv ra0 set ATE=TXFRAME ; Start Tx Frame(inform BBP to change, modulation mode)
iwpriv ra0 set ATE=TXCONT ; Start continuous TX, Measure specturm mask with instrument
iwpriv ra0 set ATETXPOW0=5
iwpriv ra0 set ATETXPOW1=5
iwpriv ra0 set ATE=ATESTART
2.4 Frequency offset tuning
iwpriv ra0 set ATE=ATESTART
iwpriv ra0 set ATECHANNEL=1 ; set Channel
iwpriv ra0 set ATETXMODE=1 ; set TX-Mode.
iwpriv ra0 set ATETXMCS=7 ; set MCS type.
iwpriv ra0 set ATETXCNT=200 ; Tx frame count(decmial)
iwpriv ra0 set ATETXFREQOFFSET=0 ; Set frequency offset 0(decimal)
iwpriv ra0 set ATE=TXFRAME ; Start Tx Frame
iwpriv ra0 set ATE=TXCARR ; Start Tx carrier, Measure carrier frequency with instrument
iwpriv ra0 set ATETXFREQOFFSET=10 ; Dynamic turning frequency offset, 10(decimal)
iwpriv ra0 set ATETXFREQOFFSET=20 ; Dynamic turning frequency offset, 20(decimal)
iwpriv ra0 set ATE=ATESTART ; Stop, Store the tuning result to EEPROM
2.5 Rx
iwpriv ra0 set ATE=ATESTART
iwpriv ra0 set ATECHANNEL=1 ; set Channel
iwpriv ra0 set ResetCounter=1 ; Reset statistic counter
iwpriv ra0 set ATETXFREQOFFSET=value ;To use the ¡§value¡¨(decimal) you got in tx calibration
iwpriv ra0 set ATETXMODE=1 ; set TX-Mode.
iwpriv ra0 set ATETXMCS=7 ; set MCS type.
iwpriv ra0 set ATETXBW=0 ; set Bandwidth
iwpriv ra0 set ATE=RXFRAME ; Start Rx,
iwpriv ra0 set ATERXFER=1 ; show RxCnt and RSSI/per-antenna, Transmit test packets
iwpriv ra0 set ATE=ATESTART ; Stop
iwpriv ra0 stat ; get statistics counter
iwpriv ra0 set ATERXFER=1
iwpriv ra0 set ATERXANT=1
iwpriv ra0 set ATE=ATESTART
iwpriv ra0 set ATERXANT=0
iwpriv ra0 set ATE=RXFRAME
2.6 Show all ate parameters
iwpriv ra0 set ATESHOW=1
Mode=4
TxPower0=0
TxPower1=0
TxAntennaSel=0
RxAntennaSel=0
BBPCurrentBW=0
GI=0
MCS=7
TxMode=1
Addr1=00:11:22:aa:bb:cc
Addr2=00:11:22:aa:bb:cc
Addr3=00:11:22:aa:bb:cc
Channel=1
TxLength=1024
TxCount=40000
TxRate=11
RFFreqOffset=0
2.7 Online help
iwpriv ra0 set ATEHELP=1
ATE=ATESTART, ATESTOP, TXCONT, TXCARR, TXFRAME, RXFRAME
ATEDA
ATESA
ATEBSSID
ATECHANNEL, range:0~14(unless A band !).
ATETXPOW0, set power level of antenna 1.
ATETXPOW1, set power level of antenna 2.
ATETXANT, set TX antenna. 0: all, 1: antenna one, 2: antenna two.
ATERXANT, set RX antenna.0: all, 1: antenna one, 2: antenna two, 3: antenna three.
ATETXFREQOFFSET, set frequency offset, range 0~63.
ATETXBW, set BandWidth, 0:20MHz, 1:40MHz.
ATETXLEN, set Frame length, range 24~2312.
ATETXCNT, set how many frame going to transmit.
ATETXMCS, set MCS, reference to rate table.
ATETXMODE, set Mode 0: CCK, 1: OFDM, 2: HT-Mix, 3: GreenField, reference to rate table.
ATETXGI, set GI interval, 0: Long, 1: Short.
ATERXFER, 0: disable Rx Frame error rate. 1: enable Rx Frame error rate.
ATERRF, show all RF registers.
ATEWRF1, set RF1 register.
ATEWRF2, set RF2 register.
ATEWRF3, set RF3 register.
ATEWRF4, set RF4 register.
ATELDE2P, load EEPROM from .bin file.
ATERE2P, display all EEPROM content.
ATESHOW, display all parameters of ATE.
ATEHELP, online help.
2.8 Display Rx Packet Count and RSSI
iwpriv ra0 set ATERXANT=0 ==> Enable All Three Rx Antennas
iwpriv ra0 set ATERXFER=1 ==> Enable Rx Frame Error Rate: RxCnt/RxTotal
iwpriv ra0 set ATE=RXFRAME ==> Start Rx
MlmePeriodicExec: Rx packet cnt = 2/4
MlmePeriodicExec: Rx AvgRssi0=-88, AvgRssi1=-80, AvgRssi2=-91
MlmePeriodicExec: Rx packet cnt = 2/6
MlmePeriodicExec: Rx AvgRssi0=-86, AvgRssi1=-77, AvgRssi2=-89¡K
¡K
iwpriv ra0 set ATERXANT=1 ==> Enable Three Rx Antenna-1
iwpriv ra0 set ATERXFER=1 ==> Enable Rx Frame Error Rate: RxCnt/RxTotal
iwpriv ra0 set ATE=RXFRAME ==> Start Rx
MlmePeriodicExec: Rx packet cnt = 0/7
MlmePeriodicExec: Rx AvgRssi=-87
MlmePeriodicExec: Rx packet cnt = 7/14
MlmePeriodicExec: Rx AvgRssi=-90
¡K
¡K
===================================================================================================
3. Hardware Access
==================
=====================================
3.1 iwpriv ra0 bbp [parameters]=[Value]
Read/Write BBP registers by ID number.
BBPID
3.1.1 Read BBP register, BBPID only, no ¡§=¡¨ symbol.
BBPID:
0 ~ xx ; decimal, 8-bit
BBPID=Value
3.1.2 Write BBP register.
BBPID:
0 ~ xx ; decimal, 8-bit
Value:
00 ~FF ; hexdecimal, 8-bit
=====================================
3.2 iwpriv ra0 mac [parameters]=[val]
Read/Write MAC registers by offset.
MAC_OFFSET
3.2.1 Read MAC register, MAC_OFFSET only, no ¡§=¡¨ symbol.
MAC_OFFSET:
0000 ~ FFFF ; hexdecimal, 16-bit
MAC_OFFSET=Value
3.2.2 Write MAC register.
MAC_OFFSET:
0000 ~ FFFF ; hexdecimal, 16-bit
Value:
0000 ~FFFF ; hexdecimal, 32-bit
=====================================
3.3 iwpriv ra0 e2p [parameters]=[val]
Read/Write EEPROM content by address.
EEP_ADDR
3.3.1 Read EEPROM content, EEP_ADDR only, no ¡§=¡¨ symbol.
EEP_ADDR:
00 ~ FF ; hexdecimal, 16-bit alignment (0, 2, 4, 6, 8, A, C, ¡K)
EEP_ADDR=Value
3.3.2 Write EEPROM content.
EEP_ADDR:
00 ~ FF ; hexdecimal, 16-bit alignment (0, 2, 4, 6, 8, A, C, ¡K)
Value:
0000 ~FFFF ; hexdecimal, 16-bit
=====================================
3.4 Example
3.4.1 Hardware access
iwpriv ra0 bbp 0 # read BBP register 0
iwpriv ra0 bbp 0=12 # write BBP register 0 as 0x12
iwpriv ra0 mac 0 # read MAC register 0
iwpriv ra0 mac 0=1234abcd # write MAC register 0 as 0x1234abcd
iwpriv ra0 e2p 0 # read E2PROM 0
iwpriv ra0 e2p c=12ab # write E2PROM 0xc as 0x12ab
3.4.2 Statistic counter operation
iwpriv ra0 stat # read statistic counter
iwpriv ra0 set ResetCounter=0 # reset statistic counter
Suggestion:
1. To turn on ATE functionality, you have to add compile flag "RALINK_ATE" to Makefile
2. Before doing ATE testing, please stop AP function
3. If you want to test another ATE action, prefer to stop AP & ATE function
4. All ATE function settings will lose efficacy after reboot.
5. Before hardware register access, please reference hardware spec.
Note.
In ATE mode, the channel must set via "ATECHANNEL"
===================================================================================================
4. ated
=======
4.1 Introduction
The ated is an optional user space component for RT28xx Linux driver.
When Windows GUI starts, AP enters ATE mode (i.e.,ATESTART) immediately.
It behaves as a proxy between Windows GUI and RT28xx Linux driver when ATE process proceeds.
The ated will be killed automatically when Windows GUI is closed.
You can kill it manually, too(for example, type '$killall ated').
RT28xx linux driver will leave ATE mode either ated is killed or Windows GUI is closed.
4.2 Environment setup
1. Connect the platform you want to test directly with a Windows host by ether network line.
2. In the Windows host, run WinPcap_4_0.exe for the QA GUI or ./RT2880_ATE/RaUI.exe(please unrar "RT2880_ATE.rar" to get it).
4.3 How to use ated for ATE purpose
0. First you should set both "HAS_ATE=y" and "HAS_QA_SUPPORT=y" in the file ~/Module/os/linux/config.mk and compile the driver.
1. Modify the Makefile according to our target "PLATFORM".
2. Change the path of "CROSS_COMPILE" if needed.
3. Then type 'make' command to compile the source code of the daemon.
4. After the driver interface has started up, attach both of the wireless interface and the ethernet interface to the bridge interface.
5. If you have no bridge interface, please give an IP address to the ethernet interface.
(for example : '$ated -beth0')
6. After the interfaces have entered forwarding states, manually start ated, type '$ated -bbrX -iraX'.
7. If your WLAN interface and Bridge interface is "ra0" and "br0" respectively, just type $ated.
(For further usage of options, type $ated -h)
8. In the Windows host, run RT28xxQA_ATE.exe or ./RT2880_ATE/RaUI.exe.
9. Select the wired network adapter, then press OK and wait for a moment.
10.If the Windows host cannot tolerate such a broadcast storm from ated,
please run ated with option -u.(for example : '$ated -ira1 -u')
11.If your target platform concerns its network security, please run RT28xxQA_unicast.exe instead of RT28xxQA_ATE.exe.
Note :
a. The names of WLAN interface(default is "ra0") and Bridge interface(default is "br0") must be specified manually(for example : '$ated -bbr1 -ira2') if your WLAN interface or Bridge interface is not "ra0" or "br0" respectively !
b. Please make sure no other RaUI is running before you excute ./RT2880_ATE/RaUI.exe.