February 01, 2009

Asus Eee PC vs WPA–PSK when all you have is a hex key.

So far the Asus Eee PC 901 with it's default Linux install have been capable of everything I've asked of it wireless wise. However the GUI configuration tool provided for setting up network connections hasn't been as capable and last weekend failed me for a second time (the first time) when I wanted to connect to a WPA-PSK encrypted wireless network.

The wireless at my parent's house is set up using WPA-PSK. When setting it up I gave the router, a Windows XP machine and a wireless ethernet bridge a randomly generated 64 character hex string as the key. So the only key that I have for this network is that 64 character string.

When connecting to the network using the Eee's GUI tool I was asked to enter a key and specify either WEP or WPA. So I gave it the 64 character key and selected WPA. The Eee then completely failed to establish a working connection.

I hit Google and discovered this thread where in April last year someone says that Asus told them "Linux Xandros is not compatible with WPA-PSK security". The next post is someone describing how to use wpa_passphrase to generate configuration for wpa_supplicant which when will then establish a connection to a WPA-PSK protected network. This looked promising but attempting to give wpa_passphrase my 64 character hex string made it tell me it wanted something ASCII and at most 63 characters long. Evidently what wpa_passphrase wants is an ASCII passphrase which can then be combined with the ssid of the network being connected to create a suitable hex key. The clue is in the name really. I didn't have a passphrase to give it, but I did have a hex key already. So I came up with the following solution:

$ wpa_passphrase ssid_of_network_to_connect_to  a_few_random_characters > out.conf

The contents of out.conf looked like

network ={
ssid="ssid_of_network_to_connect_to"
#psk="a_few_random_characters"
psk=generated_hex_string
}

I replaced generated_hex_string with the 64 character string I had. Then used wpa_supplicant to establish the connection

$ wpa_supplicant -i ra0 -c ./out.conf &

Then I waited a few seconds until the output indicated that the connection had been successfully established then invoked the dhcp client

$ dhclient ra0

and I had a working connection. Convoluted, but it worked. I'm not really sure why the GUI tool failed to set up a working connection. Perhaps it too wanted an ASCII passphrase despite the fact that the field is labelled key.

I've been left with a slight nagging feeling that maybe my problems were caused by my not understanding WPA-PSK properly. But having read the Wikipedia description of how it works that seems to match how I think it works. Maybe I should have set the router up using a passphrase rather than giving it a hex key I'd generated myself but the fact that the other devices I'd attached all happily worked using that key would seem to indicate that using a key was a valid thing to do.


- No comments Not publicly viewable


Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Search this blog

Tags

Not signed in
Sign in

Powered by BlogBuilder
© MMXXIV