LinuxQuestions.org
Help answer threads with 0 replies.
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 01-05-2011, 05:48 AM   #1
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
unable to maintain a wpa wireless connection


Hi,

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.
thanks!
rabbit2345
 
Old 01-06-2011, 02:53 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hello,

Did you try
Code:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
this gives a verbose output if something's going wrong.

Did you check the output of iwconfig?

Markus
 
Old 01-07-2011, 12:02 AM   #3
devwatchdog
Member
 
Registered: Jan 2010
Posts: 202

Rep: Reputation: 47
Quote:
Originally Posted by markush View Post
Hello,

Did you try
Code:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
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.
 
Old 01-07-2011, 03:23 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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.

Markus
 
Old 01-09-2011, 07:49 AM   #5
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Original Poster
Rep: Reputation: 41
Hello!

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.
 
Old 01-09-2011, 08:36 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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.

Markus
 
Old 01-09-2011, 11:29 AM   #7
devwatchdog
Member
 
Registered: Jan 2010
Posts: 202

Rep: Reputation: 47
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:

http://live.gnome.org/NetworkManagerConfiguration

http://www.freedesktop.org/wiki/Software/dbus

http://live.gnome.org/NetworkManager/SystemSettings

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.
 
Old 01-09-2011, 11:40 AM   #8
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Quote:
Originally Posted by devwatchdog View Post
...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.

Maybe it would help to uninstall wpa_supplicant.

Markus
 
Old 01-09-2011, 12:10 PM   #9
devwatchdog
Member
 
Registered: Jan 2010
Posts: 202

Rep: Reputation: 47
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.
 
Old 01-09-2011, 12:26 PM   #10
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Quote:
Originally Posted by devwatchdog View Post
...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.

Markus
 
Old 01-09-2011, 12:44 PM   #11
devwatchdog
Member
 
Registered: Jan 2010
Posts: 202

Rep: Reputation: 47
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.
 
Old 01-12-2011, 04:54 AM   #12
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Original Poster
Rep: Reputation: 41
Hello!

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:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
it is only 2 lines long, and I really don't know how to mess with it.

I tried uninstalling wpa_supplicant, but the main networkmanager package depends on it, so removing it would likely cause more problems.


thanks!
rabbit2345
 
Old 01-12-2011, 05:01 AM   #13
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
You'll have to configure the wpa_supplicant.conf with the authentication-data of your wireless network. Look at
Code:
man wpa_supplicant.conf
Markus
 
Old 01-13-2011, 05:17 AM   #14
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Original Poster
Rep: Reputation: 41
Hello!

I added my network to the list according to the man page, like this:
Code:
          network={
               ssid="FIS-EN"
               scan_ssid=1
               key_mgmt=WPA-PSK
               psk="fisen_ap123"
          }
but it still drops after 20 seconds.

what exactly does the autofs script do? It always exits with 1, so there is obviously a problem. It only makes one call:
Code:
rc_active autofs && /etc/init.d/autofs restart
what does autofs do for networkmanager?


thanks!
rabbit2345
 
Old 01-19-2011, 05:02 AM   #15
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Original Poster
Rep: Reputation: 41
Solved! (kinda)

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.


thanks!
rabbit2345
 
  


Reply



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
Network manager unable to connect to unsecured wireless - WPA networks fine :S phyre-x Ubuntu 8 05-16-2011 10:11 AM
Unable to connect to WEP or Unsecured Wireless (WPA is fine) Poetics Linux - Wireless Networking 7 07-06-2010 04:15 AM
Trying to set up wireless WPA connection on Kubuntu using ndiswrapper nishnoob Linux - Newbie 4 08-04-2008 06:50 PM
Wireless connection blues Mandriva 2007 WPA and TKIP settings Brainjammers Mandriva 4 02-02-2007 06:31 AM
Wireless connection problem ( WPA or something else) peter07 Linux - Wireless Networking 1 12-16-2006 05:38 AM

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

All times are GMT -5. The time now is 04:39 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