Although Ralink based wireless cards have a nice open source driver, things aren’t all rosy with them on Ubuntu 7.04, aka Feisty Fawn. This in part due to Ubuntu’s switch to using Network Manager (nm) for network connections. In theory, selecting manual configuration from nm should allow you to setup your rt2x00, t2570, rt61 or rt73 device pretty easily. Unfortunately for many, including me, this didn’t work.

Working around the problem isn’t too hard though, and that’s why I’m posting this. The good news is that the current development release of Ubuntu, Gutsy Gibbon, should make things much easier. More on that at the end.

On with the How-To:

The secure way
Create a file with a short set of commands that will get your wireless – hopefully – working.

Applications > Accessories > Terminal (don’t be scared, it’s really quite easy)
cd /etc/init.d/
gksudo gedit wireless-up

Copy and paste the following into Gedit…
#!/bin/dash
ifconfig ra0 down
iwconfig ra0 essid "your essid"
iwconfig ra0 key "your wep key if you have one"
ifconfig ra0 up
dhclient3 ra0

Then change the essid and WEP key (put s: before the key if it’s not in hex format). If you use WPA, check the Ubuntu wiki for what needs to be different, shouldn’t be much.

Save the file as wireless-up. Now, you make the file executable and just make a link to that file in the initialisation scripts that run during boot up.

sudo chmod o+x ./wireless-up
cd /etc/rc2.d/
sudo ln -s /etc/init.d/wireless-up ./S14wireless-up

Now you could just reboot, but entering ‘sudo /etc/init.d/networking restart’ should apply the changes without doing that. Ahh, the beauty of Linux. If your card picks up an IP address and gives you access to the internet, the procedure has worked and you can remove nm.

sudo apt-get remove network-manager network-manager-gnome

If you change encryption keys regularly, or hop between different access points, you might find editing /etc/init.d/wireless-up a little inconvenient. If so, the next section is for you.

The insecure way
This method is very dangerous and I probably shouldn’t include it. But for your sake, I have. Any command in the file below will be run at boot time. Anyone with user access could wipe your whole system or steal sensitive data, you have been warned!

Instead of creating the file /etc/init.d/wireless-up, you can create the file in your home directory so that it’s quick to edit any time you want, without the command line.

Alt+F2 > gedit > paste the commands in…
#!/bin/dash
ifconfig ra0 down
iwconfig ra0 essid "your essid"
iwconfig ra0 key "your wep key if you have one"
ifconfig ra0 up
dhclient3 ra0

Save the file as .wireless-up in /home/yourusername/
The . makes it hidden, Ctrl+H in the file manager to show the hidden files when you need to.
Then create the link using the terminal.
cd /etc/rc2.d/
sudo ln -s /home/yourusername/.wireless-up ./S14wireless-up

To change your essid or encryption key, show hidden files in the file manager, right-click on .wireless-up > open with Text Editor.

I really recommend the first method, it’s still simple to make changes through the terminal.
gksudo gedit /etc/init.d/wireless-up
or
sudo nano /etc/init.d/wireless-up
Ctrl+O, Crtl+X

Hope that helps a few people.

Credit goes to David Gerard in an Ubuntuforums thread

Back to Gutsy Gibbon. As of Tribe 2 (2nd alpha) the Ralink devices don’t work out of the box, but that was due to a simple mistake due to be corrected. This gave me a chance to try downloading the new driver and installing it myself. From within a Live-CD session I was quickly and easily able to install the new driver (that should be in Gutsy soon) and connect to my wireless network…using Network Manager!

Things are looking up.

Share and Enjoy:
  • Identi.ca
  • Technorati
  • Facebook
  • email
  • Google Bookmarks
  • Digg
  • Twitter