jump to navigation

My D-Link wireless card, Madwifi and the state of linux distros for the desktop January 10, 2009

Posted by oktyabr in debian, distro reviews, hardware, open source, opinions, personal, ubuntu.

Here is one of those posts I write more for my personal reference in the future but I´m happy if someone else gets some use from the information too.

Today I´m posting from my new Ubuntu Studio 8.10 install.  This is after trying several new releases of other distros first and even though Ubuntu Studio is still missing a decent realtime kernel it still somehow ended up on my harddrive!  Here is the main reason why…

This all started when I had to backtrack and check some facts before publishing my last article, The Best free DAW for Windows is… In the article I posted that the new version of LMMS for Windows had native VSTi support (which it does) and that the linux version also had the same, which really is a free linux audio landmark to be remembered!    Problem was that I hadn´t tested the latest LMMS in linux yet!  I just assumed that VSTi support was cross platform.  Not wanting to get caught in such a misdirection, if I had been wrong (and it turns out that I was correct after all!), I rolled up my shirt sleeves and got to work trying to find a fairly bleeding edge distro release that would *easily* support the latest linux build.  Those of you well seasoned in the ways of the penguin know what Iḿ talking about, especially if you have ever tried to keep up with the latest versions of obscure audio libraries and applications.

I already knew one of my biggest hurdles would be support for my D-Link WDA – 2320 Wireless G PCI card.  If you read many other blogs and webpages focusing on ¨linux hardware compatibility¨ you will sooner or later be presented with the stern advice to ¨select hardware from the start that has tested and proven compatibility¨.  So if you are a ¨gamer¨ make sure you pick a compatible graphics card, a desktop studio will be concerned with sound card compatibility and so on.  This isn´t bad advice exactly and isn´t so much different than what one would do when selecting components for a Windows machine with a specific purpose either, in fact I do most of my hardware selection based on cross-platform compatibility as I DO run both OSs…

Where the real problem arises is when dealing with rapidly changing models of specific hardware, in this case wireless cards and their chipsets.  Most manufacturers keep the driver API closed source and itś only fortunate that NIC card drivers, for example, performing similar tasks regardless of the exact chip, have a well paved path to reverse engineering them and thus sooner or later linux compatibility for a specific card (and itś drivers) bubble up to the top sooner or later.  Still, in a market like network cards, both wired and wireless, the technology and thus the individual card models, change so rapidly that by the time linux compatibility is found for one it is often already made obsolete by the model that is currently on store shelves.  Other manufacturers, such as Linksys, have sacrificed true linux compatibility in the name of keeping up with market demand by not even including the chip information on the card´s retail box or worse yet, using different chipsets, some compatible, some not, on the exact same model of card!

So, long story made short I went with D-Link because I knew that most of their cards made use of a very few number of chipsets and that most of them were already tried and tested with linux and found, one way or another, to work.  Many forum posts read something like this: ¨You can easily buy card XYZ with chipset ABC, that is very reliable in linux, from ONLINE retailer FooBar.¨  In my case I think itś probably just my innate stubborness to get linux working with ¨off the shelf¨ hardware, available locally to ME that makes me avoid that solution.

Now in the specific case of the D-Link family of cards revolving around Atheros chipset (the majority of them, in my part of the world), linux compatibility is acheived with the use of a special wrapper called MadWiFi…  The kernel driver itself is open sourced but the actual HAL (Hardware Abstraction Layer) is still proprietary binary and thus close sourced which means that most linux distros will not contain this driver ¨out of the box¨.  The hurdles in getting such a card to work are similar perhaps to those found with Ndiswrapper which requires the use of actual Windows drivers to work!

Now with other hardware components that would be fine…  don´t include the software required to get the card to work and just let the user google for a solution and download it after the distro is installed…  the key word here is download as we are talking about a networking device!  Assuming the card is a wireless networking device then it can be safely assumed that most users in a similar situation won´t have an alternate network interface to use to download the appropriate software!  It becomes sort of a chicken-and-the-egg thing…  you need internet to download the correct software but you need the correct software to get your internet working!

Thus we close in on the topic of linux distros themselves.  I´m a fan of debian based distros so I started my search with some of the usual suspects…  first up was Sidux, probably safely considered the most ¨bleeding edge¨ true debian distro you can get on a single ISO.  Apparantly Sidux does contain some sort of support for the Atheros chipset (the version available at the time of this writing) needed to get my D-Link working but if there is any sort of GUI based support for enabling this or even any sort of documentation available without an internet connection I could not easily find it so I passed and went on to the next one…

