LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-22-2012, 11:32 PM   #1
phenyloxime
LQ Newbie
 
Registered: Sep 2009
Posts: 28

Rep: Reputation: 2
[SOLVED] Unable to connect to WPA2 router despite valid passphrase


[SOLVED] Unable to connect to WPA2 router despite valid passphrase

I experienced the following issue, and after 2 hours of wading through
wpa_supplicant man pages, configuration files, and NetworkManager logs, I was able to determine that the issue had nothing to do with either of these but with the channel that my router was using. I was able to get WPA2 working by changing the channelPerhaps my experience will prove useful to others. I also have some lingering questions regarding the inner workings of wireless networking, which I hope someone "debian fluent" might help me answer.

The initial problem:
I attempted to connect to our home router ( a Linksys E2500) via
NetworkManager, I entered the passphrase when prompted but was unable
to connect to the network. I repeated this process several times,
rebooting in between.

The solution:
The router was on channel 11, changing the router to channel 3 allowed
me to connect without a problem. I could reproduce the problem by
switching back to channel 11.


A review of the NetworkManager log file (/var/log/daemon.log on my system). Indicated that the hangup was occurred while wpa_supplicant was
attempting to associate with my access-point:
Code:
Nov 22 22:11:22 tiamat wpa_supplicant[5590]: Trying to associate with X:X:X:X:X:X (SSID='XXXXXXX' freq=2462 MHz)
Nov 22 22:11:22 host NetworkManager[5854]: <info> (wlan0): supplicant connection state:  scanning -> associating
Nov 22 22:11:23 host NetworkManager[5854]: <warn> Activation (wlan0/wireless): association took too long.
Nov 22 22:11:23 host NetworkManager[5854]: <info> (wlan0): device state change: 5 -> 6 (reason 0)
Nov 22 22:11:23 host NetworkManager[5854]: <warn> Activation (wlan0/wireless): asking for new secrets
Nov 22 22:11:23 host NetworkManager[5854]: <info> (wlan0): supplicant connection state:  associating -> disconnected
Nov 22 22:11:23 host wpa_supplicant[5590]: CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Nov 22 22:11:32 host wpa_supplicant[5590]: Authentication with 00:00:00:00:00:00 timed out.
Nov 22 22:11:38 host NetworkManager[5854]: <warn> (wlan0): link timed out.
Nov 22 22:12:33 host NetworkManager[5854]: <info> (wlan0): device state change: 6 -> 9 (reason 7)
Nov 22 22:12:33 host NetworkManager[5854]: <warn> Activation (wlan0) failed for access point (Cisco45757)
Nov 22 22:12:33 host NetworkManager[5854]: <info> Marking connection 'Auto XXXXXXXX' invalid.
Nov 22 22:12:33 host NetworkManager[5854]: <warn> Activation (wlan0) failed.
With Security disabled, on channel 11:
On one attempt, wpa_supplicant successfully associated with my router, and via dhclient, NetworkManager was able to obtain a lease.
However, even when this happened (and I've seen it happen sporadically under these conditions before) I was unable to ping my router
Other attempts under the above conditions; wpa_supplicant was unable to associate and failed with the same curious error as previously
Code:
Nov 22 22:11:32 host wpa_supplicant[5590]: Authentication with 00:00:00:00:00:00 timed out.
I think that authentication time out is curious because of the 'empty' physical address 00:00:00:00:00:00. I am not sure what that means but if anyone
else does I'd be delighted to find out. My current opinion is that channel 11, being the highest frequency, is outside of the range of my feeble 5 yr old wireless card. The various software findings are manifestations of a physical limitation of my hardware.Obviously the problem is solved, but a few questions were generated in the process:

Manually connecting via dhclient, and NetworkManager either running or killed:
Code:
	iwconfig wlan0 essid XXXXXXX
	dhclient -v wlan0: 
	   DHCPOFFER blah blah blah
	   DHCPREQUEST blah blah blah
	   no leases . . . sleeping.
yet when network manager invokes dhclient everything is groovy.
I thought maybe if I first associated with the router (like NetworkManager appears to do) via wpa_supplicant I could get this to work. However. . .

wpa_cli cannot connect to wpa_supplicant:
one source indicated that this is related to the use of dbus, and reccomended the following fix:
How to make wpa_cli talk to wpa_supplicant
namely editing the line in ??some file?? that calls wpa_supplicant. it reccomends using the "-O" flag to create a link that
wpa_cli can capture.

I adapted the fix listed as follows:
Code:
 Exec=/sbin/wpa_supplicant -u -s -B -P /var/run/wpa_supplicant
On my system, the "-O" flag does not exist, however the "-P" flag is used to create the PID file that wpa_cli should capture.
it will only create the file (in /var/run) when the -B (background) flag is also present.

Even with a PID file in /var/run, wpa_cli still cannot connect to the running wpa_supplicant daemon. I have tried specifying the path of the PID file
when calling wpa_cli, but that fails also. The first thing I would like to accomplish would be getting wpa_cli to work, any advice from those patient enough to have read this behemoth of a post will be most appreciated.

My Setup is as follows:

Kernel : Linux 2.6.31.6-rt19 (i686)
Operating System : Debian GNU/Linux 6.0.6
Wireless Card : Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)
Wireless Driver : ath5k
wpa_supplicant : v0.6.10
wpa_cli : v0.6.10

Last edited by phenyloxime; 11-22-2012 at 11:35 PM. Reason: clarification
 
  


Reply

Tags
network connectivity, network interface, network manager, wpa_supplicant



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to connect linux machines through sencondary router mwhall Linux - Networking 3 08-15-2012 06:00 PM
Unable to connect linux machines through sencondary router mwhall Linux - Newbie 2 08-15-2012 04:46 PM
[SOLVED] Unable to connect to WPA2 Enterprise network, Mandriva 2010.2 Tank Jr Mandriva 3 03-07-2011 03:49 PM
Unable to connect to wireless router slacktop Slackware 8 12-10-2010 02:38 PM
Everything compatible yet unable to connect to router scorpion_gr Linux - Networking 2 11-22-2006 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration