Dear lazyweb: what is is about Linux and WPA?

Posted on 11 January 2008 in Eee, Gadgets, Linux, OLPC XO, Rants

I don't think I really have enough of a readership for this blog to get an answer to this, but... perhaps someone passing by will know. Why is WPA support invariably so bad in Linux-based OSes?

Three examples:

  1. Despite having been a Linux user since 1992, I held off on switching my primary laptop, an aging Fujitsu-Siemens machine, from Windows for many years because no distribution I could find supported WPA out of the box with any kind of user interface I was willing to spend the time learning. This is not because I'm lazy -- I'm willing to put in weeks to learn web server configuration details, and years to learn programming languages. These things are inherently difficult and cannot be reasonably simplified. But connecting to an encrypted wireless network? Sure, the underlying tech is as complex as it gets, but if Microsoft can make it easy to use then why did it take so long for anything usable to get into any Linux distro? Sigh. Well, anyway, I eventually tried out Ubuntu 7.10, Gutsy Gibbon, and was delighted to discover that its support was OK. Not as good as Windows XP's, but good enough for me to switch the old lappy over, which I did sometime last autumn, and have never regretted. So, standard defined in 2004 or so, decent support in mid-2007. Hmm.

  2. So along came my new Eee, just before Christmas, and for some reason I have difficulties connecting to my work or home networks. Why? Well, I banged my head against it for a while, and eventually discovered that there was a bug in the scripts used for WPA connections that meant it could not connect if you had a key with a space in it. A bit of digging around on the Eee Wiki helped me sort that one out, but seriously...

  3. Anyhow, I posted earlier on today that I'd not been able to connect my OLPC XO to my work or home networks. No prizes for guessing what the problem was... from the wiki (found via):

    WPA is not working from the User Interface in Build 650! Some OLPCs (including in the G1G1 program) cannot connect to wireless routers protected with the WPA protocol. Although the networks are visible from the OLPC, the stall when user enters a password.

    The first solution they suggest is to switch off WPA. Right. Sorry, but I'm not Bruce Schneier, and there's no way I'm switching to WEP. It's almost enough to send me into some kind of Fake Steve Jobsesque rant.

    Luckily, some kind soul has worked out a hack to work around the problem, so I'll try that. [UPDATE, posted from XO: it works!]

But seriously -- what is the problem? Linux is a great OS, but WPA support seems to be seriously messed up. It can't just be a driver problem, because both the XO and the Eee have OSes built for them by the hardware manufacturers. Does anyone out there know?

Eee, day 2

Posted on 22 December 2007 in Eee, Gadgets

My second day with the Eee has been much better than the first. It has connected happily to every wifi network I've pointed it at, it stayed in standby overnight without problems (though that did drain 70% of its battery power), and although there is no Remote Desktop icon on the default menu, it is installed in the default OS, so a quick Home-T (to pop up a terminal) followed by a rdesktop -f allowed me to connect to my media center PC and use the Eee as a glorified remote control. (If you use the command line above without having used an RDP client on Linux before, you should know that it's control-alt-enter to exit full-screen mode and get back to the local desktop). It's also happily displayed every web page I've visited, though the tiny screen has been problematic with a few -- Google Reader is particularly bad.

The most positive thing? I'm writing this post on the Eee. While I'm still struggling a bit with the tiny keyboard, it's usable -- and getting more so as I adjust.

I think my next step will be to install some interesting development environments on it, so that I can play with them on the to go. I'm thinking Django, Erlang and Squeak. Is there anything else I should be looking at?

Eee PC

Posted on 21 December 2007 in Eee, Gadgets

I received my Eee PC today. Its a lovely little gadget, but my first impression is that it's not ready for prime-time yet.

The machine itself is very neat -- quite tiny, and beautifully-built considering the cost. A quick poke around the applications shows lots of useful-looking stuff. But in order to use the device, you really have to be on the Internet. And, for me, that was when things started going wrong.

I wanted to connect to a WPA network; however, when I tried to connect to it, the machine stuck in a "Pending" state. A quick poke around the details in the connection dialog showed a weird error -- a message saying something like "Invalid parameter: XXX" where XXX was the second word of the two-word network passphrase. Sudden thought -- perhaps the system was trying to call some kind of command with the passphrase unquoted on the command line? A poke around the EeeUser forums showed that there is a problem with WPA passwords with spaces, and someone has written a simple patch to work around it. The fix was, as I suspected, to add some quotes to a couple of shell scripts; thanks due to EeeUser forum member Cmiller82, who packaged everything up nicely so that it was easy enough for a fairly-experienced Linux user to fix.

That all looked sensible, and I applied the patch, restarted the machine, and tried to reconnect. The old error disappeared -- but it still stuck in "Pending", and now appeared to be failing to be able to get a DHCP lease. Even worse, when I left the machine alone for a while, it hung completely! Even the trackpad refused to work. Time to press the power switch for a few seconds to force it to power down.

Once the machine came up again, I tried reconnecting -- and, mirabile dictu, it worked!

So, we'll see how it stands up to the next few days' work. But... silly bugs in the scripts that make up the operating system? Patching shell scripts by hand to get WPA working? Random hangs? Not a great start.

I think I'll hold off recommending one of these to my mother for a couple more revisions of the OS and hardware. After all, it's been more than a decade since she wrote her last compiler.