个人工具

UbuntuHelp:WifiDocs/Driver/RalinkRT73

来自Ubuntu中文

跳转至: 导航, 搜索

Driver Information

  • Driver Name: RT73_Linux_STA_Drv1.0.4.0
  • Module Name: rt73.ko

Support Channels

Enter general help that will work at anytime with the driver. See section below if it's release specific

Ubuntu Release Specific Info

Under the correct section enter anything that is specific to the release only. See above general section if it is not release specific

Karmic 9.10

This works out of the box in Ubuntu Karmic (9.10)for some users. Tested with Belkin Wireless G USB Adapter (F5D7050TT/F4D5050B, USB ID 050d:705a). It doesn't work in Kubuntu Karmic (9.10) using D-Link DWL-G122 Ver.C1 3.10 (USB ID 07d1:3c03).

Gutsy 7.10

Work with build-in modules (Tested DLink DWL-G122 rev. C1).

Examples

/etc/network/interfaces: At start config (for Dymamic IP):

auto wlan0
iface wlan0 inet dhcp

At start config (for Static IP):

auto wlan0
iface wlan0 inet static
address 192.168.1.15
netmask 255.255.255.0

Beyond one of:

# Without WPA/WEP
wireless-essid MyAccessPoint
# For WEP
wireless-essid MyAccessPoint
wireless-key 1234567890
# For WPA
wpa-psk 12345678
wpa-driver wext
wpa-key-mgmt WPA-PSK
wpa-proto WPA
wpa-ssid MyAccessPoint
# For WPA2
wpa-psk 12345678
wpa-driver wext
wpa-key-mgmt WPA-PSK
wpa-proto WPA2
wpa-ssid MyAccessPoint

Feisty 7.04

It works fine. Follow the instructions in the readme. Pretty much as easy as make;make install. I tested on a linksys WUSB54GC. Download drivers here: http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz

Dapper 6.06

To see if your USB device would be supported by this driver, have a look at the information printed on the device. In my case, the model information reads "Model No.: DWL-G122 H/W Ver.:C1 F/W Ver.:3.00" What's important here is that the hardware version is C1 - earlier models are covered by different drivers. Also note the output of the lsusb command, which, in my case, produces the following line: <<Anchor(lsusb_id)>>

Bus 003 Device 002: ID 07d1:3c03 D-Link System

Note the two hexadecimal ID numbers (07d1:3c03), as they'll be used later when compiling the driver source.

Compile Newer Driver

Ralink driver

To compile the driver, downloaded the source from the Ralink Linux support page or download the latest source directly. You can download and unpack the sources with the following commands:

$ wget http://www.ralinktech.com.tw/data/RT73_Linux_STA_Drv1.0.4.0.tar.gz
$ tar xzvf RT73_Linux_STA_Drv1.0.4.0.tar.gz

Once the source files were unpacked, you may need to follow the advice in this forum posting to edit the source files for your specific driver. What you have to do is edit the file named 'Module/rtmp_def.h'. Find the section headed by the comment `// VENDOR ID` and add the IDs that were reported by the `lsusb` command [[UbuntuHelp:[lsusb_id|earlier]]]. Check 'Module/rtmp_def.h' for your card type before editing the file. To compile, first make sure that you have the essential build tools and the kernel headers matching your kernel version, as described in KernelSource Driver. Then, it was a case of following the instructions given in the README that came with the sources. For kernel v2.4, follow the instructions found in 'Module/README'.

$ cp -v Makefile.6 ./Makefile      # Because we are using kernel v2.**6**
$ make all

(When building, I get a lot of errors of the form `warning: "DBG" is not defined`. This is no cause for concern, and these warnings can be supressed by uncommenting the line `#CFLAGS += -DDBG` in the Makefile) Now copy the newly created kernel module, and the provided firmware, into their correct directories:

$ sudo cp -v rt73.ko /lib/modules/`uname -r`/kernel/drivers/usb/net/
$ sudo mkdir -pv /etc/Wireless/RT73STA
$ sudo cp -v rt73.bin /etc/Wireless/RT73STA/
$ dos2unix rt73sta.dat      # May require you to install 'tofrodos'; 'sudo apt-get install tofrodos'
$ sudo cp -v rt73sta.dat /etc/Wireless/RT73STA/rt73sta.dat

If you change the location of rt73sta.dat and rt73.bin, you must also edit the paths to the files in 'rt_config.h'.

Initializing Device

Once the files had been copied to their correct locations, all I had to do was insert the module, and plug in my device, and the network was up and running!

$ sudo insmod /lib/modules/`uname -r`/kernel/drivers/usb/net/rt73.ko
$ dmesg
  [ nnn.nnnnn] rtusb init ====>
  [ nnn.nnnnn] usbcore: registered new driver rt73
$ # Plug in wireless adapter here
$ dmesg
  [ nnn.nnnnn] usb 1-1: new full speed USB device using uhci_hcd and address 2
  [ nnn.nnnnn] idVendor = 0x7d1, idProduct = 0x3c03
  [ nnn.nnnnn] rausb0 (WE) : Driver using old /proc/net/wireless support, please fix driver !
  [ nnn.nnnnn] rt73 driver version - 1.0.3.0
  [ nnn.nnnnn] rausb0: no IPv6 routers present

To load this module automatically on boot, first you have to update the module dependency information file to include that in the rt73 module and then update your '/etc/modules' file.

$ sudo depmod -a
$ sudo echo "rt73" >> /etc/modules

You can check if the module is loaded on the next boot by entering the command modprobe -l rt73, and the output should be the directory to which you copied the .ko file to earlier. If you are using Gnome with Network Manager, you are finished. The Network Manager should remember your connection settings every time you reboot. For completeness, I am including the changes I made to my rt73sta.dat file below. Unsurprisingly, wireless support is quite sensitive to the settings in this file. For instance, if I change `NetworkType` from `Infra` to `Adhoc`, as suggested in the driver source README, I am no longer able to get wireless access. The settings below are a minimum (but perhaps not the absolute minimun)

[Default]
SSID=<my essid>
NetworkType=Infra
Channel=6
AuthMode=OPEN
EncrypType=NONE

With the settings defined as above in the .dat file, I only need to include the following lines in my `/etc/network/interfaces` file to complete the configuration:

auto rausb0
iface rausb0 inet dhcp

WEP info

The above description is all it took to connect to my OPEN wireless connection point. Connecting with WEP is another story. At the moment, if I try and set a WEP key with the GNOME network manager, my entire system hangs. I'll carry on playing around, and post any further results here. Some open questions:

  1. Is it easy to fix the driver so it doesn't use old /proc/net/wireless support?
  2. Which is more relevant to the config - the /etc/network/interfaces file, or the rt73sta.dat file?

I found that to connect with WEP I needed to make some additional changes to the /etc/Wireless/RT73STA/rt73sta.dat file. There is quit good documentation in the read me file. I set the values as follows:

SSID=mynetworkname
NetworkType=Infra
Channel=Mychannel (for example 6)
AuthMode=WEPAUTO
EncrypType=WEP
DefaultKeyID=1
Key1Type=1
Key1Str=MyWirlesspassword

For other encryption types changed AuthMode and EncrypType. You may also need to set WPAPSK to your wireless password. (I did anyway just in case. You can then connect using the standard System --> Administration --> Networking tool. Just add your SSID into the box, no need to enter a password. (I did this cause I use static IP address which is easy to enter in the dialog box and know you will have the right info in the right place in /etc/network/interfaces and I can never get the gateway to work if I use DHCP. Think my router might be routed!) I was not able to get this working with gnome network manager. No wireless device could be found. I think this is because the device will not "activate" till you bring up a connection and once you do that wireless manager will ignore it cause it is referred to in /etc/network/interfaces. I'm sure there is a way round it but this is a desktop machine so I don't need to connect to multiple random networks. Also when the device is up and connected the link light is on (Not flashing on and off). If you have network monitor in your panel change the device to rausb0,(Or as appropriate for you) just right click -->properties then typing it (rausb0) in (I never got it in the drop down box). When the device is detected but not connecting to the network there will be a small yellow bar next to the normal "two tellys" icon. Once the connection is up and running it gets longer and turns green!.

WPA info

Enter anything related to getting WPA to work (see WEP above)

References

Here are a list of the postings and webpages I consulted while trying to get this device to work:

  1. https://wiki.ubuntu.com/WifiDocs/RalinkRT2500
  2. http://61.222.76.235/phpbb2/viewtopic.php?p=8430
  3. http://ubuntuforums.org/showthread.php?t=195725

Reader Comments

Tried to help a friend install this on his Ubuntu 6.06 today, found one gotcha (the driver file from RAlink had all source files read-only, so we needed to do chmod u+w * while in the Module directory before making the edit). Also in our source file the DEFINE statements were a single line with each device ID, so I added to that rather than defining separate values {USB_DEVICE(0x07d1,0x3c03)}, \ But regardless, the kernel module wouldn't build; it wanted to be linked into the kernel tree somehow (a symlink from /lib/modules/x.x.x/build to ~/Desktop/Ralink-Driver-x.x.x/Module ??) and we couldn't get it to go. A pointer to documentation for the slightly more ignorant would be MARVELLOUS :) Xurizaemon, 04/08/06 Xurizaemon, I had the same problem. You have to have the kernel headers in place, and linked correctly online book reports. For instance, for kernel 2.6.15-26-386, you should have the following link: /lib/modules/2.6.15-26-386/build -> /usr/src/linux-headers-2.6.15-26-386 This should be done automatically when you install the linux-headers package. The link is essential since the makefile calls another makefile in the directory above. If no link exists, and you are sure that you have the headers package, try the following steps from the RT73 module source directory (and replacing "2.3.15-26-386" with the result of "uname -r"):

sudo make clean
sudo ln -s /usr/src/linux-headers-2.6.15-26-386 /lib/modules/2.6.15-26-386/build
sudo make all
sudo make install

Make sure beforehand that you haven't already created the build directory, or put some symlink there in the process of trying to get it to work. Incidentally, I managed to get WPA working by including the following lines:

SSID=mySSID
NetworkType=Infra
AuthMode=WPAPSK
EncrypType=TKIP
WPAPSK=myPassword

Where mySSID and myPassword are the SSID and WPA passkey that I chose for my wireless router. I am using a D-Link DWL-G122 Rev. C1 USB adapter on Ubuntu Dapper. Beldaz, 18/08/06 I was able to get WEP working with my Wireless Access Point. It was just a matter of tinkering with the /etc/Wireless/RT73STA/rt73sta.dat file, after doing some more research. It seems that the Country, Channel, DefaultKeyID should be one less than what your router says in service essays. So, if you're using Channel 11, you should use Channel=10 in your rt73sta.dat file. It worked after rebooting my system this last time (ifup was hanging my system, but I haven't retried it yet).

[Default]
CountryRegion=0 #Translates to 1, USA, I think
CountryRegionABand=7 #Whatever, it works
WirelessMode=0
SSID=MySSIDname #Your wireless network name
NetworkType=Infra
Channel=10 #This is translates to 11
AuthMode=OPEN
EncrypType=WEP
DefaultKeyID=0 #This translates to 1
Key1Type=0 #Translates to 1, Hex, I guess
Key1Str=55A966F515 #Enter your HEX key here.

Wankelrx8, 8/30/2006 It seems there is a bug in a RT73 driver. When I, with the module rt73.ko loaded, do sudo ifdown rausb0 and next sudo ifup rausb0 Ubuntu Dapper freezes. Because most graphical administration tools perform these commands in the background, we have to use iwpriv commands or edit the rt73sta.dat file and do a reboot. This is the only way to confiure WEP or WPA I found so far cropr 8-Sep-2006 For the users of a Sitecom WL-113 v1.002 usb wireless-network adapter, this is the right driver. It works with WEP. WPA and WPA2 I have not tested yet. Before compiling the drivers, edit the file named 'Module/rtmp_def.h' and add your device ID as described above. It took me days to figure out which driver to use for this device since the WL-113 v1.001 is equiped with a zydas1211 chip (module zd1211.ko). Xueg0i, 9/13/2006 This is the right driver for the Canyon CN-WF518 Wireless USB adapter with the Ralink chipset (September 2006). Do a 'lsusb' to find out - if it shows 'Ralink Technology, Corp.' it should work. Otherwise the chipset is zd1211-based, and you'll have to use the ZD1211 driver. Gendor, 3 October 2006 There is a newer driver available from Ralink at USB Documentation in the 'Module\rtemp.h' has changed: no VENDOR ID lists, just the USB_DEVICE(0x0000,0x0000) Forums links on this page are broken. List of Packages/Apps needed to compile/install the driver:

  • make
  • gcc
  • gcc-4.0 (not sure if this is required, but I used it)
  • g++
  • linux-headers-2.6.15-27-386 (or whatever your current kernel version is)
  • tofrodos

Works with CompuUSA 54Mbps WirelessG Mini USB Adapter, 802.11g, b (Product Number: 333626, Mfr. Part #: 140758) which uses the RT73 core. I was able to get it working with WEP on Dapper Drake. Skywalkin1138, 2006OCT04

GPL RT73 driver

i just found that the http://rt2x00.serialmonkey.com/wiki/index.php/Downloads site have GPL drivers for the RT73 and i made then work without much trouble... I downloaded the latest cvs driver, uncompressed it in /usr/src, entered the Modules dir and made the make and make install (having of course the gcc, correct kernel headers, etc to build it). I then added in /etc/modules the line "rt73" and in /etc/modprobe.d/rt73 "alias rausb0 rt73" and removed the obsolete /etc/modprobe.conf created by make install. Finally i add in /etc/network/interface this:

auto rausb0
iface rausb0 inet dhcp
        pre-up ifconfig rausb0 up
        pre-up ifconfig rausb0 down
        pre-up ifconfig rausb0 up
        pre-up iwconfig rausb0 essid "MYESSID"
        pre-up iwconfig rausb0 mode Managed
        pre-up iwpriv rausb0 set AuthMode=WPAPSK
        pre-up iwpriv rausb0 set EncrypType=TKIP
        pre-up iwpriv rausb0 set WPAPSK="YOUR KEY"
        pre-up ifconfig rausb0 up

i just copied this from other RT2x00 howto, don't know for sure if its really needed to push up and down the interface before configuring, must test later. i didn't edit nor need anything else for this to work. With this i can use the usb wireless card with a shared WPA-TKIP network, probably works also with WEP. For WPA-AES, at least in teory, one should change the Encryptype to AES and should work (but didn't test it). i can plug and unplug the usb device and the network respond as aspected, and using for some time to web and data transfer seems to be working fine. So i think there should be no problem for most people and with luck the next release will already have this drivers. higuita 09/10/2006

EXAMPLE UBUNTU GUSTY Linksys WUSB54GC wireless usb dongle

cat /usr/share/doc/wireless-tools/README.Debian
zless /usr/share/doc/ifupdown/examples/network-interfaces.gz

echo blacklist rt73usb | sudo tee -a /etc/modprobe.d/blacklist
echo blacklist rt2x00 | sudo tee -a /etc/modprobe.d/blacklist

cd ~
wget http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz
tar -xzf ~/rt73-cvs-daily.tar.gz
cat ~/rt73-cvs-2007122602/README

cd ~/rt73-cvs-2007122602/Module
make
sudo make install
sudo mv /lib/firmware/rt73.bin /lib/firmware/$(uname -r)

echo   | sudo tee -a /etc/network/interfaces
echo auto wlan0 | sudo tee -a /etc/network/interfaces
echo iface wlan0 inet dhcp | sudo tee -a /etc/network/interfaces
echo pre-up /sbin/ifconfig wlan0 up | sudo tee -a /etc/network/interfaces
echo pre-up /sbin/iwconfig wlan0 mode managed | sudo tee -a /etc/network/interfaces
echo pre-up /sbin/iwconfig wlan0 essid linux-linksys | sudo tee -a /etc/network/interfaces
echo pre-up /sbin/iwpriv wlan0 set AuthMode=WPAPSK | sudo tee -a /etc/network/interfaces
echo pre-up /sbin/iwpriv wlan0 set EncrypType=AES | sudo tee -a /etc/network/interfaces
echo pre-up /sbin/iwpriv wlan0 set WPAPSK=yourpassword | sudo tee -a /etc/network/interfaces
echo   | sudo tee -a /etc/network/interfaces

cat /etc/network/interfaces
sudo vim /etc/network/interfaces

sudo /etc/init.d/networking restart

Jelle de Jong (TuxCrafter) 26-12-2007