Step 1 - Disable Competing Driver
You need to blacklist the existing rt73 module which is not working:
user@ubuntu:~$ sudo gedit /etc/modprobe.d/blacklist
add the following three lines to the end of the file:
# Added when rt73 module was installed
blacklist rt73usb
blacklist rt2570
Save the file. The blacklisted module will not be loaded from now on.
Step 2 - Prepare the Linux build environment
You will need to install the essential build files to compile the driver:
user@ubuntu:~$ sudo apt-get update
user@ubuntu:~$ sudo apt-get install build-essential
Install the correct headers for your version of Ubuntu: (don’t worry if it tells you that yours are up to date.)
user@ubuntu:~$ sudo apt-get install linux-headers-`uname -r`
user@ubuntu:~$ sudo ln -s /usr/src/linux-headers-`uname -r` /lib/modules/`uname -r`/build
Install the todos and fromdos utilities for converting files from DOS/Windows text to UNIX text (required later in the process):
user@ubuntu:~$ sudo apt-get install tofrodos
Step 3 - Download the latest version of the Ralink RT2571W/RT2671 USB driver
The driver can be found at: [WWW] http://www.ralink.com.tw/Home/Support/Linux.html
The latest at the time I am writing this is: [WWW] http://www.ralink.com.tw/data/RT73_Linux_STA_Drv1.0.3.6.tar.gz
You can get the driver into your current directory with the following wget command:
user@ubuntu:~$ wget http://www.ralink.com.tw/data/RT73_Linux_STA_Drv1.0.3.6.tar.gz
Step 4 - Extract and prepare the archive
Using tar extract the archived driver and change directories into the build area.
user@ubuntu:~$ tar xvzf RT73_Linux_STA_Drv1.0.3.6.tar.gz
user@ubuntu:~$ cd RT73_Linux_STA_Drv1.0.3.6/Module
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$
The permissions are not correct on the files, so change them to 755 using chmod:
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ chmod -R 775 *
Change all of the files to the UNIX text type:
user@ubuntu:~$ fromdos *
Copy the Makefile.6 file into the Makefile to prepare for a 2.6 Linux kernel build:
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ cp Makefile.6 Makefile
Edit the file rtmp_def.h and near the end of the file is a section that deals with the USB IDs of the devices that the driver works with. You will have to add your device’s USB ID, in this case we add the IF for the F5D7050 ver 3000. Did you use chmod above to make the files read write for you?
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ gedit rtmp_def.h
You must add your device’s USB ID to the file immediately after the #define RT73_USB_DEVICES comment, unless it is listed in the original. The entries above the device 0×148f,0×2573 are those that I have added for various new devices. Make a copy of the first entry and change it to the correct USB_DEVICE for your card, found by the output of lsusb: (Note: I am adding additional examples for other devices below the Belkin F5D7050 ver 3000 entry.)
#define RT73_USB_DEVICES { /
{USB_DEVICE(0×050d,0×705a)}, /* Belkin F5D7050 ver 3000 */ /
{USB_DEVICE(0×13b1,0×0020)}, /* Linksys WUSB54GC */ /
{USB_DEVICE(0×07d1,0×3c03)}, /* D-LINK DWL-G122 Rev: C1 */ /
{USB_DEVICE(0×148f,0×2573)}, /* Ralink */ /
Save the file.
Step 5 - Create and install the driver using make
Make the driver with the make command:
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ make clean
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ make
This will take several minutes. There will be warnings, but there can be no errors or the build will not complete.
Using sudo make install we install the complete driver into the “extra” directory of your kernel modules:
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ sudo make install
Verify that the driver was installed correctly using the list short command:
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ ls /lib/modules/`uname -r`/extra
You should see the file rt73.ko
Create the directories necessary for storing the firmware for the driver:
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ sudo mkdir /etc/Wireless
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ sudo mkdir /etc/Wireless/RT73STA
Copy the rt73.bin and rt73sta.dat files into the newly created firmware directory:
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ sudo cp rt73.bin /etc/Wireless/RT73STA
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ sudo cp rt73sta.dat /etc/Wireless/RT73STA
Step 6 - Configure the network settings for the rt73 device
The rt73 device requires the use of the “ifconfig rausb0 up” command to wake the device for configuration. The Networking applet does not allow for this, so we are going to modify the /etc/network/interfaces manually. You can use the Networking applet to bring the device up an down once it is configured, but you cannot make any changes unless you make the appropriate changes in interfaces using a text editor.
You could use the Networking applet to make the initial entries and then change the entries manually using a text editor so that the “ifconfig rausb0 up” is added immediately after the first line of the device entry.
Using the Text Editor (gedit) we need to modify the interfaces file to get the device started correctly:
user@ubuntu:~/RT73_Linux_STA_Drv1.0.3.6/Module$ sudo gedit /etc/network/interfaces
Dynamic Address Assignment using DHCP: Add this data at the end of the file for a DHCP setup: (Choose one key type, either hex or ASCII, but not both, uncomment one, and fill in your key.)
# rt73 wireless network device using DHCP
iface rausb0 inet dhcp
pre-up ifconfig rausb0 up
wireless-essid MY_ESSID
# wireless-key XXXXXXXXXXXXXXXXXXXXXXXXXX # This line for hexidecimal keys
# wireless-key s:XXXXXXXXXXXXX # This line for ASCII (string) keys
auto rausb0
Static IP Address Example: Add this data at the end of the file for a static IP address setup: (Choose one key type, either hex or ASCII, but not both, uncomment one, and fill in your key.) You may have better luck by setting up the device using the Networking applet and the modifying the record and adding the necessary “pre-up ifconfig rausb0 up” line. If you do so make sure that you do not end up with more than one line that says “auto rausb0″.
# rt73 wireless network device using static IP address
iface rausb0 inet static
pre-up ifconfig rausb0 up
wireless-essid MY_ESSID
# wireless-key XXXXXXXXXXXXXXXXXXXXXXXXXX # This line for hexidecimal keys
# wireless-key s:XXXXXXXXXXXXX # This line for ASCII (string) keys
address XXX.XXX.XXX.XXX
netmask XXX.XXX.XXX.XXX
network XXX.XXX.XXX.XXX
broadcast XXX.XXX.XXX.XXX
gateway XXX.XXX.XXX.XXX
auto rausb0
Warning, if the “pre-up ifconfig rausb0 up” line is not put in correctly the device will not be plug and play. This is a critical difference between the rt73 devices and most other wireless adapters.
Step 7 - Install Module
sudo modprobe rt73
Check that your computer knows the device exists.
user@ubuntu:~$ iwconfig
If rausb0 is present it is time to connect to the internet.
The output rausb0 should be similar to the following,
rausb0 RT73 WLAN ESSID:”MY_ESSID”
Mode:Managed Frequency=1 MHz Access Point: 00:08:74:02:01:FC
Bit Rate=54 Mb/s
RTS thr:off Fragment thr:off
Link Quality=100/100 Signal level:-28 dBm Noise level:-79 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
In this example we know that the access point with the ESSID “MY_ESSID” has been found, because we can see that the “Access Point:” field has been filled in with the access point’s MAC identifier.
Note that the Frequency is listed as 1 MHz, but this is actually the channel number, this is a feature of the present driver implementation.
If you configured your network correctly you should see that your ESSID is set for your access point and that the Access Point Media Access Code identifier has been filled in with your access point’s MAC identifier.
Run a “netstat -rn” command, and you should see that the correct routing is setup:
user@ubuntu:~$ netstat -rn
The output should be similar to this example:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 rausb0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 rausb0
In this case 192.168.1.1 is the gateway address to an Internet router.
Step 8 - Controlling the device
You can now control the device with ifup and ifdown:
user@ubuntu:~$ sudo ifdown rausb0
user@ubuntu:~$ sudo ifup rausb0
Removing and inserting the device should remove and setup the network correctly. Don’t forget that it takes about 10 - 15 seconds for the system to set the device up for networking. If you have forgotten and your access point is not on, the device should find it as soon as you do turn it on.
Credits
Ralink - For providing a stable rt73 driver, which they licensed under the GPL.
Yawnster - For exposing me to the Ubuntu Help Forum and its documentation.
Necessary Changes or Questions
Please contact FrodoB through a private message or through the Networking & Wireless section of the forums if you see items that need to be clarified or improved upon. Thank you very much.
(2007-01-19 21:28:10由yigal.weinstein编辑)
© 2005 Canonical Ltd. Ubuntu, Kubuntu, Edubuntu and Canonical are registered trademarks of Canonical Ltd.
Feedback — Legal — Credits — Site Map