So I wanted to move my computer into another room. The problem is tha I will need to install a wireless card to keep myself on the network. Does Linux even support wireless yet? And I want WPA encrpytion on top of that too.
Well the answer seems to be yes, sorta, sometimes, if your lucky. So I hunted around and pulled out a DWL-G510 (HW Ver: C2), stuck it in the computer and lspci gives me:
00:09.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
Installing Driver
The card contains an RaLink chipset. There are 3 drivers available:
- Rt2×00 project also has the rt2×00 driver v2.0.0-b3
- Rt2×00 project has legacy RT61 driver v1.1.0-b1
- Ralink has v1.0.4, download here
The first driver from the Rt2×00 project (available in portage, net-wireless/rt2×00) didn’t work at all. I could load the driver, but scanning produced no result.
The second driver (available in portage, net-wireless/rt61) loaded fine, and I could gain a connection with no encryption and WEP encryption, but no matter what combination I used, I couldn’t get WPA to work.
The third driver I downloaded from Ralink’s website and with a little bit of fiddling, I am able to load it and connect using WPA encryption.
Wireless Configuration
I used the following commands to successfully connect to my Netgear DG834G wireless hub:
#!/bin/sh
modprobe rt61
sleep 3
ifconfig ra0 up
iwlist ra0 scan
iwpriv ra0 set NetworkType=Infra
iwpriv ra0 set AuthMode=WPAPSK
iwpriv ra0 set EncrypType=TKIP
iwpriv ra0 set SSID="network name"
iwpriv ra0 set WPAPSK="my passphrase"
iwpriv ra0 set SSID="network name"
After probing the device, I had to sleep otherwise the device didn’t come up correctly. Substitute “network name” with your own, and “my passphrase” with the WPA-PSK passphrase.
Final
I haven’t quite figured out how to get all this to work using the Gentoo standard network init script. The main problem seems to be that the network interface needs to be activated before it had be configured. For now I’m just happy I don’t have to run a 50 meter extension cable through my house.