Mepis is a distro I have some history with.  I only really lost interest in it after it switched the development path to become yet another Ubuntu based distro although it sounds like they may be backtracking from that decision as I write this.  Version 7.0, the lastest stable release at the time of this post, was also claimed to have madwifi included on the install disc but whether it was problems with my particular hardware or something else I just could not easily get my wireless connection working!

A bit impatient to start fact checking for my original article I decided to download a current Ubuntu (8.10) and give it a whirl as I had yet to try this latest version.  Skipping over the vanilla flavors in favor of Ubuntu Studio due to it´s more purpose built application list and larger ISO (1.2GB on DVD… surely madwifi must have found it´s way on there somehow?!?!) it soon found a home on an empty partion on my dual boot machine…

A common problem with many distros I have tried is that the installer routine picks up the NIC chipset onboard my motherboard and insist that one of these become my default network interface, neglecting to notice that I also have a wireless PCI card available.   Instead of configuring a chip that isn´t even connected to my LAN I usually end up cancelling this step in the installation with the hope that a configuration utility will present itself when I finally boot into my new desktop.  This is likely the root of the problem with both Mepis and Sidux that I tried…  After the installation failed to configure a wired NIC chip (which didn´t have a wire to use!) neither made identification of my atheros based card known to me on the desktop or even that they contained drivers capable of bringing this specific interface to life.  Now to be fair neither did Ubuntu Studio BUT a convenient notification unique to the Ubuntu family of distros quickly told me that I was using ¨restricted software¨ (this is a common work-around in Ubuntu… non-free software available after agreeing to the terms)…  driver support for my atheros chipset!  Now all I had to do was figure out how to configure it and get it working…

Ok, so where is the configuration utility?  Ubuntu Studio, and Ubuntu in general, have tried so hard to become un-linux like, to dodge the stereotype bullets of ¨geekish¨ and ¨difficult to use¨ that they have actually made things more difficult by not supporting the linux way of doing things!  Now I know that that comment in itself could light many a forum thread on fire but as case in point I will say that even a command line terminal is buried in a secondary sub menu (even windows has a command line with easier access!)  Ok, so you want to be all GUI-fied eye candy, friendly to the new user and such, but would it hurt to put a terminal shortcut on the desktop or at least in the main menu?

Anyway, after looking everywhere obvious (and lots of places not so obvious) I believe that at least this specific release does not have an easy to use tool to configure a wireless interface and get it working.  Perhaps this is still a legacy problem relating to the installation procedure itself but if you are going to include a ¨cancel¨ button in some important stage of the install, expect some users to actually use it and please include tools capable of rectifying the situation from the desktop!

So I ended up whipping out Gedit (would have used gvim from the CLI, had it been installed) and manually adding the correct entry to /etc/network/interfaces which was something like this (password is replaced by * for obvious reasons):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# Dlink wireless card
iface ath0 inet dhcp
wireless-essid 0016019AF8EE
wireless-key s:************
auto ath0

I rebooted to make sure it still worked and added a wireless monitor to the task bar (the default network monitor still thinks I´m not connected even though it now sees the new ¨ath0¨ interface) and vióla!

In conclusion it´s my belief that a ¨distro for the desktop¨, while certainly a reality, has not appeared in a form yet that would make most novice users happy.  A lot of this has to do with licensing issues that keep distros from including anything not ¨free¨ from the ISO disc but Ubuntu at least makes it easier than most to install these ¨restricted¨, but often necessary, softwares on a working system.  One recommendation I have is that these ¨free¨ distros at the very least include links on the download page to find the appropriate software packages, acommpanied of course by a statement making it clear that the needed software will NOT be found on the ¨install¨ disc and perhaps the reasons why.  Then a user could at least download the packages (or perhaps a seperate ISO of restricted goods?) to their working operating system before stumbling on something so essential as a missing network driver after it is too late to do anything about it.  Some distros, like those I mentioned, may well have essential components included, free or not, your mileage may vary.

On a tangent kudos to Ubuntu Studio for making it easy to enable sub-pixel hinting for my 1440×900 widescreen LCD and having the best looking desktop ¨out of the box¨ of those I recently tried.  Now bring me an atheros and nvidia friendly realtime kernel and I´ll really be pleased!  It will be nice when distros start recognizing LCD and Plasma devices from the install a bit more often…



No comments yet — be the first.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: