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

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
zeesson

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

Post by zeesson »

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

Code: Select all

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.

Code: Select all

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}=="<your mac 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

Code: Select all

sudo rmmod ath_pci
sudo pkill wpa
and then reprobe the module

Code: Select all

sudo modprobe ath_pci
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Husse

Re: Dlink DWA-552, 556 and other Atheros chipsets using Madwifi

Post by Husse »

Fine - I made it sticky
BAD

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

Post by BAD »

That is why I do not buy D-Link
zeesson

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

Post by zeesson »

BAD wrote:That is why I do not buy D-Link
n an effort to prevent this thread from becoming convoluted and cumbersome, and to increase our ability to deliver assistance to the inexperienced in a clear and concise manner; I respectfully request that you only post replies that directly concern problems with the guide or constructively add to the discussion.

Seeing as how someone who needs this guide has probably already purchased a D-link card, I dont think your comment is very constructive.

P.S. a thank you or two would be nice as well
awong
Level 2
Level 2
Posts: 55
Joined: Sat Jun 02, 2007 3:06 pm

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

Post by awong »

Thank you for spending time to post this information. It is very clear and concise. I used the instructions in the first post with my new D-Link DWA-552 wireless card and it works fine with Linux Mint 4 so far. I believe it is working in G mode and not N. The madwifi site seems to be down often as of late, but this morning I was able to successfully connect and complete the setup.

For (newbies like) me, ath0/wlan0 (I changed it to wlan0) does not display/register an inet address until you actually connect to a server/router using the network configuration in the administration application tools. I spent some time fumbling around wondering why /sbin/ifconfig was not giving me an IP address for my wireless card. I used the network manager that came with Mint.

Cheers!
awong
Level 2
Level 2
Posts: 55
Joined: Sat Jun 02, 2007 3:06 pm

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

Post by awong »

Unfortunately I upgraded to Mint 5 R1 and my DWA-552 no longer works, despite a post at the madwifi compatibility page. Perhaps because the reporter's OS was Gentoo; Hardy Heron seems to have broken compatibility. :(

:idea: *New Edit* re: D-Link DWA 552 chipset AR5008 (AR5416) wireless problems in Ubuntu (Mint) using madwifi

I'm suspecting that my problems may be due to the updates to the madwifi trunk breaking compatibility with the AR5008/AR5416 chipset, and not because of Ubuntu/Mint Hardy Heron. And yes, my wireless works fine under Windows XP.

I've noticed in the madwifi tickets that AR5008/AR5416 wireless was functioning and had been broken in the past due to updates but the regressions were fixed. Also, in my previous install on 2008.06.22, my D-Link DWA-552 was working with wireless G with Linux Mint 4 (Ubuntu Gutsy) and the madwifi drivers. Also, I connected with the Gnome Network Manager, but I do find that wicd remembers WAP2 passwords even if connections don't occur.

So far I've been able to see my WAP2 protected D-Link DIR-655 router - receive transmissions - but not able to send any data, i.e., trying to connect to the router. I suspect that if I find a snapshot close to the date where I or others got their wifi working, I will be in business. Unfortunately, I've messed up my kernel and it's refusing to install the ath0 drivers (possibly due to compiling older madwifi snapshots over newer ones) so I'm going to reinstall Gutsy (Mint 4). I may also try this with Hardy Heron, since I recall others had it working in that and in other distros; see http://madwifi.org/wiki/Compatibility/D-Link#DWA-552. If I have any success, I'll report back.

DWA-552 reported working from various sources (googled)
r3123 - ubuntu 7.10 - by Komadyret
r3620 - ubuntu 8.04 x86_64, Gentoo - madwifi
r3658 - ubuntu 8.04 x86_64, Gentoo - madwifi

Links:
madwifi trunk snapshots for compiling into the kernel:
http://snapshots.madwifi.org/madwifi-trunk/

madwifi D-Link compatibility page (DWA-552):
http://madwifi.org/wiki/Compatibility/D-Link#DWA-552

zeesson's instructions on how to connect the DWA-552 with the madwifi drivers:
Mint forum:
http://linuxmint.com/forum/viewtopic.php?f=53&t=10209
Ubuntu forum (archived but more replies):
http://www.ubuntu-forum.com/showthread.php?t=718244
awong
Level 2
Level 2
Posts: 55
Joined: Sat Jun 02, 2007 3:06 pm

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

Post by awong »

Great news! Atheros has released free linux drivers for 802.11n devices. Supported chips will include:

* AR5418+AR5133
* AR5416+AR5133
* AR5416+AR2133
* AR9160
* AR9280
* AR9281

The news on the madwifi site:
http://madwifi.org/wiki/news/20080725/a ... driver-for

More info:
http://wireless.kernel.org/en/users/Drivers/ath9k

I guess I can rest easy tonight knowing that this is being developed with Atheros! :mrgreen:


*Edit 20080801*
Tutorial of how to install the ath9k drivers (I have not been able to successfully compile the kernel to work with the ath9k drivers, yet):
http://www.thinkwiki.org/wiki/How_to_in ... n_of_atk9k
The driver will be embedded in either the .27 or .28 kernel, so if I can't get this working, hopefully I won't have to wait too long...


*Edit 20080813*
After many attempts at compiling the latest ath9k drivers into a newer kernel (and loading up a new linux OS several times), I have gone back to my tried and trusty Mint 4 (gutsy) setup. The ath9k drivers are still new and buggy anyways. For the past few days I had been using wired and sadly reading DWA-552 success stories with older madwifi drivers and Ndiswrapper. Then it occurred to me - try out a newer version of Ndiswrapper! Using the info from:
https://help.ubuntu.com/community/WifiD ... diswrapper
I unload the older 1.43 version and loaded the 1.53 version, used the net5416.inf from the cd's drivers, and voila, WAP2 connection (as I am posting this)! I will report back later to see if this connection is stable, as I have read that others have had their connections drop out after a few hours. Initially, my madwifi setup had become unstable after several weeks of use (I can't repeat this since I can no longer get madwifi working with my DWA-552).


*Edit 20080817*
I have finally decided to stay with a compiled 2.6.27-rc3 kernel utilizing ath9k drivers for my production system, as I have found ath9k to be more stable than Ndiswrapper for my particular setup:
http://linuxmint.com/forum/viewtopic.php?f=53&t=15874

I had to remove and reload the Alsa sound system which in turn removed the original Mint gdm so I have obvious traces of ubuntu in my system now - minor problem. Also, I have had difficulty installing Nvidia 3d effects as I haven't compiled the latest drivers with the 27-rc3 kernel - again, I can live without them for now.
awong
Level 2
Level 2
Posts: 55
Joined: Sat Jun 02, 2007 3:06 pm

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

Post by awong »

Just an update as it has been awhile. As of today, I am now using Linux Mint 6 with the ath9k drivers as described at http://wireless.kernel.org/en/users/Download
with my D-Link wireless cards DWA-552, DWA-652, and DWA-643 with a fair amount of success. The connection is almost always 100% (granted I'm not too far from my router) but the connection speed still mentions 1 Mb/s (don't know if that's correct); continuous tweaking by the wireless team occasionally had broken the driver in the past but so far, so good for now. The driver appears to be maturing well for D-Link wireless cards. :D
Koninator

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

Post by Koninator »

I have followed instructions but I get this output:

koninator-laptop ~ # sudo modprobe ath_pci
koninator-laptop ~ # /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:21:70:8f:ec:cd
inet addr:164.8.7.88 Bcast:164.8.7.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1727013 errors:0 dropped:4043883972 overruns:0 frame:0
TX packets:1194364 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2203512806 (2.2 GB) TX bytes:758157522 (758.1 MB)
Interrupt:220 Base address:0xe000

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:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3056 (3.0 KB) TX bytes:3056 (3.0 KB)

koninator-laptop ~ #

i have atheros Wireles card. AR5008 ( Dell vostro A860 laptop ).
koninator-laptop ~ # lspci | grep -i net
09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)
0c:00.0 Network controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
awong
Level 2
Level 2
Posts: 55
Joined: Sat Jun 02, 2007 3:06 pm

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

Post by awong »

Current stable compat-wireless for kernels >= 2.6.27 (works with Linux Mint 7) at:
http://linuxwireless.org/en/users/Download/stable/

I did not need to add any extra apps for this to work. After building, installing, and loading (all explained at the above link), I no longer experience hardware freezes or connection drops. The driver is still being updated, but the current stable version is, well, stable for me. :D
jpete

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

Post by jpete »

zeesson wrote:

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$
What happens when you get this...
jeff@jeff-desktop ~/madwifi $ svn co http://svn.madwifi.org/madwifi/trunk
svn: OPTIONS of 'http://svn.madwifi.org/madwifi/trunk': Could not resolve hostname `svn.madwifi.org': Host not found (http://svn.madwifi.org)
blesb0k

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

Post by blesb0k »

After much struggling with Ndiswrapper, ath5k and the AR5001 (D-Link DWL-G520), I'm thankful to have it working.

Ndiswrapper worked with the Winxp files on the CD. But an LM upgrade broke it (actually, Ndiswrapper broke itself on the upgrade). The ailment? AP was not associating, or staying associated. What's the point of using Ndiswrapper if you can upgrade with it and not use it after the upgrade? was my motive to try to get the native ath5k driver working. Note, a non-secured connection was going to suffice for me.

With ath5k, it looked good, until the AP association was attempted. Error message from dmesg read: wlan0: disassociating by local choice (reason=3) It turned out wpa_supplicant was meddling. Since wpa was not required, this attempt at disabling it succeeded: cp /etc.dbus-1.system.d/wpa_supplicant.conf /home/blesbok/backup/etc.dbus-1.system.d.wpa_supplicant.conf
sudo rm /etc.dbus-1.system.d/wpa_supplicant.conf Rebooted and WLAN! After upgrading (today), there was a crash on bootup, followed by no more WLAN (same AP disassociation). In that same directory, I backed up and removed avahi-dbus.conf; rebooted. WLAN worked, after which I replaced said file. Seems to keep working.
lordalpha1

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

Post by lordalpha1 »

my internal wired modem is screwed. any way i can do this w/o a hard wired internet?
Locked

Return to “Networking”