Get your Atheros Based Wi-Fi device working in Debian

byo71's picture
Communications | Debian Support

Got a Wi-Fi card you want to use in debian? Many of the cards out there are based on the Atheros chipset. I have 2 myself, the D-Link DWL-G630 PCMCIA card and the Netgear WT311G PCI card.

I have both of them working prefectly.

Make sure you have contrib and non-free added to your sources.list
# nano /etc/apt/sources.list

It should look something like this depending on the mirror you chose

#
# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main

#deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main

deb http://linux.csua.berkeley.edu/debian/ etch main contrib non-free
deb-src http://linux.csua.berkeley.edu/debian/ etch main contrib non-free

deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free

Update your repositories
# apt-get update

Install needed packages
# apt-get install madwifi-tools madwifi-doc madwifi-source wireless-tools module-assistant

Prepare sources
# m-a prepare

Build madwifi source
# m-a a-i madwifi

Load the ath_pci module
# modprobe ath_pci

Make it load at boot time
# echo ath_pci >> /etc/modules

Add a new interface for the wireless card
# nano /etc/network/interfaces
Add this:
auto ath0
iface ath0 inet dhcp

Restart the new interface
# ifdown ath0 && ifup ath0

Scan for networks within range
# iwlist ath0 scan

Connect to an open network
# iwconfig ath0 essid "essid" key open
or with WEP (not sure about WPA, etc.)
# iwconfig ath0 essid "essid" key restricted key_here

The access point should give you an IP address.
# ping google.com

# ping google.com
PING google.com (72.14.207.99) 56(84) bytes of data.
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=1 ttl=236 time=186 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=2 ttl=236 time=98.1 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=3 ttl=236 time=100 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 98.178/128.569/186.795/41.186 ms

WooHoo!!! You now have a working wireless connection in Debian.

Now you can go and tell M$ to go (fill in the blank).