LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 01-02-2008, 03:21 PM   #1
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Rep: Reputation: 32
Constantly getting kicked off WPA network


I am trying to set up WPA-PSK on my home network using wpa_supplicant. Everything seems to go well at first, but I get kicked off the network every 5-15 minutes or so. This is from wpa_cli:

Code:
<2>Associated with 00:0c:41:f4:43:fd
<2>WPA: Key negotiation completed with 00:0c:41:f4:43:fd [PTK=TKIP GTK=TKIP]
<2>CTRL-EVENT-CONNECTED - Connection to 00:0c:41:f4:43:fd completed (auth) [id=1 id_str=]
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>Trying to associate with 00:0c:41:f4:43:fd (SSID='myessid' freq=2437 MHz)
<2>Authentication with 00:00:00:00:00:00 timed out.
<2>Trying to associate with 00:0c:41:f4:43:fd (SSID='myessid' freq=2437 MHz)
<2>Authentication with 00:00:00:00:00:00 timed out.
<2>Trying to associate with 00:0c:41:f4:43:fd (SSID='myessid' freq=2437 MHz)
<2>Authentication with 00:00:00:00:00:00 timed out.
<2>Trying to associate with 00:0c:41:f4:43:fd (SSID='myessid' freq=2437 MHz)
<2>Authentication with 00:00:00:00:00:00 timed out.
<2>Trying to associate with 00:0c:41:f4:43:fd (SSID='myessid' freq=2437 MHz)
<2>Associated with 00:0c:41:f4:43:fd
<2>WPA: Key negotiation completed with 00:0c:41:f4:43:fd [PTK=TKIP GTK=TKIP]
<2>CTRL-EVENT-CONNECTED - Connection to 00:0c:41:f4:43:fd completed (reauth) [id=1 id_str=]
Some notes:
  • Everything works perfectly without WPA
  • WPA works fine on another computer in the house with Windows XP.
 
Old 01-02-2008, 04:39 PM   #2
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
OK, I upgraded to wpa_supplicant-0.5.9 (was using 0.5.7 earlier) to see if that did anything. The correct MAC address of my router is now printed instead of 00:00:00:00:00:00, but it still times out 4-5 times before it connects.
 
Old 01-02-2008, 04:52 PM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Is there any other 2.4ghz devices in the house like a cordless phone. Possible interference issue. What is the siganl strength of the connection?

Brian
 
Old 01-02-2008, 05:38 PM   #4
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
There is a phone, but I don't know what its frequency is. In any case, I don't think that would be the problem because there are no wireless problems except with WPA on Linux. Windows with WPA and Linux without WPA works fine.
 
Old 01-03-2008, 05:01 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Only thing I know to try.
Brian
 
Old 01-03-2008, 06:02 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
When it finally auths, do you have a working (tested) connection (wpa_cli "status" showing "wpa_state=COMPLETED")? Any logging on the AP side? Would wpa_cli with "level 0" debugging show more output? Does "scan_results" by any chance show an AP near you using the same channel?
 
Old 01-04-2008, 10:57 PM   #7
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by unSpawn View Post
When it finally auths, do you have a working (tested) connection (wpa_cli "status" showing "wpa_state=COMPLETED")?
Yeah -- it will let me get on for about 5-15 minutes, during which I can do all my normal internet stuff, then I lose association with the AP and have to wait for it to reassociate.

Quote:
Originally Posted by unSpawn View Post
Any logging on the AP side?
I'm not sure. I will check it out.

Quote:
Originally Posted by unSpawn View Post
Would wpa_cli with "level 0" debugging show more output?
I tried this and it doesn't seem to show more output than normal. Do you know what the default level is?

Quote:
Originally Posted by unSpawn View Post
Does "scan_results" by any chance show an AP near you using the same channel?
No, the only AP I can see at all is mine.
 
Old 01-05-2008, 12:54 AM   #8
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
I turned on debugging output in wpa_supplicant and this is printed each time I get disconnected:

Code:
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
Added BSSID 00:0c:41:f4:43:fd into blacklist
It looks like it sees the AP 00:00:00:00:00:00 (whatever that is), and instead of adding it to the blacklist, it adds my router, thus kicking me off. It then cycles through trying to connect and failing, until it is removed from the blacklist and I can connect again. Is this a bug in wpa_supplicant?
 
Old 01-05-2008, 05:43 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Wynd View Post
Added BSSID 00:0c:41:f4:43:fd into blacklist
IIGC function wpa_blacklist_add in (recent?) wpa_supplicant.c does: " add the specified BSSID to the blacklist or increases the blacklist count if the BSSID was already listed. It should be called when an association attempt fails either due to the selected BSS rejecting association or due to timeout. This blacklist is used to force wpa_supplicant to go through all available BSSes before retrying to associate with an BSS that rejected or timed out association. It does not prevent the listed BSS from being used; it only changes the order in which they are tried."

It's a can of worms, there's a lot of people having trouble with this blacklisting stuff. Before you continue you should save output from running wpa_supplicant with the "-dd" flag" and 'dmesg' after running 'echo 0xc80000 > /proc/sys/net/wlan0/debug' and see if that gives more information because you want to find the cause for the blacklist. Things to suggest include trying different kernel versions (two major releases ago, five minor releases ago, most recent), different wireless_tools and madwifi versions. Maybe first visit Madwifi tickets about blacklisting here http://madwifi.org/search?q=blacklis...n&changeset=on.
 
