[SOLVED] unable to maintain a wpa wireless connection
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just installed suse 11.3 and everything seems to work perfectly out of the box, except for the network card. I am currently using the ath9k driver.
The problem is that if I connect to a WPA protected network, the connection will drop about every 20 seconds and ask for the network key again. Eventually, after about 15 minutes, it completely stops working and I have to reboot in order to be able to use it again. Unloading and reloading the ath9k module has no effect, a full reboot is needed. I have not yet tried to use ath5k or madwifi instead, but on ubuntu, the ath5k and madwifi drivers do not associate with my card.
below is one "cycle" in the nm log, from connected to the next connected:
Code:
Jan 6 23:37:59 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: completed -> group handshake
Jan 6 23:37:59 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: group handshake -> completed
Jan 6 23:38:30 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: completed -> group handshake
Jan 6 23:38:30 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: group handshake -> completed
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): supplicant manager state: idle -> down
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): device state change: 8 -> 2 (reason 10)
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): deactivating device (reason: 10).
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): canceled DHCP transaction, dhcp client pid 9524
Jan 6 23:38:38 linux-xyz NetworkManager: <WARN> check_one_route(): (wlan0) error -34 returned from rtnl_route_del(): Sucess#012
Jan 6 23:38:38 linux-xyz NetworkManager: <debug> [1294340918.806812] run_netconfig(): Spawning '/sbin/netconfig modify --service NetworkManager'
Jan 6 23:38:38 linux-xyz NetworkManager: <debug> [1294340918.809226] write_to_netconfig(): Writing to netconfig: INTERFACE='wlan0'#012
Jan 6 23:38:38 linux-xyz NetworkManager: <info> Clearing nscd hosts cache.
Jan 6 23:38:38 linux-xyz NetworkManager: supplicant_interface_acquire: assertion `mgr_state == NM_SUPPLICANT_MANAGER_STATE_IDLE' failed
Jan 6 23:38:38 linux-xyz NetworkManager: <info> Trying to start the supplicant...
Jan 6 23:38:38 linux-xyz NetworkManager: <WARN> scan_results_cb(): could not get scan results: Method "scanResults" with signature "" on interface "fi.epitest.hostap.WPASupplicant.Interface" doesn't exist#012.
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): supplicant manager state: down -> idle
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): device state change: 2 -> 3 (reason 0)
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): supplicant interface state: starting -> ready
Jan 6 23:38:38 linux-xyz nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/autofs' exited with error status 1.
Jan 6 23:38:38 linux-xyz NetworkManager: <info> Activation (wlan0) starting connection 'Auto FIS-EN'
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): device state change: 3 -> 4 (reason 0)
(junk)
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): device state change: 4 -> 5 (reason 0)
Jan 6 23:38:38 linux-xyz NetworkManager: <info> Activation (wlan0/wireless): access point 'Auto FIS-EN' has security, but secrets are required.
Jan 6 23:38:38 linux-xyz NetworkManager: <info> (wlan0): device state change: 5 -> 6 (reason 0)
Jan 6 23:38:38 linux-xyz NetworkManager: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Jan 6 23:38:39 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: scanning -> inactive
(junk)
Jan 6 23:38:43 linux-xyz NetworkManager: <info> (wlan0): device state change: 6 -> 4 (reason 0)
(junk)
Jan 6 23:38:43 linux-xyz NetworkManager: <info> (wlan0): device state change: 4 -> 5 (reason 0)
Jan 6 23:38:43 linux-xyz NetworkManager: <info> Activation (wlan0/wireless): connection 'Auto FIS-EN' has security, and secrets exist. No new secrets needed.
Jan 6 23:38:43 linux-xyz NetworkManager: <info> Config: added 'ssid' value 'FIS-EN'
Jan 6 23:38:43 linux-xyz NetworkManager: <info> Config: added 'scan_ssid' value '1'
Jan 6 23:38:43 linux-xyz NetworkManager: <info> Config: added 'key_mgmt' value 'WPA-PSK'
Jan 6 23:38:43 linux-xyz NetworkManager: <info> Config: added 'psk' value '<omitted>'
Jan 6 23:38:43 linux-xyz NetworkManager: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Jan 6 23:38:43 linux-xyz NetworkManager: <info> Config: set interface ap_scan to 1
Jan 6 23:38:43 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: inactive -> scanning
Jan 6 23:38:44 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: scanning -> associating
Jan 6 23:38:44 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: associating -> associated
Jan 6 23:38:44 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: associated -> 4-way handshake
Jan 6 23:38:44 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: 4-way handshake -> group handshake
Jan 6 23:38:44 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: group handshake -> completed
Jan 6 23:38:44 linux-xyz NetworkManager: <info> Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful. Connected to wireless network 'FIS-EN'.
(junk)
Jan 6 23:38:44 linux-xyz NetworkManager: <info> (wlan0): device state change: 5 -> 7 (reason 0)
Jan 6 23:38:44 linux-xyz NetworkManager: <info> Activation (wlan0) Beginning DHCP transaction (timeout in 45 seconds)
Jan 6 23:38:44 linux-xyz NetworkManager: <info> dhclient started with pid 10027
(junk)
Jan 6 23:38:44 linux-xyz NetworkManager: <info> DHCP: device wlan0 state changed normal exit -> preinit
Jan 6 23:38:49 linux-xyz NetworkManager: <info> DHCP: device wlan0 state changed preinit -> reboot
(junk)
Jan 6 23:38:49 linux-xyz NetworkManager: <info> address 10.66.5.110
Jan 6 23:38:49 linux-xyz NetworkManager: <info> prefix 24 (255.255.255.0)
Jan 6 23:38:49 linux-xyz NetworkManager: <info> gateway 10.66.5.1
Jan 6 23:38:49 linux-xyz NetworkManager: <info> nameserver '10.66.11.2'
Jan 6 23:38:49 linux-xyz NetworkManager: <info> nameserver '10.66.11.3'
Jan 6 23:38:49 linux-xyz NetworkManager: <info> Activation (wlan0) Stage 5 of 5
(junk)
Jan 6 23:38:50 linux-xyz NetworkManager: <debug> [1294340930.022893] run_netconfig(): Spawning '/sbin/netconfig modify --service NetworkManager'
Jan 6 23:38:50 linux-xyz NetworkManager: <debug> [1294340930.025816] write_to_netconfig(): Writing to netconfig: INTERFACE='wlan0'#012
Jan 6 23:38:50 linux-xyz NetworkManager: <debug> [1294340930.026102] write_to_netconfig(): Writing to netconfig: DNSSERVERS='10.66.11.2 10.66.11.3'#012
Jan 6 23:38:50 linux-xyz NetworkManager: <info> Clearing nscd hosts cache.
Jan 6 23:38:50 linux-xyz NetworkManager: <info> (wlan0): device state change: 7 -> 8 (reason 0)
Jan 6 23:38:50 linux-xyz NetworkManager: <debug> [1294340930.032127] run_netconfig(): Spawning '/sbin/netconfig modify --service NetworkManager'
Jan 6 23:38:50 linux-xyz NetworkManager: <debug> [1294340930.037880] write_to_netconfig(): Writing to netconfig: INTERFACE='wlan0'#012
Jan 6 23:38:50 linux-xyz NetworkManager: <debug> [1294340930.037947] write_to_netconfig(): Writing to netconfig: DNSSERVERS='10.66.11.2 10.66.11.3'#012
Jan 6 23:38:50 linux-xyz NetworkManager: <info> Clearing nscd hosts cache.
Jan 6 23:38:50 linux-xyz NetworkManager: <info> Policy set 'Auto FIS-EN' (wlan0) as default for routing and DNS.
Jan 6 23:38:50 linux-xyz NetworkManager: <info> Activation (wlan0) successful, device activated.
Jan 6 23:38:50 linux-xyz NetworkManager: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
Jan 6 23:38:50 linux-xyz nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/autofs' exited with error status 1.
Jan 6 23:39:01 linux-xyz NetworkManager: <info> (wlan0): supplicant connection state: completed -> group handshake
and will eventually end with:
Code:
Jan 6 23:48:07 linux-xyz NetworkManager: <info> (wlan0): device state change: 5 -> 2 (reason 10)
Jan 6 23:48:07 linux-xyz NetworkManager: <info> (wlan0): deactivating device (reason: 10).
Jan 6 23:48:07 linux-xyz NetworkManager: supplicant_interface_acquire: assertion `mgr_state == NM_SUPPLICANT_MANAGER_STATE_IDLE' failed
Jan 6 23:48:07 linux-xyz NetworkManager: <info> Trying to start the supplicant...
Jan 6 23:48:07 linux-xyz NetworkManager: <info> (wlan0): supplicant manager state: down -> idle
Jan 6 23:48:07 linux-xyz NetworkManager: <info> (wlan0): device state change: 2 -> 3 (reason 0)
Jan 6 23:48:07 linux-xyz NetworkManager: <WARN> scan_results_cb(): could not get scan results: Method "scanResults" with signature "" on interface "fi.epitest.hostap.WPASupplicant.Interface" doesn't exist#012.
Jan 6 23:48:07 linux-xyz NetworkManager: <WARN> iface_state_cb(): could not get interface state: Method "state" with signature "" on interface "fi.epitest.hostap.WPASupplicant.Interface" doesn't exist#012.
this gives a verbose output if something's going wrong.
Did you check the output of iwconfig?
Markus
I dunno, my experience with NetworkManager in the Gnome environments with which I have dealt that very well could compete with the processes already running.
If I'm doing something involved, I tend to dispose of NetworkManager, which involves removing it completely. Takes it to a manual config, not a problem in my world, but might not be what rabbit2345 wants.
Not sure how to kill it outright regarding running processes. I imagine someone can provide a simple solution there. One that preserves its functionality on a restart. I seem to recall it was a intrusively annoying service/app/cancer.
mh, wpa_supplicant is relatively independent of the networkmanager. This means one can start it even if the networkmanager is running.
And before finding a solution, we'll have to find the problem. As you see there are some warningmessages in the post of the OP.
The next steps would be to look at the wpa_supplicant.conf file and then try out if the connection works if the encryption is disabled on the accesspoint.
I ran the command as markush posted above, but it tells me that /etc/wpa_supplicant.conf does not exist. Is it possible that the lack of configuration causes it to have problems? If so, how can I create one?
As for doing away with networkmanager, if there is another similer frontend to ifup or something, then I would gladly get rid of NM. I only need a tool to quickly allow me to switch between wired/wireless and different networks.
BTW, I am using the gnome networkmanager applet inside kde3, if that matters any.
wpa_supplicant.conf can be in another directory, for example /etc/wpa_supplicant/wpa_supplicant.conf
Otherwise, if your using wpa_supplicant and you don't have this file, you'll have to create it. Anywhere on your system there must be a file wpa_supplicant.conf.sample (look at /usr/share/wpa_supplicant or /usr/share/doc/wpa_supplicant) which can be used for this purpose.
I haven't looked into it too far, but there is no conventional wpa_supplicant.conf when using NetworkManager. I did a search yesterday before going to work and there is one, but it is in a dbus directory and the contents are nothing like what one would add to configure wpa_supplicant. I found some information regarding how NetworkManager stores data, and it turns out it involves d-bus.
After a quick google search, these links provide some information as to what NetworkManager is doing with config information:
In my experience, you either work with NetworkManager, which really doesn't involve conventional configuration files for the most part, although I saw something about manually adding them (which I have never tried) or remove it and go the manual configuration route. If you try to add a wpa_supplicant.conf file, and leave NetworkManager running, you're going to end up fighting NetworkManager for configuration of the device. Trust me, it doesn't like to lose.
...If you try to add a wpa_supplicant.conf file, and leave NetworkManager running, you're going to end up fighting NetworkManager for configuration of the device. Trust me, it doesn't like to lose.
Well, when I once was using Gnome, I uninstalled Networkmanager and since then my wireless worked properly. But what you write makes sense and it would explain why rabbit2345's wireless is not working.
I looked over the third link I posted and see reference to disabling a device and manually configuring it. Actually, I learned something about what NetworkManager is doing by going through those pages. I mean, it's using the same information necessary to configure devices, it just stores it in an unfamiliar way (to me, that is).
Something that stood out was a comment about how there is no need to restart NetworkManager after making a change as it monitors the config files and will apply the changes automagically. That explains some behavior I recall seeing in the past.
I'd not remove wpa_supplicant, however, as NetworkManager is using it.
I'll go back and look over the output that rabbit2345 provided earlier, there has to be something there that hints toward a solution. I'm wondering if there might not be multiple network modules being loaded for the wireless card, which I have dealt with previously, but I don't think that is so common now.
Might have to wander down to the liquor store for some refreshments. Working on networking issues and alcohol seem to go so well together. Heh.
...I'd not remove wpa_supplicant, however, as NetworkManager is using it...
I think you are right with all your guesses. But please don't overlook, that one cannot solve such an issue if it is not clear which program/tool isn't working correctly.
So my suggestion is either to disable or uninstall Networkmanager and try wpa_supplicant on it's own. Or disable wpa_supplicant and try it with Networkmanager.
My experience is that wpa_supplicant comes with a verbose and informative ouput if used on the commandline. That's the reason for my post #2.
I agree with isolating the issue, and wpa_supplicant being excellent with the activity logged during its use, Markus.
I was going to look at d-bus and see if there is a verbose setting to get more detailed logging out of it. rabbit2345 is getting a DHCP lease from the access point, but something fails after the system gets it and tries to initiate it. The WPA negoitation was successful from what appears. I saw some various logs when searching for solutions where some of the errors I thought were relevant might not be as they were present in logs on successful connections too.
Ugh. I'm forgetting that this connection works for 20 seconds, then drops. Everything is negotiated properly, then fails.
Hmmnn...
rabbit2345 - have you tried to set a static IP for the wireless device? I'd try that and see if you can get a connection that lasts longer than 20 seconds.
Sry i've been away from my computer, but I did try to assign a static IP to the network through networkmanager. I used my "good" IP address (the one obtained by DHCP) and set the static address to that one. Afterwards, however, I cound't get online, and it was not a DNS resolution problem.
As for wpa_supplicant, I did find the config in /etc/wpa_supplicant/. here it is:
I disabled networkmanager and replaced it with wicd instead. Wicd can hold a steady connection with any wireless and wired connection, so I removed networkmanager. So as it turns out, it was a problem in networkmanager, not wpa_supplicant. While I'm not sure of the exact problem in networkmanager, removing it fixed everything. I will also send a bug report to them on this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.