特殊:Badtitle/NS100:WifiDocs/Driver/RalinkRT61
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/WifiDocs/Driver/RalinkRT61 }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/af | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Afrikaans| [[::WifiDocs/Driver/RalinkRT61/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/ar | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|العربية| [[::WifiDocs/Driver/RalinkRT61/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/az | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|azərbaycanca| [[::WifiDocs/Driver/RalinkRT61/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/bcc | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|جهلسری بلوچی| [[::WifiDocs/Driver/RalinkRT61/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/bg | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|български| [[::WifiDocs/Driver/RalinkRT61/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/br | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|brezhoneg| [[::WifiDocs/Driver/RalinkRT61/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/ca | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|català| [[::WifiDocs/Driver/RalinkRT61/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/cs | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|čeština| [[::WifiDocs/Driver/RalinkRT61/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/de | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Deutsch| [[::WifiDocs/Driver/RalinkRT61/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/el | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Ελληνικά| [[::WifiDocs/Driver/RalinkRT61/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/es | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|español| [[::WifiDocs/Driver/RalinkRT61/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/fa | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|فارسی| [[::WifiDocs/Driver/RalinkRT61/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/fi | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|suomi| [[::WifiDocs/Driver/RalinkRT61/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/fr | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|français| [[::WifiDocs/Driver/RalinkRT61/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/gu | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|ગુજરાતી| [[::WifiDocs/Driver/RalinkRT61/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/he | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|עברית| [[::WifiDocs/Driver/RalinkRT61/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/hu | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|magyar| [[::WifiDocs/Driver/RalinkRT61/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/id | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Bahasa Indonesia| [[::WifiDocs/Driver/RalinkRT61/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/it | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|italiano| [[::WifiDocs/Driver/RalinkRT61/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/ja | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|日本語| [[::WifiDocs/Driver/RalinkRT61/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/ko | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|한국어| [[::WifiDocs/Driver/RalinkRT61/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/ksh | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Ripoarisch| [[::WifiDocs/Driver/RalinkRT61/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/mr | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|मराठी| [[::WifiDocs/Driver/RalinkRT61/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/ms | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Bahasa Melayu| [[::WifiDocs/Driver/RalinkRT61/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/nl | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Nederlands| [[::WifiDocs/Driver/RalinkRT61/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/no | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|norsk| [[::WifiDocs/Driver/RalinkRT61/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/oc | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|occitan| [[::WifiDocs/Driver/RalinkRT61/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/pl | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|polski| [[::WifiDocs/Driver/RalinkRT61/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/pt | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|português| [[::WifiDocs/Driver/RalinkRT61/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/ro | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|română| [[::WifiDocs/Driver/RalinkRT61/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/ru | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|русский| [[::WifiDocs/Driver/RalinkRT61/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/si | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|සිංහල| [[::WifiDocs/Driver/RalinkRT61/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/sq | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|shqip| [[::WifiDocs/Driver/RalinkRT61/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/sr | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|српски / srpski| [[::WifiDocs/Driver/RalinkRT61/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/sv | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|svenska| [[::WifiDocs/Driver/RalinkRT61/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/th | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|ไทย| [[::WifiDocs/Driver/RalinkRT61/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/tr | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Türkçe| [[::WifiDocs/Driver/RalinkRT61/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/vi | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|Tiếng Việt| [[::WifiDocs/Driver/RalinkRT61/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/yue | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|粵語| [[::WifiDocs/Driver/RalinkRT61/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/zh | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|中文| [[::WifiDocs/Driver/RalinkRT61/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/zh-hans | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|中文(简体)| [[::WifiDocs/Driver/RalinkRT61/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61 | UbuntuHelp:WifiDocs/Driver/RalinkRT61 | {{#if: | :}}WifiDocs/Driver/RalinkRT61}}/zh-hant | • {{#if: UbuntuHelp:WifiDocs/Driver/RalinkRT61|中文(繁體)| [[::WifiDocs/Driver/RalinkRT61/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:WifiDocs/Driver/RalinkRT61|:WifiDocs/Driver/RalinkRT61|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :WifiDocs/Driver/RalinkRT61/zh | | {{#ifexist: WifiDocs/Driver/RalinkRT61/zh | | {{#ifeq: {{#titleparts:WifiDocs/Driver/RalinkRT61|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:WifiDocs/Driver/RalinkRT61|1|-1|}} | zh | | }}
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
Now, (at least for Gutsy) you need to do a minor modification to one of the files to make it compile. The following sed and mv commands do the job.
$ sed 's/pci_module_init/pci_register_driver/' < rtmp_main.c > rtmp_main.c2 $ mv rtmp_main.c2 rtmp_main.c
Finally, execute make to build the module.
$ 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
Feisty Fawn Installation
With Fesity Fawn the rt61 drivers are included in the basic install. So downloading and compiling drivers is unecessary. It may be important (and time saving) for you to note that if you require either no or WEP encryption the Network Manager applet can usually be used seccessfully to establish connectivity. This guie will concentrate on getting WPA encryption to work. Specifically WPA-PSK using TKIP.
Which Chip Set Do I Have?
The rt61 has two main chipset types
lspci | grep Ra 05:00.0 Network controller: RaLink RT2561/RT61 802.11g PCI
(note that PCI could be replaced with USB or another bus type) and the later version
lspci | grep Ra 05:00.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
If your system is running the rev B version you can continue with this guide as is. However if you are using the original then you will need to uninstall the Network Manager applet as otherwise the network destinations will always return as unreachable. The Network Manager can be uninstalled using the following command:
sudo dpkg -P network-manager network-manager-gnome
Getting Started
The first thing to do is check that Ubuntu has indeed detected your card and that the appropriate driver is available. This is done as follows:
$lsmod | grep rt61 rt61 245128 1 $modinfo rt61 filename: /lib/modules/2.6.20-15-generic/kernel/ubuntu/wireless/rt2x00-legacy/rt61/rt61.ko license: GPL description: Ralink RT61 802.11abg WLAN Driver 1.1.0 CVS CVS author: http://rt2x00.serialmonkey.com srcversion: 180F8980D3385B365E8F654 alias: pci:v00001814d00000401sv*sd*bc*sc*i* alias: pci:v00001814d00000302sv*sd*bc*sc*i* alias: pci:v00001814d00000301sv*sd*bc*sc*i* depends: vermagic: 2.6.20-15-generic SMP mod_unload 586 parm: debug:Enable level: accepted values: 1 to switch debug on, 0 to switch debug off. (int) parm: ifname:Network device name (default ra%d) (charp)
Next, having established that the card is recognised and an appropriate driver is available you need to check that Ubuntu has already configured an interface for the device.
$ ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:100 (100.0 b) TX bytes:100 (100.0 b) ra1 Link encap:Ethernet HWaddr 00:18:39:13:96:74 inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::218:39ff:fe13:9674/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15714 errors:0 dropped:0 overruns:0 frame:0 TX packets:1171 errors:4 dropped:4 overruns:0 carrier:0 collisions:80 txqueuelen:1000 RX bytes:23
This shows that the interface has been configured as ra1. Note that in previous versions of Ubuntu, this would be ra0, but in Feisy Fawn it is normal for a fresh installation to name the interface as ra1.
Disabling the Interface
The interface needs to be taken down in order for the changes we are going to make to take effect. This is done as follows:
$sudo ifconfig ra1 down
It is a good idea to type ifconfig after this in order to check the device has been taken down successfully. If it has then the ra1 interface should not appear in the output.
Configuring the connection
The next job is to configure the connection with the parameters specific to your network. For this you will need your: 1. SSID (Network Name as broadcast by the router) 2. Encryption Type (Here we are assuming WPAPSK TKIP 3. Secret WPA Key (this is the hexadecimal key NOT the passphrase. If you only have the passphrase you can generate your WPA Key using the following command:
$ wpa_passphrase YOUR_SSID YOUR_PASSPHRASE
OK now the connection can be configured as follows
$ sudo iwconfig ra0 essid YOUR_SSID $ sudo iwpriv ra0 set AuthMode=WPAPSK $ sudo iwpriv ra0 set WPAPSK="YOUR_WPA_KEY" $ sudo iwpriv ra0 set EncrypType=TKIP
Typing iwconfig should display the new details of your connection. However don't worry if it the link quality is still 0/100 because sometimes the changes don't apply until the interface is brouught up again.
IP and Routing Details
The next thing to do is set the IP address of the card and bring it back online (up)
$ sudo ifconfig ra1 DESIRED_IP netmask YOUR_NETMASK up $ iwconfig lo no wireless extensions. eth0 no wireless extensions. ra1 RT61 Wireless ESSID:"YOUR_SSID" Nickname:"" Mode:Managed Frequency:2.427 GHz Access Point: XX:XX:XX:XX:XX:XX Bit Rate=54 Mb/s RTS thr:off Fragment thr:off Link Quality=75/100 Signal level:-59 dBm Noise level:-95 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
OK so now the IP address is all set up and the network can detect the network and has a link quality of above 0. The next thing is to set up the routing table. Delete the default gateway from your machine and replace it with that of the new connection.
$ sudo route del default $ sudo route add default gw GATEWAY_IPADDRESS
The Gateway IP address is usually the internal IP address of your router. Typing route at the command line should show you the inclusion of the default path to the wireless gateway. You can now test this link by pinging the router
$ ping GATEWAY_IPADDRESS PING GATEWAY_IPADDRESS (GATEWAY_IPADDRESS) 56(84) bytes of data. 64 bytes from GATEWAY_IPADDRESS: icmp_seq=1 ttl=64 time=6.31 ms 64 bytes from GATEWAY_IPADDRESS: icmp_seq=2 ttl=64 time=1.01 ms 64 bytes from GATEWAY_IPADDRESS: icmp_seq=3 ttl=64 time=1.00 ms 64 bytes from GATEWAY_IPADDRESS: icmp_seq=4 ttl=64 time=1.04 ms 64 bytes from GATEWAY_IPADDRESS: icmp_seq=5 ttl=64 time=1.02 ms 64 bytes from GATEWAY_IPADDRESS: icmp_seq=6 ttl=64 time=1.00 ms ...
We are almost there but, at present the computer can only communicate with the gateway as it does not know where to find other hosts. For this we need to establish a DNS (Domain Name Server).
$ sudo echo "nameserver GATEWAY_IPADDRESS" >> /etc/resolv.conf $ ping www.google.com
You should now find that the computer can ping any address on the internet. HAPPY BROWSING!!
Automatic Configuration on Startup
Obviously you won't be wanting to go through this process every time the computer boots so we need to write a script in order to do this for us. There is a configuration file called /etc/network/interfaces that we need to modify in order to make this happen.
$ sudo gedit /etc/network/interfaces
At the beginning add the following code:
auto ra1 iface ra1 inet static address YOUR_IP netmask YOUR_NETMASK gateway GATEWAY_IPADDRESS pre-up iwpriv ra1 set AuthMode=WPAPSK pre-up iwpriv ra1 set EncrypType=TKIP pre-up iwconfig ra1 essid YOUR_SSID pre-up iwpriv ra1 set WPAPSK="YOUR_PSKKEY"