2.6.27 kernel note: Everything works properly in 2.6.27 if you compile the kernel with support for rt61 (or your driver). Run make menuconfig in your kernel source directory (usually /usr/src/linux) and locate the RaLink driver you need in Device Drivers -> Network Device Support -> Wireless Lan. It is located at the bottom. If you compile it as a module, remember to modprobe.

Crash note: Pre-2.6.27 (I was using 2.6.26), my PC would simply restart and complain about a Hyper Transport sync flood error once it rebooted (BIOS message). This would happen when the driver was loaded and the card was in use. I have not yet had this problem with the 2.6.27 kernel.

I recently purchased a Linksys wireless PCI card for my home computer and ran into a few problems with the driver installation under Gentoo using a 2.6.26 kernel. A simple “emerge rt61″ command would not work - the sources would not compile. I tried a number of things, including compiling support with the kernel (as included in 2.6.24 and up), but that still did not work.

Yes, this will require some compiling - but don’t be afraid of it. The process is quite simple.

First, to find out if we’re talking about the same type of card here, type lspci as root. Below is my output:

01:07.0 Network controller: RaLink RT2561/RT61 802.11g PCI

RaLink provides open source drivers for this card on their website, however, as I stated above, they do not seem to compile with 2.6.26 kernels. I finally came across the following wiki page:

http://gentoo-wiki.com/HARDWARE_rt2×00

The “Open Source…” section contains the information I used to get my card working. Be sure to read it in addition to this entry, as it provides you with additional information such as necessary kernel configuration options. The wiki page then instructs you to download the open source drivers that pertain to your card from the following website:

http://rt2×00.serialmonkey.com/wiki/index.php?title=Main_Page

In my case, the drivers I needed were “rt61″. Select the drivers that pertain to your system as stated by lspci. Download it, extract it, compile, and install (as root). Be sure to replace the wget URL below with the URL to the CVS tarball you require:


$ wget http://rt2x00.serialmonkey.com/rt61-cvs-daily.tar.gz
$ tar -xzvf *.tar.gz
$ cd rt*/Module
$ make
$ make install

That should be it! Again, as root, attempt to load the kernel module. Again, this will differ based off of the driver you installed:

$ modprobe rt61pci

At this point, the wiki does not go any further. So, if you don’t know how to manually configure wireless network settings, you’re kinda screwed. First, let’s make sure your wireless card is properly recognized:


$ iwconfig
$ iwlist wlan0 scan

When running the first command, you should see additional information next to “wlan0″ or a similar device. When running the second, you should see a list of all available networks within range. If you do NOT, then you may not have set it up correctly. Refer to the wiki and driver documentation for more information.

The problem only is, it is not yet set up. So, let’s get to that. In the Module directory of the tarball you extracted (if you haven’t closed the terminal you ran the make command in, you’re in the correct directory) there is a README file. Direct your attention to the “Configuration” section.

Wireless Configuration - GUI

It provides two options - a GUI or manual configuration. Let’s start with the GUI:

http://rt2×00.serialmonkey.com/wiki/index.php/Downloads

Download the graphical configuration tool. After you extract it, you will have to compile it:


$ ./configure.sh
$ make && make install

You may then run the command rutilt. If it does not recognize the command as root, try running it as a normal user. When needed, it will prompt you for your root password. Use the “Site Survey” tab and click “Scan” to list the available networks. Then, simply select one, enter the necessary information (such as the key, if you have one) and you should be on your way!

Wireless Configuration - Manual & Start on Boot

I noticed that when I upgraded my kernel to 2.6.27 and used the built-in driver rather than the one discussed above, the GUI tool no longer worked. I wanted to abandon it anyway - I didn’t want to set up my configuration every time I started my computer. I wanted it to start up automatically.

I referenced the following link from the Gentoo documentation:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

Take a look over it and decide what method you would like to use. I decided to go with wireless-tools. In the example below, I am using DHCP to keep things simple. If DHCP works for you, then you can get into manually configuring your IP address. Again, refer to the documentation for more information, as this is just an example and provides little explanation.

In the example below, the ESSID I’m attempting to connect to is “Gerwitz Wireless Network” which uses an open WEP ASCII key. I replaced my actual key below with “XXXXX”.


$ emerge -av wireless-tools
$ vi /etc/conf.d/net

—–

/etc/conf.d/net:

modules=( "iwconfig" );

key_Gerwitz_Wireless_Network=”[1] s:XXXXX key [1] enc open”

preferred_aps=( “Gerwitz_Wireless_Network” )

config_Gerwitz_Wireless_Network=( “dhcp” )
fallback_Gerwitz_Wireless_Network=(” 192.168.1.10/24″ )
fallback_route_Gerwitz_Wireless_Network=( “default via 192.168.1.1″ )

—–


$ /etc/init.d/wlan0 restart
* Caching service dependencies ... [ ok ]
* Bringing down interface wlan0
* Bringing up interface wlan0
* Configuring wireless network for wlan0
* Scanning for access points
* Found “Gerwitz Wireless Network” at 00:15:E9:76:1A:EE, managed, encrypted
* Connecting to “Gerwitz Wireless Network” in managed mode (WEP enabled - open) … [ ok ]
* wlan0 connected to SSID “Gerwitz Wireless Network” at 00:15:E9:76:1A:EE
* in managed mode (WEP enabled - open)
* dhcp …
* Running dhcpcd …
wlan0: dhcpcd 4.0.1 starting
wlan0: broadcasting for a lease
wlan0: offered 192.168.1.103 from 192.168.1.1
wlan0: checking 192.168.1.103 is available on attached networks
wlan0: acknowledged 192.168.1.103 from 192.168.1.1
wlan0: leased 192.168.1.103 for 10800 seconds [ ok ]
* received address 192.168.1.103/24 [ ok ]

Remember to replace “wlan0″ with your interface. It should now start up on boot.

Granted, this guide does not cover everything - it is simply to help you to get your card working.