LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-12-2006, 09:24 PM   #1
iminj
LQ Newbie
 
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16

Rep: Reputation: 0
wpa + madwifi - I'm close, but NO connection


I'm using Wolvix 1.0.4 (SLAX Variant) on a usb key. My hardware is atheros mini-pci (a/b/g) on a ThinkPad. I am trying to connect to a wireless router (D-Link 624) with WPA-PSK encryption.

WinXP connects fine with this hardware, and Wolvix is perfect in WEP mode.

Here's the output from my terminal:
---------------------------------------------------------------
root@wolvix ~ > ifconfig ath0 down
root@wolvix ~ > iwconfig ath0 essid S4nr5.1
root@wolvix ~ > ifconfig ath0 up
root@wolvix ~ > wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -Dmadwifi
Trying to associate with 00:0d:88:b8:97:1c (SSID='S4nr5.1' freq=2412 MHz)
Associated with 00:0d:88:b8:97:1c
Authentication with 00:0d:88:b8:97:1c timed out.
Disconnect event - remove keys
Trying to associate with 00:0d:88:b8:97:1c (SSID='S4nr5.1' freq=2412 MHz)
Associated with 00:0d:88:b8:97:1c
WPA: Key negotiation completed with 00:0d:88:b8:97:1c [PTK=TKIP GTK=TKIP]
Disconnect event - remove keys
Trying to associate with 00:0d:88:b8:97:1c (SSID='S4nr5.1' freq=2412 MHz)
Associated with 00:0d:88:b8:97:1c
WPA: Key negotiation completed with 00:0d:88:b8:97:1c [PTK=TKIP GTK=TKIP]
Disconnect event - remove keys
Trying to associate with 00:0d:88:b8:97:1c (SSID='S4nr5.1' freq=2412 MHz)
Associated with 00:0d:88:b8:97:1c
WPA: Key negotiation completed with 00:0d:88:b8:97:1c [PTK=TKIP GTK=TKIP]
-------------------------------------------------------------
The system goes into a loop (connect/disconnect), and never completes the process and never gives me back "root >" control of the terminal.

Here's my wpa_supplicant.conf:
--------------------------------------------------
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
#ap_scan=1
#fast_reauth=1

network={
ssid="S4nr5.1"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
psk="My63CharacterAlphaNumericPasskey"
}
------------------------------------------------
I've tried uncommenting various combinations of the 1st 4 lines, but it doesn't seem to change the results.

Anyone have any ideas to help me connect ? Thank you.
 
Old 10-13-2006, 04:55 AM   #2
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
Quote:
Originally Posted by iminj
root@wolvix ~ > wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -Dmadwifi
May be a -Dwext instead of -Dmadwifi will give you another result ...

I start wpa_supplicant in this way with madwifi driver for ath0:

"wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -Dwext -B"

and go on then with my "iwconfig" commands.

Fluxx.

Last edited by Fluxx; 10-13-2006 at 05:21 AM.
 
Old 10-13-2006, 08:03 AM   #3
iminj
LQ Newbie
 
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16

Original Poster
Rep: Reputation: 0
Thank you Fluxx:

Unfortunately, -Dwext (and I also tried -Dwext -B) crashed and didn't associate at all with the Access Point. Here's the terminal output:

----------------------------------------------
root@wolvix ~ > ifconfig ath0 down
root@wolvix ~ > iwconfig ath0 essid S4nr5.1
root@wolvix ~ > ifconfig ath0 up
root@wolvix ~ > wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -Dwext
ioctl[SIOCSIWAUTH]: Operation not supported
Failed to enable WPA in the driver.
ioctl[SIOCSIWAUTH]: Operation not supported
Failed to disable WPA in the driver.
ioctl[SIOCSIWAUTH]: Operation not supported
ioctl[SIOCSIWAUTH]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
root@wolvix ~ >
-------------------------------------------------
Back to -Dmadwifi I guess ?

