Friday, August 22, 2008

HOWTO:Dlink DWA-552, 556 +more Atheros chipsets with Madwifi

This is simply how i got my DWA-552 and DWA-556 (Atheros chipset 5416/5418 to work for me in Linux MInt 4.0 and Ubuntu Gutsy. consistently using madwifi (a native linux driver specifically developed for atheros chipsets) which is arguably a better choice than the alternative ndiswrapper(basically a workaround that allows you to use SOME windows drivers in Linux. First please be patient with me as I am far from a Guru as far as Linux is concerned, but I will help you the best way I can and if I cannot then hopefully someone else can.


YOU WILL TEMPORARILY NEED A HARD WIRED INTERNET CONNECTION FOR THIS GUIDE


Note: Press ENTER after each line command
first open up a terminal and in it type the following:

You dont have to install module-assistant, but i believe it helps

sudo apt-get install module-assistant
sudo m-a prepare


if you prefer or if this is not working for you you can open up Synaptic package manager in the System tools menu and install module assistant that way same goes for libc6-dev

sudo apt-get install libc6-dev

you may be asked for a password. (sudo) allows you to execute commands as root without having to be constantly logged in as root (which would be a little dangerous) Enter the same password that you logged into the computer with.

libc6-dev will allow you to compile madwifi.

next install subversion which will allow you to retrieve the nightly snapshot of madwifi.

sudo apt-get install subversion

next we are going to create a directory where madwifi will be downloaded to and then we will change to that directory.

mkdir madwifi
cd madwifi

f you did this correctly your terminal should look like this

(username)@(computername):~/madwifi$

next we will download the madwifi snapshot

svn co http://svn.madwifi.org/madwifi/trunk

HOWTO:Dlink DWA-552, 556 +more Atheros chipsets with Madwifi

Postby zeesson on Fri Mar 07, 2008 10:31 pm

This is simply how i got my DWA-552 and DWA-556 (Atheros chipset 5416/5418 to work for me in Linux MInt 4.0 and Ubuntu Gutsy. consistently using madwifi (a native linux driver specifically developed for atheros chipsets) which is arguably a better choice than the alternative ndiswrapper(basically a workaround that allows you to use SOME windows drivers in Linux. First please be patient with me as I am far from a Guru as far as Linux is concerned, but I will help you the best way I can and if I cannot then hopefully someone else can.


YOU WILL TEMPORARILY NEED A HARD WIRED INTERNET CONNECTION FOR THIS GUIDE


Note: Press ENTER after each line command
first open up a terminal and in it type the following:

You dont have to install module-assistant, but i believe it helps
Code: Select all
sudo apt-get install module-assistant
sudo m-a prepare


if you prefer or if this is not working for you you can open up Synaptic package manager in the System tools menu and install module assistant that way same goes for libc6-dev

Code: Select all
sudo apt-get install libc6-dev

you may be asked for a password. (sudo) allows you to execute commands as root without having to be constantly logged in as root (which would be a little dangerous) Enter the same password that you logged into the computer with.

libc6-dev will allow you to compile madwifi.

next install subversion which will allow you to retrieve the nightly snapshot of madwifi.

Code: Select all
sudo apt-get install subversion


next we are going to create a directory where madwifi will be downloaded to and then we will change to that directory.
Code: Select all
mkdir madwifi
cd madwifi

if you did this correctly your terminal should look like this

(username)@(computername):~/madwifi$

next we will download the madwifi snapshot

Code: Select all
svn co http://svn.madwifi.org/madwifi/trunk


when it is done you should see:

checked out version number ####

(username)@(computername):~/madwifi$



Next we will enter the directory that was created when we downloaded the snapshot and start to compile

cd trunk

your terminal should look like this

(username)@(computername):~/madwifi/trunk$

and then compile

sudo make

NOTE this will take a 10-30 seconds

NOTE: before we move on know that you should not have gotten ANY errors while compiling if you did. Then stop and try again, if that doesnt work then explain you error here. Now for those who did not recieve any errors the next step is to install madwifi

sudo make install

NOTE:you may get a message that says that madwifi drivers are already installed from an older installation and gives you the option to either remove them, ignore them or exit. type the letter r and then press ENTER to remove the old drivers and install the new ones.

if you dont get this message fine move on to the next step


Next you will have to add an entry to your /etc/network/interfaces file in order to be able to bring up the device. To make use of wpa_supplicant in roaming mode.

gksudo gedit /etc/network/interfaces

HOWTO:Dlink DWA-552, 556 +more Atheros chipsets with Madwifi

Postby zeesson on Fri Mar 07, 2008 10:31 pm

This is simply how i got my DWA-552 and DWA-556 (Atheros chipset 5416/5418 to work for me in Linux MInt 4.0 and Ubuntu Gutsy. consistently using madwifi (a native linux driver specifically developed for atheros chipsets) which is arguably a better choice than the alternative ndiswrapper(basically a workaround that allows you to use SOME windows drivers in Linux. First please be patient with me as I am far from a Guru as far as Linux is concerned, but I will help you the best way I can and if I cannot then hopefully someone else can.


YOU WILL TEMPORARILY NEED A HARD WIRED INTERNET CONNECTION FOR THIS GUIDE


Note: Press ENTER after each line command
first open up a terminal and in it type the following:

You dont have to install module-assistant, but i believe it helps
Code: Select all
sudo apt-get install module-assistant
sudo m-a prepare


if you prefer or if this is not working for you you can open up Synaptic package manager in the System tools menu and install module assistant that way same goes for libc6-dev

Code: Select all
sudo apt-get install libc6-dev

you may be asked for a password. (sudo) allows you to execute commands as root without having to be constantly logged in as root (which would be a little dangerous) Enter the same password that you logged into the computer with.

libc6-dev will allow you to compile madwifi.

next install subversion which will allow you to retrieve the nightly snapshot of madwifi.

Code: Select all
sudo apt-get install subversion


next we are going to create a directory where madwifi will be downloaded to and then we will change to that directory.
Code: Select all
mkdir madwifi
cd madwifi

if you did this correctly your terminal should look like this

(username)@(computername):~/madwifi$

next we will download the madwifi snapshot

Code: Select all
svn co http://svn.madwifi.org/madwifi/trunk


when it is done you should see:

checked out version number ####

(username)@(computername):~/madwifi$



Next we will enter the directory that was created when we downloaded the snapshot and start to compile

Code: Select all
cd trunk


your terminal should look like this

(username)@(computername):~/madwifi/trunk$

and then compile

Code: Select all
sudo make


NOTE this will take a 10-30 seconds

NOTE: before we move on know that you should not have gotten ANY errors while compiling if you did. Then stop and try again, if that doesnt work then explain you error here. Now for those who did not recieve any errors the next step is to install madwifi

Code: Select all
sudo make install


NOTE:you may get a message that says that madwifi drivers are already installed from an older installation and gives you the option to either remove them, ignore them or exit. type the letter r and then press ENTER to remove the old drivers and install the new ones.

if you dont get this message fine move on to the next step


Next you will have to add an entry to your /etc/network/interfaces file in order to be able to bring up the device. To make use of wpa_supplicant in roaming mode.

Code: Select all
gksudo gedit /etc/network/interfaces


this will open up a text document all you need to do is copy and paste the following into this text file after the text that is already there:

#Wireless
noauto ath0
allow-hotplug ath0

iface ath0 inet manual
wpa-driver madwifi
wpa-roam /etc/network/wpa_supplicant.conf

iface default inet dhcp



Now save and close that text file.

Now all that is left to do is probe the module

sudo modprobe ath_pci
/sbin/ifconfig

you should now see your network connections it should look something like this

ath0 Link encap:Ethernet HWaddr 00:19:7E:41:09:C1
inet addr:192.168.0.102 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:316176 errors:0 dropped:0 overruns:0 frame:0
TX packets:562494 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:54115716 (51.6 MiB) TX bytes:823180275 (785.0 MiB)



eth0 Link encap:Ethernet HWaddr 00:15:58:86:70:EE
inet addr:192.168.0.119 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Base address:0x2000 Memory:ee000000-ee020000



lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1420 errors:0 dropped:0 overruns:0 frame:0
TX packets:1420 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:182621 (178.3 KiB) TX bytes:182621 (178.3 KiB)



wifi0 Link encap:UNSPEC HWaddr 00-19-7E-41-09-C1-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:462907 errors:753 dropped:0 overruns:0 frame:182
TX packets:563036 errors:6 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:91695661 (87.4 MiB) TX bytes:846831037 (807.6 MiB)
Interrupt:21


It's the ath0 interface that you're after for actually configuring whatever network manager you choose to use. Personally I use Wicd (which you can get form here http://wicd.sourceforge.net/download.php) use the instructions for Ubuntu

NOTE you will have to uninstall network-manager from Synaptic (mentioned above) in order to use Wicd as your network manager

Ignore the wifi0 it is just the binary hal interface. Enjoy

I tried my best to put this together "in a simple new user style" with info i got from a bunch of different places mainly the ubuntu forums, thinkwiki, and madwifi.org. any extra input would be appreciated

Remember "Each One Teach One"





Troubleshooting
If you're having trouble getting the ath0 interface to show up on a regular ifconfig, but can see it if you do an ifconfig -a and nothing seems to be happening with wpa_supplicant, the solution (for some unknown reason) is to rename ath0 to wlan0. This is easily done by modifying the udev rule.

gksudo gedit /etc/udev/rules.d/70-persistent-net.rules
this will open up a text document you should see a line that looks similar to this

# PCI device 0x168c:0x0024 (ath_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="", ATTR{type}=="1", NAME="ath0"

All you need to do is change the "ath0" to "wlan0"

save and close the document and then remove the module with

sudo rmmod ath_pci
sudo pkill wpa


and then reprobe the module


sudo modprobe ath_pci

No comments: