Saturday 2 July 2011

Stuff that Works Under Linux: Wifi



Finding hardware that works with linux can STILL be a frustrating experience even after all these years. Manufacturers persist on focusing on 'Windows and mac'. This makes some sense nowadays when apple has come back from the brink and everyone has an macbook (or whatever they call them now) but it was really weird ten years ago. Ten years ago NO ONE owned apple products, as evidenced by the way that a mac in a public place would gather a crowd of wary onlookers, rather like the crowd that might surround a crashed alien starship once they'd got over the initial panic and the joy of looting had begun to pale.

I used to complain 'More people use linux than macs, so why do manufacturers keep supporting this dying platform, and ignoring linux?'

To which people would say: "Oh no, lots of people use macs"

To which I would respond, "Oh yeah? Anyone you know?"

People: "Well yes, sure."

Me: "Who?"

People: "Oh lots of people we know use macs. Lots."

Me: "Name one."

People: "Uh, well, there's... um... Jim?"

Me: "Jim? That's funny, you've never spoken of him before, he mustn't get out much. Does graphic design, does he?"

People: "Well yes, that's why he needs a mac. Uh-huh. Yes. Honest."

These mysterious 'Jims' and 'Sams' and 'Sues' always did graphic design, leading me to claim that it was the same guy, who just got around a lot (and sometimes wore a skirt).

Apple has always enjoyed some weird must-support-the-underdog loyalty from the public, evidenced by the fact that, in the days when the company was hanging by its fingernails over the abyss of chapter-11 bankruptcy BECAUSE IT WASN'T SELLING ANYTHING, and Michael Dell was saying they should just kill it, asset-strip the corpse, and give the money to the shareholders, people were prepared to lie and invent pretend friends in order to claim they knew someone who used macs. No-one used macs. Most people had never even seen one.

But times have changed and now the mac has become so ubiquitous that I recently went to a Linux User Group, and everyone had macs (Huh? Isn't that like going to a church service and finding everyone is wearing t-shirts that say "SATAN IS LORD!!"?). But still, I continue to wonder why linux is so badly supported.

Part of the problem, I think, is corporate attitudes to open-sourcing their driver code/protocols. Now, I've always thought this was odd. Back in the day I remember that large numbers of network cards didn't work under linux, because vendors wouldn't make information available about how to talk to the card. This stuff was all classified 'company secrets'.

Which leads one to wonder what the heck was in those cards? If the cards allowed you to signal to arbitrary points in space-time, or had a secret setting that caused them to print money (erudite readers will realise these two features amount to the same thing) then I could understand this, but they didn't, they just sent messages at the industry-standard speed down a wire. This means that the big secret that couldn't be revealed must have consisted of an interface of the form:


int SendPacket(char *Destination, char *Data, int Length);
int RecvPacket(char *Source, char *Data, int Length);


Sorry, but that's not world-changing technology that anyone's going to steal! WE ALREADY HAVE THAT!

My suspicion was always that what they were hiding was BAD DESIGN. Coding practices and protocol design so horrifically deranged that they could have a walk-on part in an H.P. Lovecraft story.

Hmm, I'm rambling rather badly here, let's pull things back to the point. The new equivalent of those network cards (whose vendors all went out of business, I think. Or rather, I hope) are Wifi cards. There's loads of them, and only a few of them seem to work with linux.

Indeed so bad is the support for wifi cards in linux that someone's come up with something called ndiswrapper that lets you use windows wifi drivers under linux. I tried this, but the very first sign that we weren't going to get on, was that it required me to install perl. I don't want to install perl just to use a piece of hardware/COMPILE A KERNEL/send an email/etc/etc/etc any more than I want to install Python to be able to compile X, gnome or KDE to play old arcade games or browse the web, or install windows to be able to use my computer. But this is another rant. Anyways, this time I gave in, and installed the huge, bloated, misshapen camel-monster that is perl onto my (previously) small and slick system. After doing that, and installing ndiswrapper and going through the time-consuming business of extracting the windows drivers and installing them, everything functioned as expected.

Meaning it DIDN'T F****ING WORK!

So I ripped all that stuff back off my system (though I'm sure there's a few camel-colored tentacles left twitching around in there somewhere) and went out and bought some hardware that's supported by the vanilla linux kernel.

Anyways, below is a list of some wifi stuff that I found works under linux without horrible camel-powered bodges. Many of these devices will be old technology, because I'm the kind of person who likes to find use for the things that the surplus sheeple everyday folks cast aside.



One interesting note: If found that stuff that works under linux, also works under windows, and b(stuff that doesn't work under linux, won't work under windows next year). I have a lot of old technology come my way, and when I find a card or dongle that doesn't work under linux, I try to give it to one of the windows-using relatives who come to me asking if I've got a wifi thing they can use. They come back to me telling me that they couldn't get it to work, and promptly steal one of my linux-compatible devices, and later report delightedly that it 'just worked'. This confirms something I've long said, b(if it doesn't work under stock linux, it's junk). It might work under windows right now, but in a year the company will have folded, you won't be able to get drivers any more, or there'll be a new version of windows under which it doesn't work. Buying cheap tech often means buying cheap tech five times over, where paying double means you get something that lasts five times as long. Do the math.

Right, onto the devices.



SAFECOM SWMULZ-5400

These are great, they're the little wifi-dongle that could. Provided you have Zydas zd-1211b chipset support compiled into your kernel, they just work. This model supports 54g wifi speeds, supports 'ad-hoc' mode as well as the usual 'managed' mode, and seems to have moderately good range. Just about any wifi dongle with the same zd-1211b chipset should work under linux without needing ndiswrapper or any special treatment. Here is a page listing devices that have this chipset. So good are these, that I carry one in about in a pocket, because you never know when someone's going to say "hey, my wifi's stopped working", or something like that.




WIFI-SKY IDU-2850UG-10G

If you've got reception issues, this is the beast for you. It uses the adopts Realtek RTL8187+RTL8225-VF chipset, but unfortunately the in-kernel linux driver doesn't seem to support ad-hoc mode, nor does it support the 'high transmit power' feature of the device. However you can stick and stonking great aerial on the thing (it comes with a good one), and this improves communications considerably. It also looks cool. Supports speeds up to 56g.




TP-LINK TL-WN610G

If you're using PCMCIA, I've found this is a nice, basic card. My one of these seems to have started playing up recently, but that's only after many years of daily service, so I'd still recommend the card. It supports speeds of up to 108 Meg 'super-g', but I think this requires a special access point, so realistically it's 54g like everything else.



NETGEAR MA401

Okay, this is an old, old, old card, it's going to be hard to find these days. But it just works. It only does 11b speeds. But it works. And it keeps working. Mine's been dropped, sat on, stepped on and is now held together with large blobs of superglue, but it works. Old tech tends to work, and keep working, whereas newer stuff is cost-engineered to extract the maximum money from your pocket while providing the most substandard parts possible, and designed to mortally fail a week after you warranty runs out. Buy the old stuff, it can take a kicking and keep on ticking.

Don't, however, assume that this one good card means that netgear products generally work with linux. My experience is that they're very hit-and-miss.



PLUSCOM WP-RT2561T

It does seem that if you see 'Ralink chipset' on a product, you're in with a good chance of having it work under linux. This pluscom card uses the Ralink 'RT2561' chipset.


Okay, that's the good, now for the bad and the ugly.




Belkin products

YOU PAYS YOUR MONEY; YOU TAKES YOUR CHANCE I have a number of Belkin F5D7050uk USB dongles, and they work very well under linux. But this is another of those devices where you have to be very sure you've got the right version of the device. My units are 'Version 3' (I think), and use the Ralink chipset, so they work under linux. However, other versions use a zydas, intersil or realtek chipset. These all look the same, and unless you're buying from ebay with a vendor who states the chipset, you're taking a gamble as to which version you get. I think all these versions have chipsets that should work under linux, but I don't know it for sure, so I can't really recommend them.

I've gotten other belkin hardware, like PCI wifi cards, to work under linux, but I've often found it's a real battle. I'd put belkin stuff under the 'ugly' category.


Linksys products:

AVOID My experience is that they flat-out don't work under vanilla linux kernels.

D-Link "Air Plus G" and other products using the Texas Instruments 'Acx100' chipset

AVOID I used a D-Link DWL-640G+ for some years, but the driver never got into the mainline kernel, and further development appears to have now been abandoned. The drivers probably won't even work with recent kernels, so these cards are scrap.


And that's all I've got.