Old 01-05-2008, 09:27 AM   #10
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by unSpawn View Post
It's a can of worms, there's a lot of people having trouble with this blacklisting stuff. Before you continue you should save output from running wpa_supplicant with the "-dd" flag" and 'dmesg' after running 'echo 0xc80000 > /proc/sys/net/wlan0/debug' and see if that gives more information because you want to find the cause for the blacklist. Things to suggest include trying different kernel versions (two major releases ago, five minor releases ago, most recent), different wireless_tools and madwifi versions. Maybe first visit Madwifi tickets about blacklisting here http://madwifi.org/search?q=blacklis...n&changeset=on.
Thanks for the reply. As I mentioned, I tried using a different version of wpa_supplicant which did not fix the problem. I was going to try the development version last night but the site was down so I will do that later along with viewing the extended debug output with -dd and dmesg.

One thing though, I'm using ndiswrapper and not madwifi so I don't know if your advice for that applies to me.
 
Old 01-06-2008, 04:08 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Wynd View Post
I'm using ndiswrapper and not madwifi so I don't know if your advice for that applies to me.
If you don't use it, then it shouldn't. BTW, it could be beneficial to also post the exact details of the card like brand, type, chipset, just in case somebody here already fixed that kind of problem.
 
Old 01-06-2008, 08:20 PM   #12
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
It's a Netgear WG111 v3.
 
Old 01-06-2008, 08:57 PM   #13
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
I don't know how you've setup your networking, but in Slackware-12.0 this is the proper way. Ignore my post if this is the way you did it.

First you should edit /etc/rc.d/rc.inet1.conf:
Code:
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
#IPADDR[0]="192.168.1.41"
#NETMASK[0]="255.255.255.0"
#USE_DHCP[0]="yes"
#DHCP_HOSTNAME[0]=""

# Config information for ath0:
IFNAME[1]="ath0"
IPADDR[1]="192.168.1.42"
NETMASK[1]="255.255.255.0"
#USE_DHCP[1]="yes"
#DHCP_HOSTNAME[1]=""
WLAN_ESSID[1]="philemon"
WLAN_MODE[1]=Managed
WLAN_RATE[1]="54M auto"
WLAN_CHANNEL[1]="10"
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"

# Default gateway IP address:
GATEWAY="192.168.1.1"

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="yes"
You don't need any more than that. You should turn on debugging output here, and replace my information with yours.

Then you can edit /etc/wpa_supplicant.conf:
Code:
# See /usr/doc/wpa_supplicant-0.5.8/wpa_supplicant.conf.sample
# for many more options that you can use in this file.

# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
  scan_ssid=0
  ssid="your_essid_here"
  proto=WPA
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP WEP104 WEP40
  psk=your_psk_here
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
# You'll need a recent version of wireless-tools for this!
network={
  ssid="any"
  key_mgmt=NONE
  priority=2
}
From the default file you only need to change "your_essid_here" to your ESSID, and add your key, replacing your_psk_here.

You might also want to get the latest madwifi package from Eric Hameleers' (Alien Bob in LQ) repository, or if you're running Slackware -current and a different kernel as I am, build it using his madwifi.SlackBuild script.

These may not solve your association problem, but they will assure you that your Slackware system is optimally setup.

NB: Eric Hameleers maintains those networking files for Slackware.

And btw, I think by "exact details of the card like brand, type, chipset" unSpawn is looking for some output like this:
Code:
02:04.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
        Subsystem: Askey Computer Corp. Unknown device 7064
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 17
        Region 0: Memory at d0010000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [44] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=2 PME-
 
Old 01-06-2008, 10:59 PM   #14
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
Thanks for the reply. As I mentioned, I am not using madwifi so I don't think that applies to me. As for chipset information, I'm not quite sure how to obtain all that since this is a USB device, not PCI, and it didn't seem to list it in the lsusb output. In any case, the output is here: http://pastebin.ca/844806 . I did all of the network setup stuff you mentioned, except I don't have scan_ssid=0 in wpa_supplicant.conf. I will add it and see if that makes a difference.
 
Old 01-07-2008, 01:12 AM   #15
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
The default Slackware-12.0 /etc/wpa_supplicant.conf file has "scan_ssid=0" -- it's not something I added.

Thanks for posting the "lsusb" output. It lists your device as:
Code:
Bus 1 Device 2: ID 0846:4260 NetGear, Inc.
so I looked it up in the Linux USB ID database and it tells me it's "0846 NetGear, Inc. -- 4260 WG111v3 802.11g Adapter [realtek RTL8187B]. What module (driver) is your card using? I don't think that's an Atheros card - madwifi is just for Atheros chipsets. My post has ath0 and information that is Atheros specific ... you can adjust yours accordingly.

I'm pretty certain your card uses the RTL8187 module. That came out with kernel 2.6.23, so you can use the 2.6.23.12 kernel in Slackware-current with that module (no need for ndiswrapper) and then maybe wpa_supplicant will work.

I'm shooting darts in the dark, here ... no experience with that chipset.
 
  


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
usb network adapter with ndiswrapper can't connect to wpa with wpa-supplicant AceofSpades19 Linux - Wireless Networking 8 03-30-2008 05:13 PM
cant get on wpa network wgato Linux - Wireless Networking 9 02-10-2007 12:37 PM
wireless network - WPA jaymoney Ubuntu 29 10-19-2006 10:08 AM
Linux machine constantly doing network Query. Wheat_Thins Linux - Software 1 01-18-2006 03:55 PM
WPA on wireless network The Patbon Mandriva 10 03-16-2005 10:55 PM

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

All times are GMT -5. The time now is 06:47 AM.

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