[SATLUG] wifi question

Borries Demeler demeler at biochem.uthscsa.edu
Wed Dec 29 10:37:25 CST 2010


I have a wifi connection issue on some rare cases where I am provided
with a passphrase password for an encrypted network and the password
does not work. Normally, I use 'iwlist wlan0 scan' to find the network
I want to connect to, and then configure it with:

iwconfig wlan0 essid "some essid" key password

In the iwconfig man page I am told that iwconfig does not support passphrases,
and that these need to be converted to hex before they can be used. In some
cases, prepending "s:" is recommended. None of these options have worked for
me. I am wondering what I am missing.

I downloaded a perl script to convert an ascii passphrase to hex, but the
hex key it produced didn't work either. Here is the perl script:

use strict;
@ARGV or die "Usage: $0 passphrase\n";
print generate_key( @ARGV ), "\n";

sub generate_key 
	require  Digest::MD5;
	return substr Digest::MD5::md5_hex ( substr( shift() x 64, 0, 64 ) ), 0, 26;

Another program I tried was hexdump, the hex key it produced from the password
also did not work (and it was different from the output of the perl script).

Does anyone have a reliable way of translating a passcode to a hex string 
iwconfig can understand?

Thanks for any help with this!

More information about the SATLUG mailing list