Monday, June 02, 2008

64-Bit Wireless Atheros Using Ubuntu 8.04 LTS

I finally got back to attempting to get the wireless capability working on my Toshiba A215-54747 64-bit Turion laptop equipped with Atheros wireless. The following instructions build on the shoulders of others whose recommendations were gleened from Ubuntu's own forums.

My value add will be to introduce as much clarity to the process as I can to what worked for me.

Prerequisites (silly as some may seem):
The Toshiba has a built-in toggle switch mid-way under the front edge of lighting that enables wireless. You can tell its activated when an orange LED is lit just under the edge of the front of the unit. Make sure its on.
You will need to have a wired internet connection to update the system and to download wireless application necessities. Connect your laptop until wireless installation is completed.
Many instructions talk about the Atheros Hardware access Layer (HAL) driver found under System->Hardware Drivers. It can be disabled or enabled. If enabled it will simply say Not in use after we're done.


Let's be sure that the system is up-to-date. Open up a command line terminal (application-> Accessories -> Terminal) and type:

sudo apt-get install build-essential
In that same Terminal window type: ifconfig

You will get a series of lines about network devices.

The important line we are looking for looks like: eth0 Link encap:Ethernet HWaddr nn:nn:nn:nn:nn:nn

The hexadecimal numbers in the nn:nn:nn:nn:nn:nn sequence are the MAC address for your wireless card. Write this down and put it to one side.
In the same terminal window type: pwd

This will show you your home directory - something like home/your_name

This is where we will move all our downloaded software.

Make sure your browser preferences send downloads to your desktop.
Now we will prevent the default driver from intercepting our desired driver. In the Terminal window type exactly:

echo "blacklist ath_pci" | sudo tee -a /etc/modprobe.d/blacklist

Close your terminal window.

Download the following to your desktop (so we can see that we have the right stuff).
Open firefox and go to:

http://blakecmartin.googlepages.com/ar5007eg-64-0.2.tar.gz

You will be asked to save the file so do so.



Go to:

http://ndiswrapper.sourceforge.net

Click on Downloads and download the latest stable version of the product.
Close your browser. You should now see two tar files on your desktop.

On the main Ubuntu menu click Places->Home which will open up your home directory. Drag and drop both tar files there.
Open another Terminal window. You will be in your home directory. We will now install the 64-bit wireless driver and the application.

Type exactly:

tar xvf ar5007eg-*.tar.gz

then:

tar xvf ndiswrapper-1.53.tar.gz

In both these commands the file names must match the file names of the tar files you downloaded.
Finally, type:

sudo aptitude update

sudo aptitude install linux-headers-$(uname -r) build-essential

sudo apt-get install ndisgtk


Install the wireless driver:
On the Ubuntu menu, click System->Administration->Windows Wireless Drivers

Her you will click Install New Driver and navigate to the ar5007eg-64-0.2/ar5007eg directory that holds the net5211.inf file. Click on the .inf file.
In the terminal type:

sudo gedit /etc/network/interfaces

Once in the file add the following line:

pre-up/sbin/ifconfig wlan0 hw ether nn:nn:nn:nn:nn:nn

where the nn:nn:nn:nn:nn:nn sequence is the MAC address you captured from your machine at the very beginning of these instructions. Save the file.

If you have difficulty saving the file go to the /etc/network directory and change the permissions on the interfaces file using chmod to let you write to the file.
Disconnect the hard wire internet connecton. Restart the system.
After the restart, on the Ubuntu menu, locate the internet connection micro-icon (a set of bars or repeating terminals) and set it to wireless.
This worked beautifully in my experience.

12 comments:

db said...

Thanks a lot! I've been to several different sites trying to step me through this process, and this is the first combination that's actually worked (Acer Aspire 5520). I had to play with a few settings: for instance, the MAC address I caught in the early steps didn't work (and only after I connected and disconnected a Linksys USB WIFI adapter was I able to find the correct MAC address) but we're in business now.

Again, thanks. I'm glad to get this thing up and running on a wireless connection.

Anonymous said...

You are a lifesaver!

I am using an HP dv6768se and all the steps above work perfectly when followed exactly as stated. There were no changes necessary for different brand laptop.

Anonymous said...

You are a lifesaver!

I followed these steps exactly and successfully enabled the onboard wireless card on my HP dv6768se notebook using ubuntu 8.04. I had tried several other step by step posts but none had worked until this. Again, thank you!

Anonymous said...

well it dit work 4 me 4 a while up until the reBOOT the nothing it finds the connektion but does not connet...

hepl Any 1???

Frank Krasicki said...

Sounds like the wireless setting is not setup.

Re-read the final instructions. There is an icon on the menu bar that establishes how the machine is connecting to the internet.

It needs to be set to wireless.

Poke around a bit. I think you have it but are one step away from activating the connection.

Anonymous said...

it is set to wireles but there is nothig in Wireles Networks?

and yes im a noob...

Frank Krasicki said...

It sounds as if the wireless worked once.

You may have done this step wrong:

"Once in the file add the following line:

pre-up/sbin/ifconfig wlan0 hw ether nn:nn:nn:nn:nn:nn

where the nn:nn:nn:nn:nn:nn sequence is the MAC address you captured from your machine at the very beginning of these instructions. Save the file."

the nn sequence is your MAC address not literal nn's.

This step on a reboot assigns the MAC address and you may not be getting it.

Also the blacklist command miust be accurate.

Other than that I don't know what to say.

Anonymous said...

pre-up/sbin/ifconfig wlan0 hw ether nn:nn:nn:nn:nn:nn i dit that and it was the same as before. The wireless and wired are boht roaming. Something god deleted and i cant remember where it was but i remember that it had 2 do whit my network cos i cant conect whit my modem.

any ideas???

Anonymous said...

wireles networks is EMPTY how can i my network there? the noob again

Anonymous said...

Thanks for this article! Wireless now works for me with one small catch.

This worked wonderfully if I start with the wired network attached, I was able to select my wireless network & unplug the ethernet cable, and wireless worked fine.

However, if I boot WITHOUT the ethernet cable plugged in, wireless refuses to attach until I have plugged in & connected to the wired connection at least once. I think this is the problem the other anonymous poster is describing

Also, the WPA key won't stay set. Once I have wireless going, if I right-click on the network icon & select 'edit wireless networks', the password for my preferred network is set to some crazy value and not the WPA key I originally set.

Thanks again for the info.

Anonymous said...

ok so everything went fine no problems until the restart. now ive read all the comments and none of them are really similar. I have the option to connect to a wired connection and a point to point connection and nothing else. no wireless icons no wireless options nothing. i have an hp dv6000... i dont know what to do maybe i just got the wrong driver?

Justin said...

I am very new to Kubuntu (currently on 8.04 after not feeling right with 8.10). I have jumped on linux before with different distros over the years trying to get the hang of things and seems Kubuntu is finally the winner. With that said I am still new on getting things to work and all the howto's i've found for this specific card have been horrific and epic fails.

This howto though is perfect! Its great its written specifically step by step with including the commands. I have noticed the biggest step is the first step to record the mac and the very last step is what every other howto I have found had missed to mention! I am up and running now though thanks to you!