个人工具

UbuntuHelp:WifiDocs/Driver/RalinkRT61

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月24日 (四) 14:19的版本 (新页面: {{From|https://help.ubuntu.com/community/WifiDocs/Driver/RalinkRT61}} {{Languages|UbuntuHelp:WifiDocs/Driver/RalinkRT61}} === Introduction === Setting up the rt61 card requires compilin...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索


Introduction

Setting up the rt61 card requires compiling the kernel modules. This is very simple if you follow the below step by step instructions. These instructions have been tested on Ubuntu 6.10 (a.k.a. Ubuntu Edgy Eft), they could work on other release of Ubuntu.

Installing the necessary packages for the compilation

You will need to install a few packages for the compilation process. For installation of packages, please refer to InstallingSoftware.

  • gcc
  • build-essential
  • linux-headers

If you are familiar with the command line, you could type the following command:

$ sudo apt-get install linux-headers build-essential gcc

Getting the RT61 Driver from Ralink

Ralink Web Site have the Linux driver for download, check [1] and download the latest stable version (the current version is 1.1.0.0 as of January 2007: RT61_Linux_STA_Drv1.1.0.0.tar.gz). To download the version, you can use your favourite browser, or you can use the command line as follow:

$ wget http://www.ralinktech.com.tw/data/RT61_Linux_STA_Drv1.1.0.0.tar.gz

Compilation of the Module (driver)

You will need to enter the following operations on the command line. It is assumed that the downloaded driver is in the current directory.

$ tar xvfz RT61_Linux_STA_Drv1.1.0.0.tar.gz
$ cd RT61_Linux_STA_Drv1.1.0.0/Module/
$ cp -f Makefile.6 Makefile
$ make all

The module is now compiled.

Installation of the module

Continuing from the previous section, you will need to enter the following commands:

$ sudo mkdir -p /etc/Wireless/RT61STA/
$ sudo cp *.bin rt61sta.dat /etc/Wireless/RT61STA/
$ sudo cp rt61.ko /lib/modules/`uname -r`/kernel/drivers/net/
$ sudo depmod

Configuration of the module

The Ralink modules is configured using a single file. If you know how to use vi or vim, it is perhaps more suitable to use it. But in case you do not, you can use gedit but take care not to use any characters that are not ASCII.

The vi way

$ sudo vi -b /etc/Wireless/RT61STA/rt61sta.dat

The gedit way

$ gksudo gedit --encoding=ISO-8859-15 /etc/Wireless/RT61STA/rt61sta.dat

What to modify?

At this point you need to look at the readme/docs, basically you set most stuff up in this data file rather than /etc/network/interfaces.

Run

$ sudo iwlist ra0 scan

to find out what networks the card can find.

For WPAPSK authentication, you could change the settings as following:

SSID=<SSID of your Access Point>
NetworkType=Infra
AuthMode=WPAPSK
EncrypType=TKIP
WPAPSK=<Secret WPA key>

NOTE: For some reason there seem to be problems if the WPA key is longer than 52 characters and/or contains non-alphanumeric characters.

Activating the module (driver)

The pre-installed module, which is broken has to be removed. From the command line, enter:

$ modprobe --remove rt61pci

Then, we can load the new module that we have just installed:

$ modprobe rt61

To check if the module is activated and working, you should verify that ra0 device is visible in the output of iwconfig:

$ iwconfig

Setting up the system

As we did in the previous step, we need to deactivate the pre-installed module. This can be done automatically at start-up by adding an entry in a black list. From the command line:

$ echo 'blacklist rt61pci' >> /etc/modprobe.d/blacklist

Then, the correct (newly installed) module has to be loaded (do not forget the option '-a' after the tee command):

$ echo 'rt61' | sudo tee -a /etc/modules
$ echo 'alias ra0 rt61' | sudo tee -a /etc/modprobe.d/aliases

The last step is to modify the file /etc/network/interfaces to set-up your specific networking settings. Depending if you want to use DHCP (recommended) or static IP address you have two different configuration, but in both case you need to first edit the file:

$ gksudo gedit /etc/network/interfaces

Dynamic IP - DHCP (recommended)

The content of the interfaces file should look like this:

iface ra0 inet dhcp
auto ra0

Static IP

The content of the interfaces file should look like this:

iface ra0 inet static
address <your chosen ip>
netmask 255.255.255.0
gateway <ip of your access point>
auto ra0

Getting your network up and running

Everything is now done, you just have to tell so to Ubuntu. You can either reboot, but instead of loosing your time, you can simply type this command:

$ sudo ifup ra0