May 20, 2009 · Networking · Email This Post

Sponsored Link
How to get ath5k working on Jaunty with Compat-wireless and a self-compiled kernel

I used to have some trouble while setting up my Atheros PCI card on Ubuntu Linux 9.04. It worked natively on Ubuntu 8.04, where it was detected as ath0. I upgraded from 8.04 to 8.10 whereby I noticed my wireless PCI card didn't work natively anymore. Someone suggested me to upgrade from 8.10 to 9.04 Jaunty, and I did that immediately. After the system upgrade I noticed again that my wireless device was gone in Ubuntu 9.04. When I ran iwconfig I didn't see wlan0 or ath0 anymore.


Here you can see some details of my PCI card:

7 root@linux $ lspci | grep Atheros
04:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)

Now I'll confirm that I'm running Ubuntu 9.04 Jaunty:

8 root@linux $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty

In the beginning I only saw the following on Jaunty. Here you can see that a wireless device doesn't show up.

24 root@linux $ iwconfig
lo no wireless extensions
eth0 no wireless extensions
pan0 no wireless extensions
wmaster0 no wireless extensions.

I've tried stuff like madwifi, ndiswrapper and previous modules like ath_pci . None of them was able to fix my problem, the wireless device was still missing.

Then I've heard that I need the ath5k FOSS Linux Wireless driver, something that is provided by the compat-wireless package.

I downloaded a compat-wireless tarball from orbit-lab.org but I was unable to get it working. While compiling I received several errors, one of these errors reported something like “You need to have mac 08211 enabled in your kernel ...”. After trying different versions of the compat-wireless tarball on the Ubuntu Generic kernel I realized that it was impossible to compile this on a default Ubuntu generic kernel.

So you have to compile your own kernel. While I'm writing this tutorial I see that 2.6.29.3 is the latest version of the Linux kernel. Keep in mind that this version might be old now, so is the wget link. Start a konsole/terminal and enter this as root:

cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.3.tar.bz2
tar xjf linux-2.6.29.3.tar.bz
ln -s linux-2.6.21.3 linux
cd linux
make clean && make mrproper
cp /boot/config-`uname -r` ./.config

You must first enable mac80211 in order to enable ath5k!

Now as root, run: (You still have to be in /usr/src/linux)

make menuconfig

You can eventually load your alternate configuration file, but this isn't compulsory. Now you have to commit some very important changes. Use your arrow keys to navigate:

Networking --->
Wireless --->
Improved wireless configuration API
M Generic IEEE 802.11 Networking Stack (mac80211)
Make sure that you see the “M” like above. Now you've enabled mac80211.

Now you can enable ath5k in the kernel configuration.

Device Drivers --->
[*] Network device support --->
Wireless LAN --->
M Atheros 5xxx wireless cards support
Make sure it looks like this.

Now you're finished and you simply have to select Exit. You say YES when you the following question appears. (Do you wish to save your new kernel configuration?)

Ok, now you can start with compiling your kernel.
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-mykernel kernel_image kernel_header

Depending on your CPU speed, this will take a certain time. When it's all finished you have to install your new kernel.

cd /usr/src
dpkg -i linux-image*.deb
dpkg -i linux-headers*.deb

Your GRUB bootloader configuration file should be modified automatically. Make sure that your now kernel entries are visible in your /boot/grub/menu.lst file. If not, you have to insert the necessary lines by modifying your /boot/grub/menu.lst file.

Reboot now, and boot in your new self-compiled kernel.

Download a compat-wireless tarball from orbit-lab.org. Extract the tarball, go into the newly created map and install compat-wireless.

tar jxvf compat-wireless*.tar.bz2 or tar zxvf compat-wireless*.tar.gz
cd compat-wireless*
make && make install
depmod -a

Now you should be able to load the necessary module.

modprobe ath5k

And wow, a wireless device appears while you run iwconfig

Check your /etc/network/interfaces file and restart the service with /etc/init.d/networking restart and it should be working.

Sponsored Link

Incoming search terms:

Related posts

