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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
|
.\" Copyright (c) 1997, 1998, 1999
.\" Bill Paul <wpaul@ctr.columbia.edu> All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Bill Paul.
.\" 4. Neither the name of the author nor the names of any co-contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
.\" THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd October 12, 2006
.Dt WICONTROL 8
.Os
.Sh NAME
.Nm wicontrol
.Nd "configure Lucent, Intersil, and Atheros wireless devices"
.Sh SYNOPSIS
.Nm
.Op Oo Fl i Oc Ar iface
.Nm
.Op Oo Fl i Oc Ar iface
.Fl o
.Nm
.Op Oo Fl i Oc Ar iface
.Fl l
(dump associated stations)
.Nm
.Op Oo Fl i Oc Ar iface
.Fl L
(list available access points)
.Nm
.Op Oo Fl i Oc Ar iface
.Fl t Ar tx_rate
.Nm
.Op Oo Fl i Oc Ar iface
.Fl n Ar network_name
.Nm
.Op Oo Fl i Oc Ar iface
.Fl s Ar station_name
.Nm
.Op Oo Fl i Oc Ar iface
.Fl c Cm 0 | 1
.Nm
.Op Oo Fl i Oc Ar iface
.Fl q Ar SSID
.Nm
.Op Oo Fl i Oc Ar iface
.Fl p Ar port_type
.Nm
.Op Oo Fl i Oc Ar iface
.Fl a Ar access_point_density
.Nm
.Op Oo Fl i Oc Ar iface
.Fl m Ar mac_address
.Nm
.Op Oo Fl i Oc Ar iface
.Fl d Ar max_data_length
.Nm
.Op Oo Fl i Oc Ar iface
.Fl e Cm 0 | 1
.Nm
.Op Oo Fl i Oc Ar iface
.Fl k Ar key
.Op Fl v Cm 1 | 2 | 3 | 4
.Nm
.Op Oo Fl i Oc Ar iface
.Fl r Ar RTS_threshold
.Nm
.Op Oo Fl i Oc Ar iface
.Fl f Ar frequency
.Nm
.Op Oo Fl i Oc Ar iface
.Fl F Cm 0 | 1
.Nm
.Op Oo Fl i Oc Ar iface
.Fl P Cm 0 | 1
.Nm
.Op Oo Fl i Oc Ar iface
.Fl S Ar max_sleep_duration
.Nm
.Op Oo Fl i Oc Ar iface
.Fl T Cm 1 | 2 | 3 | 4
.Nm
.Op Oo Fl i Oc Ar iface
.Fl Z
(zero signal cache)
.Nm
.Op Oo Fl i Oc Ar iface
.Fl C
(display signal cache)
.Sh DESCRIPTION
The
.Nm
utility controls the operation of Lucent, Intersil, and Atheros-based wireless
networking devices via
.Xr wi 4
or
.Xr ath 4
driver.
.Pp
You should not use this program to configure IEEE 802.11 parameters.
Use
.Xr ifconfig 8
instead to do those tasks (i.e., set SSID, WEP key, etc.).
.Pp
The
.Nm
utility can also be used to view the current settings of these parameters,
dump out the values of the card's statistics counters, list associated
stations (in HostAP mode), and scan for available access points.
.Pp
The
.Ar iface
argument given to
.Nm
should be the logical interface name associated with the Lucent, Intersil,
and Atheros device
.Li ( wi0 , wi1 , ath0 ,
etc.).
If none is specified then
.Dq Li wi0
is used as default.
.Sh OPTIONS
In the first synopsis form,
.Nm
displays the current settings of the specified wireless interface.
It retrieves the current card settings from the driver and prints them
out.
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl o
Print out the statistics counters instead of the card settings.
Encryption keys are only displayed if
.Nm
is run as root.
.It Fl a Ar access_point_density
Specify the
access point density
for a given interface.
Legal values are
.Cm 1
(low),
.Cm 2
(medium) and
.Cm 3
(high).
This setting influences some of the radio modem threshold settings.
.It Fl m Ar mac_address
Set the station address for the specified interface.
The
.Ar mac_address
is specified as a series of six hexadecimal values separated by colons,
e.g.,
.Dq Li 00:60:1d:12:34:56 .
This programs the new address into the card
and updates the interface as well.
.It Fl d Ar max_data_length
Set the maximum receive and transmit frame size for a specified interface.
The
.Ar max_data_length
can be any number from 350 to 2304.
The default is 2304.
.It Fl r Ar RTS_threshold
Set the RTS/CTS threshold for a given interface.
This controls the
number of bytes used for the RTS/CTS handshake boundary.
The
.Ar RTS_threshold
can be any value between 0 and 2347.
The default is 2347.
.It Fl Z
Clear the signal strength cache maintained internally by the
.Xr wi 4
driver.
.It Fl C
Display the cached signal strength information maintained by the
.Xr wi 4
driver.
The driver retains information about signal strength and
noise level for packets received from different hosts.
The signal
strength and noise level values are displayed in units of dBms.
The signal quality value is produced by subtracting the noise level
from the signal strength (i.e., less noise and better signal yields
better signal quality).
.El
.Sh DEPRECATED AND OBSOLETE OPTIONS
The
.Nm
utility has a number of options that are now deprecated or obsolete, as they
have been overtaken by extensions to
.Xr ifconfig 8
and changes to the driver.
The deprecated and obsolete options are as follows:
.Bl -tag -width indent
.It Fl t Ar tx_rate
This flag is deprecated.
Use
.Xr ifconfig 8
.Cm mediaopt
instead.
.Pp
Set the transmit rate of the specified interface.
The legal values
for the transmit rate vary depending on whether the interface is a
standard WaveLAN/IEEE or a WaveLAN/IEEE Turbo adapter.
The standard
NICs support a maximum transmit rate of 2Mbps while the turbo NICs
support a maximum speed of 6Mbps.
The following table shows the
legal transmit rate settings and the corresponding transmit speeds:
.Bl -column ".Em TX\ rate" ".Em NIC\ speed" -offset indent
.Em "TX rate NIC speed"
.It Cm 1 Ta "Fixed Low (1Mbps)"
.It Cm 2 Ta "Fixed Standard (2Mbps)"
.It Cm 3 Ta "Auto Rate Select (High)"
.It Cm 4 Ta "Fixed Medium (4Mbps)"
.It Cm 5 Ta "Fixed High (6Mbps)"
.It Cm 6 Ta "Auto Rate Select (Standard)"
.It Cm 7 Ta "Auto Rate Select (Medium)"
.El
.Pp
The default driver setting is
.Cm 3
(auto rate select).
The numbers vary from card to card.
.It Fl n Ar network_name
This flag is deprecated.
Use
.Xr ifconfig 8
.Cm ssid
or
.Cm nwid
instead.
.Pp
Set the name of the service set (IBSS) that this station wishes to
join.
The
.Ar network_name
can be any text string up to 30 characters in length.
The default name
is the string
.Dq Li ANY
which should allow the station to connect to the first
available access point.
The interface should be set for BSS mode using
the
.Fl p
flag in order for this to work.
.Pp
Note: the WaveLAN manual indicates that an empty string will allow the
host to connect to any access point, however I have also seen a reference
in another driver which indicates that the
.Dq Li ANY
string works as well.
.It Fl s Ar station_name
This flag is deprecated.
Use
.Xr ifconfig 8
.Cm stationname
or
.Cm station
instead.
.Pp
Sets the
station name
for the specified interface.
The
.Ar station_name
is used for diagnostic purposes.
The
.Tn "Lucent WaveMANAGER"
software can
poll the names of remote hosts.
.It Fl c Cm 0 | 1
This flag is deprecated.
IBSS networks are automatically created on those cards whose firmware
supports it while in IBSS mode.
.Pp
Allow the station to create a service set (IBSS).
Permitted values are
.Cm 0
(do not create IBSS) and
.Cm 1
(enable creation of IBSS).
The default is
.Cm 0 .
.Pp
Only newer versions of the Lucent firmware support this.
.It Fl q Ar SSID
This flag is deprecated.
The
.Cm ssid
setting from
.Xr ifconfig 8
is the current preferred way of setting this parameter.
.Pp
Specify the name of an IBSS (SSID) to create on a given interface.
The
.Ar SSID
can be any text string up to 30 characters long.
.Pp
Note: this option is provided for experimental purposes only: enabling
the creation of an IBSS on a host system does not appear to actually work.
.It Fl p Ar port_type
This flag is deprecated.
It should never be used.
Do not use this flag.
Its meaning depends on the type of card you are using, as well as the
firmware you have installed in the card in some cases.
Beware.
Danger.
Do not use.
Instead, use the
.Xr ifconfig 8
.Cm media
and
.Cm mediaopt
commands.
.Pp
Set the
port type
for a specified interface.
The legal values for
.Ar port_type
are
.Cm 1
(BSS mode) and
.Cm 3
(ad-hoc) mode.
In ad-hoc mode, the station can
communicate directly with any other stations within direct radio range
(provided that they are also operating in ad-hoc mode).
In BSS mode,
hosts must associate with a service set controlled by an access point,
which relays traffic between end stations.
The default setting is
.Cm 1
(BSS mode).
Lucent cards have one set of meanings.
Prism cards have another.
Symbol cards have a third.
Do not use this flag.
.It Fl e Cm 0 | 1
This flag is deprecated.
It has been replaced by the
.Xr ifconfig 8
.Cm wepmode
option.
.Pp
Enable or disable WEP encryption.
Permitted values are
.Cm 0
(encryption disabled) or
.Cm 1
(encryption enabled).
Encryption is off by default.
.Pp
Both 128-bit and 64-bit WEP have been broken.
See the
.Sx BUGS
section for details.
.It Fl k Ar key Op Fl v Cm 1 | 2 | 3 | 4
This flag is obsolete.
The
.Xr ifconfig 8
.Cm wepkey
should be used instead.
.Pp
Set WEP encryption keys.
There are four default encryption keys
that can be programmed.
A specific key can be set using
the
.Fl v
flag.
If the
.Fl v
flag is not specified, the first key will be set.
Encryption keys
can either be normal text (i.e.,
.Dq Li hello )
or a series of hexadecimal digits (i.e.,
.Dq Li 0x1234512345 ) .
For
WaveLAN Turbo Silver cards, the key is restricted to 40 bits, hence
the key can be either a 5 character text string or 10 hex digits.
For WaveLAN Turbo Gold cards, the key can also be 104 bits,
which means the key can be specified as either a 13 character text
string or 26 hex digits in addition to the formats supported by the
Silver cards.
.Pp
For maximum portability, hex keys are recommended;
the mapping of text keys to WEP encryption is usually driver-specific.
In particular, the
.Tn Windows
drivers do this mapping differently to
.Fx .
.Pp
Note: Both 128-bit and 64-bit WEP encryption have been broken.
See the
.Sx BUGS
section for details.
.It Fl T Cm 1 | 2 | 3 | 4
This flag is obsolete.
The
.Xr ifconfig 8
.Cm weptxkey
should be used instead.
.Pp
Specify which of the four WEP encryption keys will be used to
encrypt transmitted packets.
.Pp
Note: Both 128-bit and 64-bit WEP have been broken.
See the
.Sx BUGS
section for details.
.It Fl f Ar frequency
This flag is deprecated.
Use
.Xr ifconfig 8
.Cm channel
instead.
.Pp
Set the radio frequency of a given interface.
The
.Ar frequency
should be specified as a channel ID as shown in the table below.
The
list of available frequencies is dependent on radio regulations specified
by regional authorities.
Recognized regulatory authorities include
the FCC (United States), ETSI (Europe), France and Japan.
Frequencies
in the table are specified in MHz.
.Bl -column ".Em Channel\ ID" ".Em FCC" ".Em ETSI" ".Em France" ".Em Japan" -offset indent
.Em "Channel ID FCC ETSI France Japan"
.It Cm 1 Ta "2412 2412 - 2412"
.It Cm 2 Ta "2417 2417 - 2417"
.It Cm 3 Ta "2422 2422 - 2422"
.It Cm 4 Ta "2427 2427 - 2427"
.It Cm 5 Ta "2432 2432 - 2432"
.It Cm 6 Ta "2437 2437 - 2437"
.It Cm 7 Ta "2442 2442 - 2442"
.It Cm 8 Ta "2447 2447 - 2447"
.It Cm 9 Ta "2452 2452 - 2452"
.It Cm 10 Ta "2457 2457 2457 2457"
.It Cm 11 Ta "2462 2462 2462 2462"
.It Cm 12 Ta "- 2467 2467 2467"
.It Cm 13 Ta "- 2472 2472 2472"
.It Cm 14 Ta "- - - 2484"
.El
.Pp
If an illegal channel is specified, the
NIC will revert to its default channel.
For NICs sold in the United States
and Europe, the default channel is
.Cm 3 .
For NICs sold in France, the default channel is
.Cm 11 .
For NICs sold in Japan, the default channel is
.Cm 14 ,
and it is the only available channel for pre-11Mbps NICs.
Note that two stations must be set to the same channel in order to
communicate.
.It Fl P Cm 0 | 1
This flag is obsolete.
The
.Xr ifconfig 8
.Cm powersave
should be used instead.
.Pp
Enable or disable power management on a given interface.
Enabling
power management uses an alternating sleep/wake protocol to help
conserve power on mobile stations, at the cost of some increased
receive latency.
Power management is off by default.
Note that power
management requires the cooperation of an access point in order to
function; it is not functional in ad-hoc mode.
Also, power management
is only implemented in Lucent WavePOINT firmware version 2.03 or
later, and in WaveLAN PCMCIA adapter firmware 2.00 or later.
Older
revisions will silently ignore the power management setting.
Legal
values for this parameter are
.Cm 0
(off) and
.Cm 1
(on).
.It Fl S Ar max_sleep_interval
This flag is obsolete.
The
.Xr ifconfig 8
.Cm powersavesleep
should be used instead.
.Pp
Specify the sleep interval to use when power management is enabled.
The
.Ar max_sleep_interval
is specified in milliseconds.
The default is 100.
.El
.Sh SEE ALSO
.Xr ath 4 ,
.Xr awi 4 ,
.Xr ipsec 4 ,
.Xr wi 4 ,
.Xr ifconfig 8
.Sh HISTORY
The
.Nm
utility first appeared in
.Fx 3.0 .
.Sh AUTHORS
The
.Nm
utility was written by
.An Bill Paul Aq wpaul@ctr.columbia.edu .
.Sh BUGS
There are deprecated flags here that duplicate functionality of
.Xr ifconfig 8 .
These flags were deprecated in
.Fx 5.1
and will be removed in a future release.
.Pp
The WEP encryption method has been broken so that third parties
can recover the keys in use relatively quickly at distances that are
surprising to most people.
Do not rely on WEP for anything but the most basic, remedial security.
IPSEC will give you a higher level of security and should be used
whenever possible.
Do not trust access points or wireless machines that connect through
them as they can provide no assurance that the traffic is legitimate.
MAC addresses can easily be forged and should therefore not be used as
the only access control.
.Pp
The attack on WEP is a passive attack, requiring only the ability to
sniff packets on the network.
The passive attack can be launched at a distance larger, up to many
miles, than one might otherwise expect given a specialized antenna
used in point to point applications.
The attacker can recover the keys from a 128-bit WEP network with only
5,000,000 to 6,000,000 packets.
While this may sound like a large number of packets, empirical
evidence suggests that this amount of traffic is generated in a few
hours on a partially loaded network.
Once a key has been compromised, the only remedial action is to
discontinue it and use a new key.
.Pp
See
.Pa http://www.cs.rice.edu/~astubble/wep/wep_attack.html
for details of the attack.
Many programs to assist in cracking WEP keys are widely available.
.Pp
If you must use WEP, you are strongly encouraged to pick keys whose
bytes are random and not confined to
.Tn ASCII
characters.
Brute force attacks on WEP keys are also possible.
Experience has showns that
.Tn ASCII
keys can be cracked in less than a day.
Even random bytes can be cracked in less than two weeks.
.Pp
Signal cache is broken right now.
|