Sunday 13 May 2007

Ubuntu: Enabling wireless on Vaio

Having set up widescreen my next challenge is to set up wireless.

The problem: I can see wireless networks but just can't connect to them.

Disclaimer: I know nothing about Ubuntu, Linux or networking. My approach to these problems is to keep "messing" up until eventually something works (hence F-U buntu). I'm using a Vaio. Follow my advice at your own peril.

Again I start by opening the terminal. Applications>Accessories>Terminal

I then ran the command "lspci" to find out what my computer is running on. You get a long list of nonsense. Right at the bottom you should see something like:

06:04.0 Network controller:

Followed by your network card. Which in my case is:

Intel Corporation PRO/Wireless 2200BG Network Connection

If you can't find it try looking right at the bottom of the list that is generated. If it still is not showing up than ubuntu probably isn't even detecting your wireless card and I'm not sure how your accessing this site at all, but I can't help you.

If you have a different card I don't know whether the following will help you at all. I suggest you try if you like, otherwise do a google search with the name of your card and Ubuntu. Good luck.

Right that should have got rid of everyone with no hope of ever accessing wireless again. Time for the fix.

We need to make sure we have all the tools we need. So in the terminal command ubuntu to go fetch them. First with:

"sudo apt-get install wpasupplicant"

and then:

"sudo apt-get install network-manager-gnome network-manager"

If you are running a recently installed version of Ubuntu feisty you should probably have these but it does not hurt to check ;)

Next we are going to use the gedit command (this is the one that tells Ubuntu to disregard it's better judgement and let you mess with an important file) to change our network interfaces.

As a rule I backup any document that has to be opened with gedit (afterall if Ubuntu thinks it's a bad idea for you to open it, it is probably important and fragile) I have a folder entitled 'Things I might have broken' in my Home folder where I save these.

Create a similar folder then in the terminal input:

"sudo gedit /etc/network/interfaces"

Save this file as xxxbackup into your 'Things I might have broken' folder. Close and then run "sudo gedit /etc/network/interfaces" again.

The file that pops up will contain some couplets (pairs of lines) saying auto lo, auto eth0 or similar.

Put a # next to every line apart from:
auto lo
iface lo inet loopback

The # symbol basically tells Ubuntu to ignore the line-its referred to as commenting because geeky hackers can whack stuff in their code using the # symbol for other geeky hackers to read.

I have no idea why you comment the majority of this document. The tutorial told me to and if you can explain the logic please leave a comment below. Regardless the interfaces document should now look something like this:

auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

#auto eth2
#iface eth2 inet dhcp

#auto ath0
#iface ath0 inet dhcp

#auto wlan0
#iface wlan0 inet dhcp


Save the file and close. (Do not alter the title of this file).

Now for the more involved bit-open Applications>Accessories>Text Editor (do not use open office!)

Input the following:

ENABLED=0

Then save it to your home folder with the title "wpasupplicant"

Next we are going to use a "sudo" command to give Ubuntu a kick up the backside and force it to move the file to where we really want it (the default folder which you can't normally save to).

In the terminal (if you don't know how to open this by now you are lost)..

Input the following command to change the location or path of the document:

"sudo cp /home/wpasupplicant /etc/default"

Basically sudo says DO WHAT I TELL YOU YOU LITTLE WUSS
cp tells it to change the path (or location) of the document
/home/wpasupplicant lets it know the current path
/etc/default lets it know the new path.

Next input the following command-it sounds a little sinister and I have no idea what it does...

"sudo touch /etc/default/wpasupplicant"

(Make sure there is a space between touch and /etc-basic I know but I didn't the first time)

Once this has been done re-start your computer. I had an irrational fear that I wouldn't be able to get back online so I copied all the instructions I was using and saved them to my desktop-those with paranoid leanings might want to do the same.

When you log back in left click the network manager icon in the top right hand corner (you know, the one that looks like two monitors side by side. The one you have clicked about 50 times in futile rage before you found this site).

Select your network from the list. A menu will pop up asking you for your password -ensure you choose the right password type i.e. WEP or HEX (try and look up any info you have from when you first set up your wireless).

It will think for a while and then ask for a password to set up your 'keyring' this is some device that Ubuntu uses to store passwords etc.

Anyway this is all self explanatory and you should now be seeing some blue bars at the top of the screen which mean you are now connected to your wireless network.

Congratulations!

I used the following tutorial as a basis for my post-if I have not been able to help you maybe they will.

If you find this useful please let me know a) what helped and b) what system you are using.

Thanks again to everyone who helped me crack this!

No comments: