Wednesday, April 2, 2008

2.6.25-rc8, Ralink, and wpa_supplicant

Most people know that getting wireless networking working in Linux (especially with native, open-source drivers) is one of the last great hurdles for Linux to overcome. We are doing some moving around in the house. Rather than punch holes in the walls for cat5, I decided to get a wireless card for my kids' computer and see if I could get it set up. I got a Linksys WMP54G v4.1 which uses a Ralink chipset which in turn has open source drivers. Initially, I tried to just compile the rt61 driver and a modified version of wpa_supplicant for WPA support. I just couldn't get it to work.

I read that the Ralink drivers entered the kernel itself with the release of 2.6.24. Unfortunately, the drivers in that kernel version are buggy. I heard that the drivers in the 2.6.25 release candidates were much better. So, I downloaded the 2.6.24 source, patched it to 2.6.25-rc8, did a "make oldconfig" making sure to tell it to compile the Ralink drivers as modules, and let it compile overnight (Celeron 400s don't compile kernels that rapidly). In the morning, I got everything installed. I then compiled and installed wpa_supplicant 0.5.10.

The final hurdle was configuring wpa_supplicant and Slackware 12.0's networking scripts. Here is the bits from /etc/rc.d/rc.inet1.conf:

IFNAME[4]="wlan0"
IPADDR[4]="192.168.1.4"
NETMASK[4]="255.255.255.0"
USE_DHCP[4]="no"
DHCP_HOSTNAME[4]=""
WLAN_ESSID[4]="My SSID"
WLAN_MODE[4]=Managed
WLAN_WPA[4]="wpa_supplicant"

This configured Slackware to give me a static IP and use wpa_supplicant to take care of WPA encryption. Here is the bits from /etc/wpa_supplicant.conf:

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
scan_ssid=1
ssid="My SSID"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk=password
}

I had to add scan_ssid=1 because my router does not broadcast its SSID. That way the network would come up properly on boot. Replace "password" with the output of wpa_passphrase. Obviously in both cases you'd need to enter the actual SSID.

Now everything works great! I can download stuff at my cable connection's maximum speed. I'll need to test it for a while for stability, but so far it seems great. The only other problem I had is that the NVIDIA drivers require a patch to compile with the 2.6.25 release candidates. You can imagine how long it took me to figure that one out.

No comments: