Rt61
From Gentoo Linux Wiki
Contents |
[edit] Introduction
This is a tutorial to have a Linksys WMP54G with the RaLink chipset and the rt61 driver working under Gentoo Linux. To do this I will be using the net-wireless/ralink-rt61 driver with the 2.6.21 kernel. I've noticed many people are having problems installing drivers for this particular chipset, so here is a guide to get it up and running. I've read somewhere this driver is available in kernel 2.6.24, but if you don't want to deal with the test kernel, this guide is for you.
[edit] Check your chipset
As root use the command:
|
to make sure you have the RT2561/RT61 chipset (lspci is part of sys-apps/pciutils).
[edit] Kernel
Firstly, compile wireless LAN (non hamradio) support for your kernel. See Wireless/Configuration for more information.
[edit] Driver installation
Currently the rt61 package is masked in portage. To allow installation, add the following line to /etc/portage/package.keywords:
| File: /etc/portage/package.keywords |
net-wireless/rt61 |
Install the rt61 driver using
emerge --ask --verbose ralink-rt61
Then load the rt61 module:
modprobe rt61 update-modules
The module should then appear
lsmod
In order to have the module automatically loaded at boot
echo "rt61" >> /etc/modules.autoload.d/kernel-2.6
And create net.ra0;
ln -s /etc/init.d/net.lo /etc/init.d/net.ra0
Now the interface ra0 should appear in ifconfig.
ifconfig -a
Once the module is loaded, and ready to go, you may play with iwconfig to see if it recognizes your new wireless card. If that fails, reboot the machine. This may not be the 'Gentoo Way' of doing it but it worked for me.
If this is so, then so far, so good.
[edit] Manual installation
[edit] Download
First of all, make sure you have the correct hardware by running lspci, you should see rt61 on that list. Download the latest driver from the ralink site: http://www.ralinktech.com/ralink/Home/Support/Linux.html. In there you will find a link to the latest rt61 driver. My way of doing it is to open a rooted window and type:
| Code: Download Source Code |
wget http://www.ralinktech.com.tw/data/drivers/2007_1210_RT61_Linux_STA_v1.1.2.0.tar.bz2 tar -vjxf 2007_1210_RT61_Linux_STA_v1.1.2.0.tar.bz2 cd 2007_1210_RT61_Linux_STA_v1.1.2.0/Module |
[edit] Compilation and Build
Once you are in the working folder read the README file if you want some background, here is what you will find in the build document:
| Code: Compile Source Code |
$cp Makefile.4 ./Makefile # [kernel 2.4] $cp Makefile.6 ./Makefile # [kernel 2.6] $cp Makefile.RTL865x ./Makefile # big endian platform [kernel 2.4] $chmod 755 Configure
$make config # config build linux os version
$make all # compile driver source code $make install $cp rt2561.bin /etc/Wireless/RT61STA/ # copy firmware $cp rt2561s.bin /etc/Wireless/RT61STA/ $cp rt2661.bin /etc/Wireless/RT61STA/ $cp rt61sta.dat /etc/Wireless/RT61STA/rt61sta.dat |
[edit] Configuration for WPA
Firstly, emerge wpa_supplicant
emerge -av wpa_supplicant
To configure for use with WPA encryption we need to edit /etc/Wireless/RT61STA/rt61sta.dat:
nano -w /etc/Wireless/RT61STA/rt61sta.dat
For this example I will be using WPA-PSK and TKIP.
| File: /etc/Wireless/RT61STA/rt61sta.dat |
... SSID=YourWirelessSSID NetworkType=Infra Channel=0 AuthMode=WPAPSK EncrypType=TKIP ... WPAPSK=YourSecreteCodeHere ... |
And that's that. Having specified nothing in /etc/conf.d/net in the way of IP addresses, DHCP should be assumed.
To test whether the configuration works, if necessary firstly stop your wired connection.
/etc/init.d/net.eth0 stop
And attempt to start the wireless interface
/etc/init.d/net.ra0 start
If at this stage an IP address is gathered by DHCP, then you're good to go.
You can then add ra0 to automatically start on boot:
| Code: Create symbolic link and add to default runlevel |
ln -s /etc/init.d/net.lo /etc/init.d/net.ra0 rc-update add net.ra0 default |
Add the following line to /etc/conf.d/net to disable dhcp (RutilT will take care of dhcp).
| File: /etc/conf.d/net |
config_ra0=("null")
|
[edit] Kernel 2.6.26
This does not work for kernel 2.6.26+. For kernel 2.6.26 use the CVS nightly version. There is also a CVS daily tarball. Follow the instructions in the readme file.