15 Comments to “How to get ath5k working on Jaunty with Compat-wireless and a self-compiled kernel”

  1. Mark says:

    This problem may have been a side effect of upgrading thru 8.10 rather than doing a fresh installation of 9.04. I recently did a fresh install of Jaunty on a box with an Atheros PCI wi-fi card, and no wired ethernet connection. I found that the ath5k driver was installed and working from the start from the CD. On the reboot after installation, the wireless connection was just waiting for my password, and away it went. You really had to suffer for your ath5k module!

    [Reply]

  2. phar0z says:

    You could be right. I hope more people with the same PCI card share their experience here.

    [Reply]

  3. jayson says:

    I have an acer aspire one with the same AR242x 802.11abg Wireless PCI Express Adapter (rev 01)

    and while the wireless works with a fresh install of ubuntu jaunty, it would constantly lose the connection.

    I followed the madwifi_hal instructions on:
    https://help.ubuntu.com/community/AspireOne

    now my wireless works perfect.

    [Reply]

  4. rolando says:

    i have the same pci card on my compaq and jaunty has no problem recognizing it .but the madwifi_hal driver seems to do it better so i’m using that one.Anyway wifi still sucks on linux ath5k should resolve the problem but for now is still in early development stage and have some issues

    [Reply]

  5. Bruce K says:

    Thanks for the instructions. I had the same problem on a Sony Viao with an Atheros driver and your instructions fixed it.

    [Reply]

  6. phar0z says:

    @ Bruce K: Have you tried other stuff like madwifi, ndiswrapper before you’ve read my howto?

    [Reply]

  7. mint says:

    Any idea on why I get these errors after a make. I am struggling newbie so any advice is appreciated.

    mint@mint-ubuntu:/usr/src/linux$ sudo make clean && make mrproper
    CLEAN /usr/src/linux-headers-2.6.28-13-server
    CLEAN .tmp_versions
    CLEAN scripts/basic
    rm: cannot remove `scripts/basic/fixdep': Permission denied
    rm: cannot remove `scripts/basic/docproc': Permission denied
    rm: cannot remove `scripts/basic/hash': Permission denied
    rm: cannot remove `scripts/basic/fixdep': Permission denied
    rm: cannot remove `scripts/basic/docproc': Permission denied
    rm: cannot remove `scripts/basic/hash': Permission denied
    make[2]: *** [__clean] Error 1
    make[1]: *** [scripts/basic] Error 2
    make: *** [_mrproper_scripts] Error 2

    [Reply]

  8. Debianfox says:

    Mint, I always work with the superuser account. Just settle a password with sudo passwd root.Then you become a superuser with su after you’ve entered the password.

    sudo passwd root (settle a root password)
    su [enter]
    cd /usr/src/linux && make clean && make mrproper

    [Reply]

  9. Sir Eliah says:

    It works for Presario f755us with the same ethernet device. I compiled kernel 2.6.30.4 and installed that compat-wireless and it seems to be ok.

    There were only two problems: 1) it was necessary to type “sudo modprobe ath5k” every time after reboot, but I solved it by adding “ath5k” in file “/etc/modules”.
    2) network-manager-gnome were a bit irritating constantly asking for a key to the key database or something, solved it by installing wicd. :D

    Now wireless works excellent, thx for tutorial!

    [Reply]

  10. Ubiedoodie says:

    using kernel 2.6.28.15-generic while compiling but when I try
    make menuconfig I get….

    *** Unable to find the ncurses libraries or the
    *** required header files.
    *** ‘make menuconfig’ requires the ncurses libraries.
    ***
    *** Install ncurses (ncurses-devel) and try again.
    ***
    make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
    make: *** [menuconfig] Error 2

    I have checked to make sure I have the libraries installed and it looks like I do, unless I need something else..

    am new to Ubuntu, linux so be easy on me please.

    [Reply]

  11. Hep says:

    @Ubiedoodie:

    Get the ncurses library:
    sudo apt-get -y install build-essential ncurses-dev

    [Reply]

  12. teco_r says:

    I;
    My congratulations for the tutorial, it’s very good.
    But I have a problem…
    when I tape “fakeroot make-kpkg –initrd –append-to-version=-mykernel kernel_image kernel_header”, I get this error “Error: Unknown target –initrd Unknown target –append-to-version=-mykernel Unknown target kernel_header
    use –targets to display help on valid targets.”. Can someone help me with this?

    thanks in advance.

    [Reply]

  13. The problem is that this webpage automatically converts a double dash – – to a long dash. So change the dashes in the command to two dashes before running it

    [Reply]

  14. kernel_header should be changed to kernel_headers too

    [Reply]

  15. Serge Eluhu says:

    you could compile the new kernel by just typing make after finishing with the sudo menuconfig.

    [Reply]

Leave a Reply