Difference between revisions of "Rt2x00 beta driver"

From ArchWiki
Jump to: navigation, search
(initial howto commit, have fun)
 
(38 intermediate revisions by 18 users not shown)
Line 1: Line 1:
This page describes how you can make the new '''rt2x00''' Beta drivers work. This page '''does not''' describe the legacy '''rt2500''', '''rt2400''' and '''rt2570''' drivers derived from the original Ralink drivers.
+
[[Category:Wireless Networking]]
  
At the time of this writing, only the '''rt2560''' PCI and PcCard chipsets ('''rt2500pci''' driver) are known to work in Open, WEP or WPA (PSK and EAP) mode. So far, there are no success stories with '''rt2400pci''', '''rt2500usb''' and '''rt61pci''' drivers. If you succeed in using these drivers, please add a comment here.
+
This page describes how you can make the new '''rt2x00''' drivers work. This page '''does not''' describe the legacy '''rt2500''', '''rt2400''', '''rt2570''', '''rt61''' and '''rt73''' drivers derived from the original Ralink drivers. The '''rt2x00''' driver has a few advantages over the legacy drivers: It works with all the standard tools, it is in active development as part of the kernel, and it is SMP-safe.
  
The '''rt2x00''' drivers are supposed to work with SMP kernels, but I did not test this myself. Please add comments here if you were able to use the driver with an SMP kernel.
+
A lot has changed since these drivers were out-of-tree, so it's worth trying the modules (now in the main kernel package) even if the drivers have not worked for you in the past.
  
= Installing necessary tools =
+
For help with these drivers see the [http://rt2x00.serialmonkey.com/phpBB/viewforum.php?f=5 rt2x00 Driver Support] section of the rt2x00 forums.
  
== ieee80211-utils ==
 
 
The rt2x00 drivers are based on the new '''DeviceScape ieee80211''' stack. The stack itself is compiled and installed along with the driver. But there are some tools required to make the devices work. These are in the '''ieee80211-utils''' package.
 
 
I submitted an [http://aur.archlinux.org/packages.php?do_Details=1&ID=3672 AUR package] and uploaded a [http://www-users.rwth-aachen.de/thomas.baechler/arch/brain0/os/i686/ieee80211-utils-051219-1.pkg.tar.gz binary package] to my repo:
 
 
<nowiki>
 
[brain0]
 
Server = http://www-users.rwth-aachen.de/thomas.baechler/arch/brain0/os/i686</nowiki>
 
 
Note that the DeviceScape stack is still in development and both these tools and the necessary steps to activate the devices are likely to change in the future.
 
 
== wpa_supplicant ==
 
 
DeviceScape has its own '''dscape''' driver for wpa_supplicant. There are reports that wpa_supplicant also works with the '''wext''' driver, but I didn't test this. If you want to try the '''wext''' driver, you can use the '''wpa_supplicant''' package from the repos.
 
 
To use the '''dscape''' driver, you need to apply [http://kernel.org/pub/linux/kernel/people/jbenc/ieee80211-utils/wpa_supplicant/wpa_supplicant-0.4.7_dscape-02.patch this patch] to wpa_supplicant. You can also use the [http://www-users.rwth-aachen.de/thomas.baechler/arch/brain0/os/i686/wpa_supplicant-dscape-0.4.7-1.pkg.tar.gz wpa_supplicant-dscape package] from my repo.
 
  
 
= Installing the driver =
 
= Installing the driver =
  
The '''rt2x00 Beta 3''' (as posted in the AUR) and older version are known to '''NOT WORK'''. In order to have a working driver, you '''MUST''' use the new rewrite based on the DeviceScape stack. This new driver is (at the time of this writing) only available as a [http://rt2x00.serialmonkey.com/rt2x00-cvs-daily.tar.gz CVS snapshot]. To install the driver, unpack the driver, change to the '''rt2x00-cvs-2006XXXXXX''' directory and type
+
The rt2x00 drivers are now part of the mainline kernel. One need only load the relevant module:
 
+
<pre>modprobe rt2400pci</pre>
make
+
<pre>modprobe rt2500pci</pre>
make install
+
<pre>modprobe rt2500usb</pre>
 
+
<pre>modprobe rt61pci</pre>
// TODO: Create an updated PKGBUILD for the cvs snapshot
+
<pre>modprobe rt73usb</pre>
 +
The last two require a firmware file, provided by the Linux firmwares package:
 +
<pre>pacman -S linux-firmware</pre>
  
 
= Using the driver =
 
= Using the driver =
Line 41: Line 26:
  
 
  modprobe 80211
 
  modprobe 80211
  modprobe rate_control
+
  modprobe rc80211_simple
 
  modprobe $driver
 
  modprobe $driver
  
 
where $driver is one of the following: '''rt2500pci''', '''rt2400pci''', '''rt2500usb''' or '''rt61pci'''.
 
where $driver is one of the following: '''rt2500pci''', '''rt2400pci''', '''rt2500usb''' or '''rt61pci'''.
  
When the driver is loaded, you will have three new interfaces: '''wlan0''', '''wlan0.11''' and '''wlan0ap'''. These are virtual interfaces, that cannot be used directly. The command
+
When the driver is loaded, you will have two interfaces, wmaster0 and wlan0.
  
/usr/sbin/sta_up.sh wlan0
+
== Using the driver ==
  
will create a new device '''sta0'''. If you don't like the name '''sta0''', do
+
In the case of these drivers, the order in which you configure them is important. This is the preferred, and most likely to work order of configuring the device.
  
  /usr/sbin/sta_up.sh wlan0 mywlan
+
  ifconfig wlan0 up
 +
iwlist wlan0 scan
 +
iwconfig wlan0 essid myessid
 +
iwconfig wlan0 ap mybssid
  
to get a new device '''mywlan''' or whatever pleases you.
+
To obtain an ip address after setup use '''ifconfig''' or '''dhcpcd'''  and wep or wpa if needed.
  
Now you can use normal '''iwconfig''' statements to configure your wlan interface and run '''ifconfig''' or '''dhcpcd''' to use the interface.
+
dhcpcd wlan0
 +
 
 +
= Extra utils for wep/wpa =
 +
 
 +
== wpa_supplicant ==
 +
 
 +
rt2x00 should work fine with the wpa_supplicant '''wext''' driver. It is not necessary to patch it any more.
  
 
== Using wpa_supplicant ==
 
== Using wpa_supplicant ==
Line 62: Line 56:
 
For example, to use wpa_supplicant, try
 
For example, to use wpa_supplicant, try
  
  /usr/sbin/wpa_supplicant -wB -Ddscape -ista0 -c/etc/wpa_supplicant.conf
+
  /usr/sbin/wpa_supplicant -wB -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
  
Replace '''-Ddscape''' with '''-Dwext''' if you have chosen to use the stock arch wpa_supplicant package. Note that wpa_supplicant didn't work with hidden essid in my tests.
+
Note that wpa_supplicant didn't work with hidden essid in my tests.
  
 
// TODO: someone please confirm that wpa_supplicant also successfully associates to open or wep-encrypted networks, I only tried WPA-PSK and read success reports about WPA-EAP
 
// TODO: someone please confirm that wpa_supplicant also successfully associates to open or wep-encrypted networks, I only tried WPA-PSK and read success reports about WPA-EAP
Line 70: Line 64:
 
== Using WEP ==
 
== Using WEP ==
  
To enable WEP, use the following command:
+
WEP works with the wireless extensions used by iwconfig. See [[Wireless Setup#Wireless Quickstart]].
 +
<!-- confirmed works with rt73usb -->
 +
 
 +
= Configuring the driver for automatic startup on booting =
  
dscape_crypt_conf -1tp "sta0" "ff:ff:ff:ff:ff:ff" WEP "$key"
+
== RT2400 (rt2400pci) ==
 +
The following is known to work for the cvs snapshot available [http://rt2x00.serialmonkey.com/wiki/index.php?title=Downloads here] with the date 23-Dec-2006.
  
where '''sta0''' is your wlan-interface and '''$key''' is the wep key. See
+
To set the driver up for automatically connecting while the computer is booting, type the following in /etc/rc.conf
  
  dscape_crypt_conf --help
+
  wlan0="wlan0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255"
 +
INTERFACES=(lo !eth0 wlan0)
  
for further help.
+
And the following in /etc/rc.local
  
// TODO: Some please confirm that this works
+
iwconfig wlan0 channel 10
 +
iwconfig wlan0 essid linksys
 +
iwconfig wlan0 ap 00:0c:41:a8:87:8e <-- Put your access point's bssid here

Revision as of 09:40, 13 June 2012


This page describes how you can make the new rt2x00 drivers work. This page does not describe the legacy rt2500, rt2400, rt2570, rt61 and rt73 drivers derived from the original Ralink drivers. The rt2x00 driver has a few advantages over the legacy drivers: It works with all the standard tools, it is in active development as part of the kernel, and it is SMP-safe.

A lot has changed since these drivers were out-of-tree, so it's worth trying the modules (now in the main kernel package) even if the drivers have not worked for you in the past.

For help with these drivers see the rt2x00 Driver Support section of the rt2x00 forums.


Installing the driver

The rt2x00 drivers are now part of the mainline kernel. One need only load the relevant module:

modprobe rt2400pci
modprobe rt2500pci
modprobe rt2500usb
modprobe rt61pci
modprobe rt73usb

The last two require a firmware file, provided by the Linux firmwares package:

pacman -S linux-firmware

Using the driver

Setting the interface up

If you have module autoloading enabled, the drivers should be loaded automatically when you boot your machine or insert the device. If this doesn't work or autoloading is disabled, load the modules manually:

modprobe 80211
modprobe rc80211_simple
modprobe $driver

where $driver is one of the following: rt2500pci, rt2400pci, rt2500usb or rt61pci.

When the driver is loaded, you will have two interfaces, wmaster0 and wlan0.

Using the driver

In the case of these drivers, the order in which you configure them is important. This is the preferred, and most likely to work order of configuring the device.

ifconfig wlan0 up
iwlist wlan0 scan
iwconfig wlan0 essid myessid
iwconfig wlan0 ap mybssid 

To obtain an ip address after setup use ifconfig or dhcpcd and wep or wpa if needed.

dhcpcd wlan0

Extra utils for wep/wpa

wpa_supplicant

rt2x00 should work fine with the wpa_supplicant wext driver. It is not necessary to patch it any more.

Using wpa_supplicant

For example, to use wpa_supplicant, try

/usr/sbin/wpa_supplicant -wB -Dwext -iwlan0 -c/etc/wpa_supplicant.conf

Note that wpa_supplicant didn't work with hidden essid in my tests.

// TODO: someone please confirm that wpa_supplicant also successfully associates to open or wep-encrypted networks, I only tried WPA-PSK and read success reports about WPA-EAP

Using WEP

WEP works with the wireless extensions used by iwconfig. See Wireless Setup#Wireless Quickstart.

Configuring the driver for automatic startup on booting

RT2400 (rt2400pci)

The following is known to work for the cvs snapshot available here with the date 23-Dec-2006.

To set the driver up for automatically connecting while the computer is booting, type the following in /etc/rc.conf

wlan0="wlan0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(lo !eth0 wlan0)

And the following in /etc/rc.local

iwconfig wlan0 channel 10
iwconfig wlan0 essid linksys
iwconfig wlan0 ap 00:0c:41:a8:87:8e <-- Put your access point's bssid here