summaryrefslogtreecommitdiff
path: root/README
blob: ce4a717691de21109287416713c7ea2b48d72a1a (plain)
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
at76_usb - Linux Driver for Atmel Based USB WLAN Adapters
=========================================================

This is a Linux driver for the Atmel based USB WLAN adapters.  Unlike
the driver developed by Atmel (atmelwlandriver), this driver is intended
to be accepted into the kernel, so it aims to be bloat-free, streamlined
and modern.

The authors of this driver are not associated with Atmel or any
corporation that builds devices with this chip.  The only information
source about the hardware is the Atmel's driver from
http://atmelwlandriver.sourceforge.net/

Look at http://at76c503a.berlios.de/ for more accurate information,
mailing lists and links.


Hardware Compatibility
----------------------

This driver supports USB devices using at76c503, at76c505 and at76c505a
chipsets.  Known devices with this chip are:

- Belkin F5D6050
- Dynalink/Askey WLL013
- Linksys WUSB11 v2.6
- Netgear MA101B

and many more.


Requirements
------------

Linux kernel 2.6.x (preferably current) with support for USB and
wireless networking.


Installation
------------

To compile the driver, just run "make".  The build system defaults to
compiling the driver against the sources of the currently running
kernel.  If you want to compile for a different kernel, you may need to
specify KERNEL_PATH on the command line.

If the kernel was compiled in a separate directory, KERNEL_PATH should
point to that directory, not to the source tree.  The driver itself will
always compile in its source directory.

When cross-compiling, you may also need to set ARCH and CROSS_COMPILE
appropriately.  See the top-level kernel Makefile for details.

To install the driver, run "make install" as root.  If you supplied some
extra variables to "make", add them to "make install" as well.

You also need to install the firmware for the device.  Please see the
download area for the latest firmware package:

https://developer.berlios.de/project/showfiles.php?group_id=727


Running
-------

Plug in the adapter.  If you already used it under Windows or with the
driver from atmelwlandriver.sourceforge.net, re-plug the device (i.e.
plug out and in again).

If you have hotplug or udev installed, the driver should now be loaded. 
If not, load it by hand:

  modprobe at76_usb

You can give the network device another name than wlanX by giving
the module the netdev_name parameter, e.g.

  modprobe at76_usb netdev_name=eth%d

would give the first device the name eth0, the second eth1 and so on. 
You can use "modinfo at76_usb" to see the complete list of the supported
parameters with descriptions.

Use lsmod to check if the module is loaded.  It should look like this:

  Module                  Size  Used by
  at76_usb               99432  0 

Setup networking (replace <iface> with wlan0, wlan1, ..., <ch> with a
channel number (1..14) <essid> with your network id (a string), <ip>
with an IP address)

  iwconfig <iface> channel <ch> mode ad-hoc essid <essid>
  ifconfig <iface> <ip>

Example:

  iwconfig wlan2 mode ad-hoc channel 10 essid okuwlan
  ifconfig wlan2 192.168.0.4

Test it by pinging another host with a WLAN adapter.

Note that the firmware survives reboots of the computer, but not
unplugging the device.

If you get problems, run dmesg to see if there are error messages it
will also show the firmware version.


Power Save Modes in Infrastructure Mode
---------------------------------------

You can activate 802.11 power save mode by executing

    iwconfig wlanX power on period N

The default period value is 0 and the smallest possible period of power
save (listen interval) is two beacon intervals.  This should lower power
consumption, but decrease data throughput and increase delays.

There is an Atmel specific power save mode called "smart power save"
which switches the device into active state (by a NULL packet to the AP)
as soon as there are pending packets at the AP for the STA and put it
back into doze state after the next beacon.  This saves the need for
sending PS_POLL packets.

It can only be activated by

  iwpriv wlanX powersave_mode 3

I don't know if the listen_interval is used in this mode.  If yes, you
can only set it earlier by iwconfig, e.g.

   iwconfig wlanX power on period N
   iwpriv wlanX powersave_mode 3


Private Parameters
------------------

In addition to the parameters of iwconfig, some can be set by iwpriv:

- long preamble: iwpriv wlanX short_preamble 0
- short preamble: iwpriv wlanX short_preamble 1
- amount of debug messages: iwpriv wlanX set_debug N
  with N a combination of bits, see DBG_* in at76c503.c
- power save mode: iwpriv wlanX powersave_mode N (numbers 1, 2, 3 for
  for none, save and smart save respectively)
- scan channel time: iwpriv wlanX scan_times <min_ch_time> <max_ch_time>
  (this may be required for 0.90.x firmware, i.e. Intersil radios)

Beware that shared key authentication requires a WEP key.


Known Problems
--------------

1) Bugs of the firmware 0.90.0-44 (the latest available for device with
  Intersil radio after Atmel stopped support for Intersil radio
  chipsets):

  - active scan doesn't send ProbeReq neither in ad-hoc or in
    infrastructure (managed) mode

    * If your ad-hoc peer sends the beacon in longer intervals,
      the Atmel driver may not find it. Try to increase the max
      channel time to 500 or 1000 (default 120) by calling
              iwpriv wlanX scan_times 10 <max channel time>
      If you found a working value, add the module parameter
      scan_max_time to /etc/modules.conf .

    * You cannot connect to an access point which hides its SSID and
      requires the STA to probe it!

  - After joining an existing IBSS of a 2MBit card, the basic rates are
    wrong in the beacon, e.g.
    a 2 MBit card broadcasts a basic rate set of 1 + 2 MBit/s,
    but the Atmel device sends out basic rates of 1,2,5.5 and 11 MBit/s
    Subsequently it cannot connect to the 2 MBit card, because it sends
    it's data packets to broadcast addresses with 11 MBit/s.

  - power saving modes does not work

2) firmware 1.101.0-84
  - if a 2MBit card joins an IBSS (ad-hoc mode) initiated by the Atmel
    device (which currently broadcasts 1+2 MBit/s as the basic rates
    and 5.5 and 11 MBit/s as (additional) operational rates), the
    Atmel device sends out broadcast packets (e.g. ARP requests) with
    11 MBit/s. This may be fixed by changing the tx rate in iwconfig
    from "auto" (default) to 1M or 2M.
    I'm not sure if this is a firmware bug or a problem in the driver.
    

Credits
-------

Thanks to (in no particular order):

- the authors (Stavros et.al.) of the usbvnet driver
  (atmelwlandriver.sourceforge.net)
- Joerg Albert for lots of patches
- Brad Hards and Bas Vermeulen for the firmware code, which I ported to
  kernel space
- David Gibson, I used his orinoco driver for learning
- the author(s) of the usbnet driver
- the author(s) of the rtl8150 driver
- lots of other authors of USB and WLAN drivers, where I stole code from
- Pavel Roskin for testing, debugging and his patches
- Nick Jones for rewriting the iw_handler interface

Oliver Kurth, Mon,  6 Jan 2003 22:39:47 +0100
updated by Joerg Albert, Thu, 1 May 2003 and later