|
List Info
Thread: WPA wifi. Help please! (I am desperate)
|
|
| WPA wifi. Help please! (I am desperate) |

|
2007-07-26 16:50:08 |
|
Hello,
I am not 100% sure if it is the correct place to ask for support, but I think it may be, because of other mails I read in the list. Please, can you help me, because I am desperate...
I have a router encrypted with WPA, I have the key, hexadecimal and 26 characters long, and I have to connect with DHCP.
The kernel is 2.6.22 and the driver madwifi (the last snapshot). I can see the essids, so in principle the driver is OK.
On http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/README.modes?op=file&rev=0&sc=0
I read "NOTE: the 'wpa-psk' value is only valid if:
1) It is a plaintext (ascii) string between 8 and 63 characters in
length
2) It is a hexadecimal string of 64 characters". So, what about my 26 character hexadecimal key?
OK, I tried writing /etc/network/interfaces like that (I replace my actual essid and key by a random one):
# 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
# Wifi
auto ath0 # in order to be automatically started
iface ath0 inet dhcp
wpa-driver madwifi
wpa-ssid wifiathome # NOT the real one
wpa-psk D7110AFEB3267098AA034GBA23 # NOT the real one
and then (hiding some information):
debian:/home/me# /etc/init.d/networking restart
Reconfiguring network interfaces...Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
wifi0: unknown hardware address type 801
wifi0: unknown hardware address type 801
Listening on LPF/ath0/** * * * * *
Sending on LPF/ath0/** * * * * *
Sending on Socket/fallback
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 2
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
The same if I use wext instead of madwifi
Any help?
Thank you
|
| Re: WPA wifi. Help please! (I am
desperate) |

|
2007-07-26 17:12:52 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
David wrote:
> I have a router encrypted with WPA, I have the key,
hexadecimal and
> 26 characters long,
WPA keys' hex values are not 26 characters long. However,
WEP-104 keys
are. (WEP-104 is also sometimes called WEP-128 by vendors
that try to
make it seem better than it really is. It only uses 104
bits' worth of
key material. 104 bits is 13 bytes, which is 26 hex
characters.)
> "NOTE: the 'wpa-psk' value is only valid if: 1) It
is a plaintext
> (ascii) string between 8 and 63 characters in length 2)
It is a
> hexadecimal string of 64 characters".
Yep, that's right. WPA-PSK keys are 32 bytes (256 bits)
long, which is
64 characters. There's also a hash function that will
combine an ASCII
string (<=63 characters' worth) with the SSID to generate
a 256-bit key.
> So, what about my 26 character hexadecimal key?
It's a WEP(-104) key, not a WPA key.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGqRxjS5vET1Wea5wRA0E2AKDU4nYx7ocsdBDsCg+kDyvriBrCZgCd
HLuL
PSbcHo/Aoye+PUyqXrTtXr4=
=nM8Y
-----END PGP SIGNATURE-----
_______________________________________________
HostAP mailing list
HostAP shmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap
|
|
| Re: WPA wifi. Help please! (I am
desperate) |

|
2007-07-26 17:40:49 |
|
Thank you for your reply.
Yes, I was discussing with the Internet provider about this point (you know, they have a script and when they hear the word "Linux" they hide under the table). They told me that it is right, but that WPA keys can be shorter than 64 characters as well...
The router is in WPA mode, because I configured it so. Only WPA, not "WEP or WPA". Look that:
# iwlist ath0 scan ath0 Scan completed : Cell 01 - Address: ** * * * * *
ESSID:"wifihome" (I am changing it for privacy) Mode:Master Frequency:2.412 GHz (Channel 1) Quality=47/70 Signal level=-48 dBm Noise level=-95 dBm
Encryption key:on Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s 12 Mb/s; 48 Mb/s
Extra:bcn_int=100 IE: WPA Version 1 Group Cipher : TKIP Pairwise Ciphers (1) : TKIP Authentication Suites (1) : PSK
Maybe a hint can come from the fact that, in Windows XP, introducing the 26 character key works OK.
Can you help me further, if possible?
Thank you.
David
-----BEGIN PGP SIGNED MESSAGE-----
Yep, that's right. WPA-PSK keys are 32 bytes (256 bits) long, which is
64 characters. There';s also a hash function that will combine an ASCII string (<=63 characters' worth) with the SSID to generate a 256-bit key.
|
| Re: WPA wifi. Help please! (I am
desperate) |

|
2007-07-26 18:07:08 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
David wrote:
> They told me that it is right, but that WPA keys can be
shorter than
> 64 characters as well...
*Only* if the string is treated as an ASCII key (the type of
key that
gets hashed with the SSID to generate the real key). There
is no way to
treat a 26-character string as a hex WPA key; WPA keys are
256 bits
long.
> Maybe a hint can come from the fact that, in Windows
XP, introducing
> the 26 character key works OK.
I have no idea how XP's supplicant is coded, but I suspect
that it
treats any string shorter than 64 characters as an ASCII key
and hashes
it. For wpa_supplicant, try putting the key in double
quotes, since
that's what flags wpa_supplicant to treat the string as an
ASCII key and
hash it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGqSkbS5vET1Wea5wRA5eCAKCf4CWm2jD5gYOmVHBIwunqmzCgzwCf
Vkdf
UYDRlQHPWzY/0cBA3LKpecE=
=7NBe
-----END PGP SIGNATURE-----
_______________________________________________
HostAP mailing list
HostAP shmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap
|
|
| Re: WPA wifi. Help please! (I am
desperate) |

|
2007-07-26 20:45:04 |
|
Thank you very much.
Uf, still desperate. I tried to write the wpa_supplicant.conf, run wpa_supplicant and then dhclient. The output of wpa_supplicant did not make me be optimistic and, of course, dhclient failed.
What do I have to do? Is this sequence right?
1) Write the wpa_supplicant.conf file. 2) Run wpa_supplicant -dd -D madwifi -i ath0 -c /etc/wpa_supplicant.conf and leave it running? 3) Then, dhclient ath0?
If not, can you please correct me?
If yes, can you please tell me the wpa_supplicant.conf file, based on the output of iwlist ath0 scan that I wrote in the previous email? (sorry if I look to be abusing, but I have tried for 5 hours with no results :-( ).
Thank you very much for your help,
David
On 27/07/07, Bryan Kadzban < bryan kadzban.is-a-geek.net">bryan kadzban.is-a-geek.net
> wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160
David wrote:
> They told me that it is right, but that WPA keys can be shorter than > 64 characters as well...
*Only* if the string is treated as an ASCII key (the type of key that gets hashed with the SSID to generate the real key). There is no way to
treat a 26-character string as a hex WPA key; WPA keys are 256 bits long.
> Maybe a hint can come from the fact that, in Windows XP, introducing > the 26 character key works OK.
I have no idea how XP's supplicant is coded, but I suspect that it
treats any string shorter than 64 characters as an ASCII key and hashes it. For wpa_supplicant, try putting the key in double quotes, since that's what flags wpa_supplicant to treat the string as an ASCII key and
hash it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGqSkbS5vET1Wea5wRA5eCAKCf4CWm2jD5gYOmVHBIwunqmzCgzwCfVkdf
UYDRlQHPWzY/0cBA3LKpecE= =7NBe -----END PGP SIGNATURE-----
|
| Re: WPA wifi. Help please! (I am
desperate) |

|
2007-07-26 21:12:26 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
David wrote:
> Uf, still desperate. I tried to write the
wpa_supplicant.conf
OK, what did you put in it? (Obviously you'll want to
replace the
passphrase and any other sensitive info when posting it
here.)
> run wpa_supplicant and then dhclient. The output of
wpa_supplicant
> did not make me be optimistic and, of course, dhclient
failed.
How did it fail? What exactly did wpa_supplicant say?
> What do I have to do? Is this sequence right?
>
> 1) Write the wpa_supplicant.conf file.
> 2) Run wpa_supplicant -dd -D madwifi -i ath0 -c
> /etc/wpa_supplicant.conf and leave it running?
Maybe. I believe the madwifi backend is no longer
recommended; I
believe the wext backend should be used instead (-D wext).
But that may
depend on your version of madwifi and your kernel. (IIRC,
it's also
true that not all versions of madwifi CVS actually work well
-- but I
don't remember any details. Maybe those issues have been
fixed by now,
too.)
> 3) Then, dhclient ath0?
Or whatever other DHCP client you want to use, yes. Once
wpa_supplicant
has a connection up and working, that is.
> If yes, can you please tell me the wpa_supplicant.conf
file, based on
> the output of iwlist ath0 scan that I wrote in the
previous email?
I suspect you can use the WPA-PSK network section (the first
network
section: skip the global options) from the example config
file:
http://w1.fi/gitweb
/gitweb.cgi?p=hostap.git;a=blob_plain;f=wpa_supplicant/wpa_s
upplicant.conf
but you would not need the priority. If you want to specify
proto,
key_mgmt, pairwise, and group, set them to WPA, WPA-PSK,
TKIP, and TKIP,
respectively (as in the first ssid="example"
network in the sample
config file). But that should not be required if
"iwlist scan" is
showing the BSSID and the right info.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGqVSKS5vET1Wea5wRAzCTAKCgtz9Tk/GoCvdU6/9ia4SVoYnP2ACf
a7Xa
kFKWLzoUqEyi4oSJPTvMi6M=
=sf+T
-----END PGP SIGNATURE-----
_______________________________________________
HostAP mailing list
HostAP shmoo.com
http:/
/lists.shmoo.com/mailman/listinfo/hostap
|
|
| RE: WPA wifi. Help please! (I am
desperate) |

|
2007-07-26 21:23:51 |
|
|
There are quite a few
examples on how to do wpa_supplicant configuration - just google it. Yes,
you leave it running. If you do iwconfig <interface> it will tell
you the status.
You also have to set what WPA; is it 1 or
2. 1 is TKIP, 2 is AES. For AES you set:
network {
proto=WPA2
key_mgmt=WPA-PSK
psk="blah"
auth_alg=OPEN
}
in the config file.
If you put psk in quotes, it is treated as
a ascii passphrase, otherwise I believe its hex.
Shouldn't this be posted on a
wpa_supplicant list?
Cheers,
Bruce
From:
hostap-bounces+bsmith=road-inc.com shmoo.com on behalf of David Sent:
Thu 7/26/2007 6:45 PM To: Bryan Kadzban Cc:
hostap shmoo.com Subject: Re: WPA wifi. Help please! (I am
desperate)
Than k you very much.
Uf, still desperate. I tried to write the
wpa_supplicant.conf, run wpa_supplicant and then dhclient. The output of
wpa_supplicant did not make me be optimistic and, of course, dhclient
failed.
What do I have to do? Is this sequence right?
1) Write the
wpa_supplicant.conf file. 2) Run wpa_supplicant -dd -D madwifi -i ath0 -c
/etc/wpa_supplicant.conf and leave it running? 3) Then, dhclient
ath0?
If not, can you please correct me?
If yes, can you please
tell me the wpa_supplicant.conf file, based on the output of iwlist ath0 scan
that I wrote in the previous email? (sorry if I look to be abusing, but I have
tried for 5 hours with no results :-( ).
Thank you very much for
your help,
David
On 27/07/07, Bryan
Kadzban <kadzban.is-a-geek.net">bryan kadzban.is-a-geek.net >
wrote:
-----BEGIN
PGP SIGNED MESSAGE----- Hash: RIPEMD160
David wrote: > They
told me that it is right, but that WPA keys can be shorter than > 64
characters as well...
*Only* if the string is treated as an ASCII key
(the type of key that gets hashed with the SSID to generate the real
key). There is no way to treat a 26-character string as a hex
WPA key; WPA keys are 256 bits long.
> Maybe a hint can come from
the fact that, in Windows XP, introducing > the 26 character key works
OK.
I have no idea how XP's supplicant is coded, but I suspect that it
treats any string shorter than 64 characters as an ASCII key and
hashes it. For wpa_supplicant, try putting the key in double
quotes, since that's what flags wpa_supplicant to treat the string as an
ASCII key and hash it. -----BEGIN PGP SIGNATURE----- Version: GnuPG
v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGqSkbS5vET1Wea5wRA5eCAKCf4CWm2jD5gYOmVHBIwunqmzCgzwCfVkdf
UYDRlQHPWzY/0cBA3LKpecE= =7NBe -----END PGP
SIGNATURE-----
|
| Re: WPA wifi. Help please! (I am
desperate) |

|
2007-07-27 17:39:56 |
|
I now got it! With your help, and with a step I was missing: to press a button of the router to accept new hardware (WPA + this step = impossible to crack, this broadband provider is securing everything very thoroughly ). Anyway, even though I had realised this step from the beginning, without your help I would not have been able to connect.
I have written a HOWTO and I acknowledge you in it: http://www.orangeproblems.co.uk/phpBB2/viewtopic.php?p=19182#19182
Thank you very much again for your patience!
David
|
[1-8]
|
|