The Temple of Fu

code, systems and games

Slackware 11 – Atheros – Madwifi

leave a comment »

Decided to document my steps for getting my wireless connection to work under Slackware 11

Note: This may or may not work in newer versions of Slackware to pull a snippet from Aliens wiki here the madwifi driver for Atheros based chipsets works fine with the current 2.6.x series of kernels and the 2.4.x kernels found in Slackware releases prior to 12.0.

I am using an 2.6.23.9 kernel and the madwifi 0.9.4 source here. I have an Atheros based 802.11abg wireless NIC built on the AR5212 chipset in my Sony Vaio – PCG-K45 laptop.

Note: Make sure to have wireless enabled in your kernel. Make sure to have automatic module loading enabled as well.

I did all of this as root.

Install madwifi drivers

  1. Downloaded the source and then moved it to /usr/src/

    #mv madwifi.0.9.4.tar.gz /usr/src/
    #cd /usr/src
    #tar -xvf madwifi*
    #cd madwifi.0.9.4
    #make && make install

To connect to an open access point

  1. Now that the madwifi drivers are installed, run the following command to see wireless interfaces.
    #modprobe ath_pci
  2. Now run the following command and look interface ath0, if it is not there then debugging time; for this rebooting and runing the command dmesg is useful. Look for errors, an error I encountered is listed below under “Slackers Note”.
    #iwconfig
  3. Now bring the interface up if it isn’t already.
    #ifconfig ath0 up && ifconfig
  4. Now scan and see if the interface is working. Need to make sure the module wlan_scan_sta is loadedby running the below list modules command.
    #lsmod
    If it is not loaded then use modprobe and load it.
    #modprobe wlan_scan_sta
    Check again to see if it loaded, if not use dmesg again to troubleshoot.
  5. To scan for access points use.
    #wlanconfig ath0 list scan
    The second way is the more usual way of scanning (and works with other wireless cards), it also gives you
    somewhat more information, and is therefore a bit less easy to read. The command is:
    #iwlist ath0 scan | less
    Especially useful is the line reading; “Encryption key:on”, which indicates that this AP is running some kind of WEP.
  6. To connect to a wireless network and configure the interface.
    #iwconfig ath0 essid "name_of_essid"
    Or by MAC
    #iwconfig ath0 ap 00:06:25:E8:3A:05
    Or automatically
    #iwconfig ath0 ap any
  7. Now dhcp the interface.
    #dhcpcd ath0
    Or
    #dhclient ath0

You should now be on the net. Try pining something to see, or check ifconfig to see if your interface has gathered an IP address.

To connect to an access point with a WEP key.

  1. Similar to above go ahead an select an essid and get connected.
  2. Then enter the wep key.
    #iwconfig ath0 key your_hex_wep_key
  3. Manually configure the interface or dhcp like above.
    #ifconfig ath0 192.168.1.33 netmask 255.255.255.0
    #route add default gw 192.168.1.1

Don’t forget the nameservers under /etc/resolv.conf, you should now be on the net.

Slackers Note:
I fully tried to use Alien Bobs slackpkg but had problems, not sure why but I could not get past an error saying auto
loadable modules was not enabled. I just didn’t have time.. I wanted net.

The driver creates two devices: wifi0 and ath0. This driver uses wifi%d only as a placeholder for the phyical device,
and will create one wifi device for each wireless NIC in the system. These wifi devices will reject ifconfig and
iwconfig commands. The wifi interface indicates the existance of a physical Madwifi device, but is not of any functional
interest other than as a target for VAP (Virtual Access Point) creation via wlanconfig.

Resources:
http://madwifi.org/wiki/UserDocs/FirstTimeHowTo
http://www.linuxquestions.org/questions/slackware-14/
http://wiki.linuxfromscratch.org/blfs/wiki/WirelessTools
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:madwifi

Advertisements

Written by lordfu

January 13, 2010 at 10:38 pm

Posted in Linux, Slackware

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: