Difference between revisions of "RT73 Wireless"

From ArchWiki
Jump to: navigation, search
(Redirect rt2x00. It is the unified driver for Ralink chipsets (replaces rt2500, rt61, rt73, etc))
(18 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Communication and network (English)]]
#REDIRECT [[Wireless Setup#rt2x00]]
[[Category:HOWTOs (English)]]
This page describes how you can make the original Ralink '''RT73''' (aka '''RT2571''') drivers work. This page does not describe how to make the new from-scratch drivers written by the rt2x00 project. (For rt2x00, visit [[Using_the_new_rt2x00_beta_driver|rt2x00 wiki page]])
Several USB WiFi dongles use this chipset, including the Linksys WUSB54GC.
= Installing the driver =
While the README file for the RT73 driver is an excellent source of information, (and the basis for this howto), all that follows was successfully completed under Arch Linux and may vary a little from the README directions.
The Non-Roaming Setup section may be especially informative as it is more specific to the Arch way.
== Preparation ==
Download the Ralink RT73 source from here: http://www.ralinktech.com.tw/data/RT73_Linux_STA_Drv1.0.4.0.tar.gz
Unpack the driver and change directory:
tar xvf RT73_Linux_STA_Drv1.0.3.6.tar.gz
cd RT73_Linux_STA_Drv1.0.3.6
cd Module
We need to use the "Makefile.6" file that shipped with the tarball since we have a 2.6 kernel (2.4 uses Makefile.4):
cp Makefile.6 Makefile
The Ralink RT73 driver ships with several Device IDs already configured. First of all, check your Device ID using '''lsusb'''.
Edit the driver file containing Device IDs:
nano rtmp_def.h
At the very bottom of the file is a section titled '''VID/PID'''
Make sure your Device ID is listed, if it is not, add it in the same format as those listed somewhere before the end marker.
For example, the Linksys WUSB54GC has Device ID 0x13b1,0x0020.
The line in rtmp_def.h would look like this:
{USB_DEVICE(0x13b1,0x0020)}, /* Linksys WUSB54GC */      \
''Note:'' Replace 0x13b1 and 0x0020 with the Device ID for '''your''' WiFi dongle.
''Note:'' Make sure the line you add ends with a backslash '''\'''
== Building The Driver ==
=== Kernel 2.6.18 ===
After the build is finished, copy new module to kernel tree
cp rt73.ko /lib/modules/2.6.18-ARCH/kernel/drivers/net/wireless/
Install module:
insmod /lib/modules/2.6.18-ARCH/kernel/drivers/net/wireless/rt73.ko
Update modules.dep:
depmod -a
=== Kernel 2.6.19 and Above ===
Linux kernel 2.6.19 and above broke the Ralink (and the rt2x00) drivers.
The drivers won't compile without modifying the source (already done in rt2x00, but we must do it to the Ralink source ourselves). In addition, '''iwpriv''' must be used when manually setting up the connection.
'''Changes to rtmp_main.c:'''
This section occurs twice in the file
(one says >= 11, the other >= 12, change them both to >= 12):
#if WIRELESS_EXT >= 11
    netdev->get_wireless_stats = rt73_get_wireless_stats;
    netdev->wireless_handlers = (struct iw_handler_def *) &rt73_iw_handler_def;
Change both occurences to match this:
#if WIRELESS_EXT >= 12
    netdev->get_wireless_stats = rt73_get_wireless_stats;
    netdev->wireless_handlers = (struct iw_handler_def *) &rt73_iw_handler_def;
After the changes to '''rtmp_main.c''', the module should compile normally:
After the build is finished, copy new module to kernel tree
cp rt73.ko /lib/modules/2.6.19-ARCH/kernel/drivers/net/wireless/
Install module:
insmod /lib/modules/2.6.19-ARCH/kernel/drivers/net/wireless/rt73.ko
Update modules.dep:
depmod -a
== Install Firmware ==
Now copy the RT73 firmware that shipped in the driver tarball to the appropriate location:
cp rt73.bin /lib/firmware
Copy the rt73sta.dat file from the Module directory to this location:
cp rt73sta.dat /etc/Wireless/RT73STA
The rt73sta.dat file needs to be modified with your wireless network settings. This process will be described below.
= Testing The Driver =
We will now test the functionality of the driver we just installed before altering the rc.conf file. This method may also be used when the WiFi dongle is used infrequently or you prefer retaining control over the entire connection process.
There are two ways to manually configure the dongle, '''iwconfig''' and '''iwpriv'''. Note that '''iwpriv''' must be used to set the SSID when compiling against kernel 2.6.19 and above.
''Note:'' These steps may also be thrown in a script if you prefer.
Plug your WiFi dongle into a USB port.
Make sure the device is recognized using:
You can check to make sure your system realizes it's a wireless device using:
There should be a device named '''rausb0''' near the bottom.
Bring the WiFi dongle up using:
ifconfig rausb0 up
The '''rausb0''' device should show up now in:
Although without an IP address since we aren't associated with an Access Point(AP) yet.
You can associate the WiFi dongle with an AP using:
iwconfig rausb0 essid <your_ESSID>
Or, if you have WEP:
iwconfig rausb0 essid <your_ESSID> key <your_WEP_key>
If you are using kernel 2.6.19 and above, the previous command will set the WEP key but not the ESSID. You must set the ESSID before the WiFi dongle will associate with an Access Point. You have to use '''iwpriv''' to set the ESSID now:
iwpriv rausb0 set SSID="<your_ESSID>"
Remember you can scan for APs using:
iwlist rausb0 scan
Finally, let the dhcpcd client get an IP address for your WiFi dongle.
dhcpcd rausb0
If everything worked you should now have network access using your WiFi dongle. If you don't, check the routes:
There should be a path to your gateway listed. If there is not, you can set one up using:
route add default gw <gateway-ip> rausb0
= Non-Roaming Setup =
This section is being provided as an alternative to the '''Setup and Boot''' section of the [[Wireless]] page specifically for this hardware (RT73). This method has not been tested with other devices. Additionally, it should work whether you have kernel 2.6.18 or 2.6.19 and above if the driver was built successfully.
Edit the rt73sta.dat file:
nano /etc/Wireless/RT73STA/rt73sta.dat
Replace placeholders in the file with your wireless network settings, using the '''README''' in the tarball as a guide, or using the Ralink RaConfig utility (TODO: describe RaConfig setup).
Edit /etc/rc.conf to initiate dhcp on rausb0 at bootup:
# /etc/rc.conf
INTERFACES=(lo rausb0)
This is all you have to put in /etc/rc.conf. The rest of the settings will automatically be read from rt73sta.dat on bootup.

Revision as of 02:23, 18 February 2013