I am broadcasting my SSID (some forums state I should when debugging WPA), and I am using the following wpa_supplicant slax module:
wpa_supplicant_0_3_9.mo

If there are any other thoughts or ideas, I'd appreciate hearing them. THANKS !
 
Old 10-13-2006, 08:45 AM   #4
iminj
LQ Newbie
 
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16

Original Poster
Rep: Reputation: 0
I discovered an updated SLAX module:
wpa_supplicant_0_4_8.mo

Unfortunately, the module will not mount ("SQUASHFS error major/minor mismatch" during the boot). I suppose it's incompatible with my kernel version.

So, I'm back to the original module (wpa_supplicant_0_3_9.mo) and madwifi driver - but no connection.

Any advice? Thank you.
 
Old 10-13-2006, 08:55 AM   #5
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
Which kernel does Wolvix-1.0.4 use?

"uname -r" should give you the running kernel.

I use Slax with kernel 2.6.16 and a madwifi pcmcia card with WPA2 without problems. My wpa version is 0.4.9 and is compiled against madwifi version 0.9.2.

If you run the same kernel, I can give you the wpa.mo out of my running Slax.

Fluxx.

P. S.: Another idea: Does your router accept new wireless devices or does the router block new mac adresses? May be that the router is the problem ... I remember that in D-Link 624+ was an option to allow or block mac adresses with a mac filter ...

Last edited by Fluxx; 10-13-2006 at 09:06 AM.
 
Old 10-13-2006, 02:32 PM   #6
iminj
LQ Newbie
 
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16

Original Poster
Rep: Reputation: 0
Wolvix 1.0.4 uses the 2.6.12.2 kernel, so I don't think I can use your slackware modules. Thanks for the offer anyway !!

I borrowed a Linksys router (WRT54-G) and set it up with my SSID and WPA keys - but received the same unfavorable results - so that probably rules out router issues.

I use MAC Filtering, but it shouldn't be an issue since I dual boot my laptop (WinXP and Wolvix), and WinXP connects to the router using WPA-PSK without any problems. Just to be 100% sure, I'll disable MAC filtering, and report back later if I get a better result.

Here's a question: How close am I to a connection? Based on the terminal output, my wireless card is associating with the router, and it seems to be completing "key negotiation". Of course, it stalls out there ... but WHAT IS SUPPOSED TO HAPPEN NEXT, if this was actually working properly ?

Thanks.
 
Old 10-13-2006, 03:14 PM   #7
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
Here is the way I start my ath0 (I use this way, because I have several wireless cards and therefore several scripts to bring them up):

Code:
#!/bin/bash
/sbin/ifconfig eth0 down
killall wpa_supplicant > /dev/null 2>&1
/sbin/rmmod ath_pci
/sbin/modprobe ath_pci countrycode=0
/sbin/iwpriv ath0 mode 3
/sbin/iwpriv ath0 turbo 1
/usr/local/sbin/wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -B -Dwext
/sbin/iwconfig ath0 channel 2 essid "my_essid"
/sbin/iwconfig ath0 channel 2 mode managed
/sbin/iwconfig ath0 rts 1401 frag 1400
/sbin/ifconfig ath0 my_static_IP up
/sbin/route add default gateway router_IP
/sbin/iwconfig ath0 txpower 1 rate 108M auto
Fluxx.
 
Old 10-13-2006, 03:36 PM   #8
iminj
LQ Newbie
 
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the ath0 startup script Fluxx. What I'd really like to see is your terminal output after you enter wpa_supplicant command ... so I can see what should be happening on my system.

By the way, I disabled MAC Filtering on my router, but it made no difference. Interesting though - I was looking through the router logs, and it clearly shows my wireless card's MAC Address Connecting > then Authenticating > then Authentication Success. (even before I disabled MAC Filtering).

I'm making a connection - but something is not finishing the process.

If I can't move forward with this, I'm going to try a different LiveLinux distro that has a more recent wpa_supplicant and updated madwifi drivers. Wolvix has a new beta version that might accept the later slax wpa_supplicant module. Any other suggestions anyone ?
 
Old 10-13-2006, 05:26 PM   #9
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
To give you the output of a terminal I run wpa_supplicant in a terminal without -B (this is normally the function to run it as daemon in the background):

Code:
root@evon600c:~# /usr/local/sbin/wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -Dwext
Trying to associate with MAC_of_my_AP (SSID='my_essid' freq=2417 MHz)
Associated with MAC_of_my_AP
WPA: Key negotiation completed with MAC_of_my_AP [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to MAC_of_my_AP completed (auth) [id=0 id_str=]
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with MAC_of_my_AP
WPA: 4-Way Handshake failed - pre-shared key may be incorrect
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with MAC_of_my_AP
WPA: Key negotiation completed with MAC_of_my_AP [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to MAC_of_my_AP completed (reauth) [id=0 id_str=]
Here the output in the terminal stops while in the meantime I have started the script mentioned in my last post without the lines concerning the wpa_supplicant.

Fluxx.
 
Old 10-14-2006, 08:45 AM   #10
iminj
LQ Newbie
 
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Associated with MAC_of_my_AP
WPA: Key negotiation completed with MAC_of_my_AP [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to MAC_of_my_AP completed (reauth) [id=0 id_str=]
Fluxx:

These are the last 3 lines of your wpa_supplicant output. I get similar output, EXCEPT I never receive the "CTRL-EVENT-CONNECTED" confirmation. Instead, I receive a "Disconnect event - remove keys". That's the part I can't understand.

After the CTRL-EVENT-CONNECTED, does your terminal return you to root > (so you can continue issuing commands), or do you have to open a separate terminal screen to continue with dhcp etc.? (My terminal - aterm - locks up at this point. Only Ctrl-C gives me back control).

Thanks so much for your patience !!
-iminj
 
Old 10-14-2006, 08:54 AM   #11
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
Look at my output: I have also these lines you mentioned, "Disconnect event - remove keys", until I start in a second terminal all the other commands after the line with wpa_supplicant.

Just open another terminal and configure your wlan device with your needed options "iwconfig ..." "ifconfig ..." or "dhcpcd ...".

I think you are very close.

And if it will work with the two terminals you can do all your commands in one terminal with the option -B in the wpa_supplicant line.

Fluxx.
 
Old 10-15-2006, 12:18 PM   #12
iminj
LQ Newbie
 
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16

Original Poster
Rep: Reputation: 0
**** Solved ! ****

Quote:
Fluxx
.... Just open another terminal and configure your wlan device with your needed options "iwconfig ..." "ifconfig ..." or "dhcpcd ...".

I think you are very close.
Happiness is a WPA-PSK connection that works ! I knew I was close, and thanks to you, it's working.

The trick was opening a second terminal to finish the iwconfig/ifconfig/dhcpcd commands once wpa_supplicant completed Key negotiation. Then I was able to ping addresses both inside my network, and internet addresses also. Now I have the commands in /etc/rc.d/rc.local - and I get a WPA-PSK connection automatically when I boot.

For some strange reason Firefox browser won't open after I run these scripts either manually or through rc.local, but all other network applications connect. (I think I'll try to fix that at my distro's forum).

Thanks Fluxx !!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gnome network manager, atheros 5002g, madwifi, and WPA tgm4883 Linux - Wireless Networking 1 05-19-2006 01:40 PM
(K)ubuntu: WPA and IPW2200 Intermittent Connection bennettg Linux - Wireless Networking 5 01-31-2006 09:49 AM
Mandriva 2006 madwifi and WPA-PSK problems CragStar Mandriva 8 10-25-2005 08:18 AM
Atheros 5004g, MadWiFi and WPA mrmcctt Linux - Wireless Networking 11 08-09-2005 01:30 AM
madwifi - atheros - and WPA-PSK , anyone? dimgr Linux - Wireless Networking 1 07-05-2005 05:24 AM


All times are GMT -5. The time now is 04:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration