setup of an Atheros based wireless card PDF Print E-mail
Friday, 28 October 2005
setup of an Atheros based wireless card (DLink DWL-G520) under Debian linux with kernel 2.6.0

first of all get the following packages (partly from backports.org if you are running debian woody):

  • kernel-headers-2.6.0-1-386
  • kernel-headers-2.6.0-1
  • kernel-image-2.6.0-1-386
  • kernel-source-2.6.0
  • kernel-tree-2.6.0
  • kernel-package
  • sharutils

...have only tried this with kernel 2.6.0 so far, good luck for any other version ;-)

after installing all this stuff boot into the new kernel...

now extract the kernel-sources and copy the config file of the kernel-image package

cd /usr/src/
tar xfvj kernel-source-2.6.0.tar.bz2
cd kernel-source-2.6.0
cp /boot/config-2.6.0-1-386 .

now before re-building the kernel, I modified /etc/kernel-pkg.conf to include the line:

do_clean := No

this is necessary because the madwifi driver wants some built executables for compiling

now re-build the kernel

make-kpkg kernel_image

after that create a symbolic link that the madwifi driver finds the missing piece

ln -s /usr/src/kernel-source-2.6.0/vmlinux /lib/modules/2.6.0-1-386/build/vmlinux

 

after this has finished we need to get the latest madwifi cvs source with the command:

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi

now change into the directory with the madwifi source and simple run

make
make install

now lets test it with:

modprobe ath_pci

...after this you should have something like this in your /var/log/syslog

Feb 13 00:50:36 saxi kernel: ath_hal: module license Proprietary taints kernel.
Feb 13 00:50:36 saxi kernel: ath_hal: 0.9.6.11
Feb 13 00:50:36 saxi kernel: ath_pci: 0.8.5.2 BETA
Feb 13 00:50:36 saxi kernel: ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
Feb 13 00:50:36 saxi kernel: ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Feb 13 00:50:36 saxi kernel: ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36
Mbps 48Mbps 54Mbps
Feb 13 00:50:36 saxi kernel: ath0: 802.11 address: 00:80:c4:2e:5e:aa
Feb 13 00:50:36 saxi kernel: ath0: Atheros 5212: mem=0xe1000000, irq=5

und finally we only have to load the module by adding in /etc/modules this line:

ath_pci

Then configure the interface. Add in /etc/network/interfaces:

1. For static configuration:

auto ath0
iface ath0 inet static
address -your ip-
network -your network-
netmask -your netmask-
broadcast -your broadcast address-
#Add this if you want the machine to forward packets (act as a router):
up /bin/echo "1" > /proc/sys/net/ipv4/ip_forward
#configure the card to use g mode, adjust or leave out if you need something else:
up /sbin/iwpriv ath0 mode 3
#Sample for a configuration with WEP:
#up /sbin/iwconfig ath0 essid "access" mode master rate 54Mb key
f4f272a9ab026a46d255e125d1 enc on
#Sample for a configuration without WEP:
up /sbin/iwconfig ath0 essid "access" mode master rate 54M enc off

2. For dynamic configuration via dhcp:

auto ath0
iface ath0 inet dhcp
#Add this if you want the machine to forward packets (act as a router):
pre-up /bin/echo "1" > /proc/sys/net/ipv4/ip_forward
#configure the card to use g mode, adjust or leave out if you need something else:
pre-up /sbin/iwpriv ath0 mode 3
#Sample for a configuration with WEP:
#pre-up /sbin/iwconfig ath0 essid "access" mode master rate 54Mb key
f4f272a9ab026a46d255e125d1 enc on
#Sample for a configuration without WEP:
pre-up /sbin/iwconfig ath0 essid "access" mode master rate 54M enc off

Only use the line with or without encryption, not both. Add additional parameters to suit your needs. The example assumes the card runs as an access point, if you want it to connect to a router, change the mode. man iwconfig shows possible modes.

After that the machine will boot and the ath0 interface is enabled.

 

i hope i missed nothing, if so please tell me... (the last part with the setup of /etc/network/interfaces was written by an unknown poster in the madwifi wiki, thanks)

Last Updated ( Friday, 28 October 2005 )
 
< Prev
© 1999 - 2009 Gerald Haider, Vienna . All trademarks and copyrights on this page are owned by their respective owners.