| Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-12-2006, 09:24 PM
|
#1
|
|
LQ Newbie
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16
Rep:
|
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.
|
|
|
|
10-13-2006, 04:55 AM
|
#2
|
|
Member
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225
Rep:
|
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.
|
|
|
|
10-13-2006, 08:03 AM
|
#3
|
|
LQ Newbie
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16
Original Poster
Rep:
|
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 !
|
|
|
|
10-13-2006, 08:45 AM
|
#4
|
|
LQ Newbie
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16
Original Poster
Rep:
|
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.
|
|
|
|
10-13-2006, 08:55 AM
|
#5
|
|
Member
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225
Rep:
|
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.
|
|
|
|
10-13-2006, 02:32 PM
|
#6
|
|
LQ Newbie
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16
Original Poster
Rep:
|
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.
|
|
|
|
10-13-2006, 03:14 PM
|
#7
|
|
Member
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225
Rep:
|
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.
|
|
|
|
10-13-2006, 03:36 PM
|
#8
|
|
LQ Newbie
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16
Original Poster
Rep:
|
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 ?
|
|
|
|
10-13-2006, 05:26 PM
|
#9
|
|
Member
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225
Rep:
|
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.
|
|
|
|
10-14-2006, 08:45 AM
|
#10
|
|
LQ Newbie
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16
Original Poster
Rep:
|
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
|
|
|
|
10-14-2006, 08:54 AM
|
#11
|
|
Member
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225
Rep:
|
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.
|
|
|
|
10-15-2006, 12:18 PM
|
#12
|
|
LQ Newbie
Registered: Oct 2004
Distribution: Wolvix 1.0.4 (slax based)
Posts: 16
Original Poster
Rep:
|
**** 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 !!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:04 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|