Link to home
Start Free TrialLog in
Avatar of CEHJ
CEHJFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Wirless connection dropping frequently

Here's my setup:

TL-WN721N USB adapter. This uses:

goose@vaio:/tmp$ lsmod | grep ath
ath9k_htc              43082  0 
ath9k_common           12648  1 ath9k_htc
ath9k_hw              311433  2 ath9k_common,ath9k_htc
ath                    17114  3 ath9k_hw,ath9k_common,ath9k_htc
mac80211              171389  1 ath9k_htc
cfg80211              113445  3 mac80211,ath,ath9k_htc
usbcore               104555  7 ehci_hcd,uhci_hcd,btusb,ath9k_htc,uvcvideo,usbhid

Open in new window

My router is BT Home Hub 4 (Type A) | Software version 4.7.5.1.83.8.130.1.17 | Last updated 08/12/13 (the latest firmware)
This is its wireless config:
User generated imageUser generated image
The problem is that the wireless connection drops frequently with the following coming up when that happens in /var/log/messages

Mar 10 08:54:34 vaio wpa_supplicant[2590]: wlan1: WPA: Group rekeying completed with cc:33:bb:12:a7:fc [GTK=TKIP]

Open in new window


I've got an idea what could be causing this but don't want to bias you diagnosticians by mentioning it. Even if i'm right, i'm not sure of a good solution.

What do you think can be done?
SOLUTION
Avatar of masnrock
masnrock
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ

ASKER

OK,  i think perhaps i'm going to mention my 'theory' such as it is. I have a suspicion that TKIP could be a problem. As i understand it, and here i could easily be wrong, TKIP was introduced as a partial patch to earlier protocols such as WEP, the idea being to 'roll' the key to prevent cracking. The next part of the theory is that BT don't want to break too many wireless drivers by using the more up-to-date AES. I think it's conceivable that my driver/adapter could have a problem with TKIP. So that's the theory and i have little evidence for it.

Disabling encryption could be a good test and of course if it works better, it wouldn't go against the above theory.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ

ASKER

Although TKIP is supported by WPAv2 it doesn't play nice with all devices.
So you think my theory could be correct? ;)
I don't think you get the option to choose AES or TKIP though on the BT HomeHub (I have a HH3)
You're not saying that you (personally) do get to choose AES are you?
so you can only really go with WPA.  That should force the HH to use TKIP although it's not guaranteed
I'm confused - i thought we want to avoid TKIP..?
So you think my theory could be correct? ;)
I think you are on the right track.

You're not saying that you (personally) do get to choose AES are you?
No.  I'm not at home and can't access my HH3, but I seem to remember that you don't get the option to choose the encryption.  What I mean is that I can't be 100% sure.

I'm confused - i thought we want to avoid TKIP..?
That's not what I'm saying exactly...

Your HH4 is set to use WPA2 only.  That means that ONLY AES should be used, but you're clearly using TKIP.  TKIP was designed for WPA1 not WPA2, therefore the fact that TKIP is being used with WPA2 might be the issue.  If we force the HH4 to use WPA1 it should also force it to use TKIP only.  That would be a good combination (WPA and TKIP) so you shouldn't get issues like you are now with WPA2 and TKIP.
Avatar of CEHJ

ASKER

TKIP was designed for WPA1 not WPA2, therefore the fact that TKIP is being used with WPA2 might be the issue.  
OK, so i think you're saying that it's not necessarily TKIP per se that's the problem, but TKIP mixed with WPA2 (please correct me if i'm wrong)
I'll switch to WPA(1) only and see if that helps
OK, so i think you're saying that it's not necessarily TKIP per se that's the problem, but TKIP mixed with WPA2
Bingo! :-)
Avatar of CEHJ

ASKER

User generated imageUpdate: i'm going to try the following. I think i originally eschewed the n setting as i guessed that another household device wouldn't support n, so if im right about that (i'll find out later) then i'll go with Plan A

User generated image

Aargh! Still getting

Mar 10 18:03:07 vaio wpa_supplicant[2590]: wlan1: WPA: Group rekeying completed with cc:33:bb:12:a7:fc [GTK=TKIP]

Open in new window


Going to reboot HH
Don't bother trying the 40MHz option.  At 2.4GHz that won't work with most devices now as everyone agreed that using 40MHz channels would use too much of the frequency band and cause unnecessary interference.  That means that a lot of devices don't support 40MHz channels at 2.4GHz so you might see worse performance, or no connection at all.

You could try configuring your PC/Laptop's wireless profile manually.  This will let you specify WPA1 only on the HH and WPA1 and TKIP on the laptop.
Avatar of CEHJ

ASKER

So far, it doesn't seem any worse ;)

The following are the (gui) options i have for Network Manager

User generated image
OK you may not (probably) be connecting at 802.11n rates then.

Hmmm you can't specify the encryption there either?
Avatar of CEHJ

ASKER

No, that's the lot
Is there a different driver you could use that gives you the options?
WPA2 uses AES by default, whereas WPA used TKIP. And yes, as each encryption method was introduced, it was meant to address previously found flaws in the previous schemes. It is possible that your wireless devices do not support things quite right, or that something needs an update.
Avatar of CEHJ

ASKER

It's all a bit puzzling. Something seems to be 'sticking to' TKIP. I haven't yet seen a driver other than the kernel module in use as shown above. That's not to say it doesn't exist but i get the feeling it ought to 'just work'
You're right - it 'ought' to work, and it does sometimes, but some devices follow the standards better than others.  Unfortunately I don't think the HH4 is one of those devices which adheres too well, in an attempt to maximize compatibility.

Do you have a smartphone you can try?
Avatar of CEHJ

ASKER

Do you have a smartphone you can try?
Afraid not - mine's as dumb as hell

It must be said that another laptop here with the same OS (not too sure about the wireless chipset) doesn't have any problem with the HH4
That makes me think even more that it's a driver thing.

Have you had a look here...?

http://wireless.kernel.org/en/users/Drivers/ath9k_htc
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ

ASKER

Have you had a look here...?

http://wireless.kernel.org/en/users/Drivers/ath9k_htc
Yes. As you can see though, that's what i'm currently using
Try to set WPA2-only on access point, that is the only secure config nowadays.
Avatar of CEHJ

ASKER

Yes, that's what the AP is currently set to
Weird, it should not provide TKIP then
Maybe ther is some super-duper advanced setting altering between AES/TKIP/Both ?
Avatar of CEHJ

ASKER

Hmm. Maybe there's something that could be done with wpa-supplicant?
For yout network in /etc/wpa_supplicant.conf

# aka WPA2
mode=RSN
#aka AES
pairwise=CCMP
group=CCMP
Which Linux distro are you using?
Avatar of CEHJ

ASKER

For yout network in /etc/wpa_supplicant.conf

Looks promising!

Which Linux distro are you using?
Debian Wheezy + XFCE
Well actually, you should be good to go once you use gheist's post if you're using WPA2 only. Otherwise, you need to switch to WPA + WPA2, which does allow for the usage of TKIP for compatibility's sake. And as craigbeck cited, you would not be able to get N speeds with anything below WPA2, unless you turned off security completely. Have you also checked for patches for your OS? They might have fixed that option at least.
depends. if you have networkmanager running then you need to use nm-applet in xfce to set network options.
Avatar of CEHJ

ASKER

What i'd like to do is experiment a little with wpa_cli before i try setting a file-based config. As it happens, the only wpa_supplicant.conf on my system is one used by dbus and certainly looks nothing like the man example configs
Avatar of CEHJ

ASKER

then you need to use nm-applet in xfce to set network options.
Certainly looks that way unless i hack it to override it
you can experiment with nm-applet, in worst case remove network definition and connect again...
Avatar of CEHJ

ASKER


you can experiment with nm-applet, in worst case remove network definition and connect again...

Trouble is, that won't let me do much (see total options for security above)
gnome-network-manager is the control panel with all options (there is no LXDE equivalent, so LXDE gives gnome variant as own child)
Avatar of CEHJ

ASKER

network-manager-gnome is the package i have installed. It contains nm-applet (screenshot shown above)
you have network configurator in menu where you can force WPA2 and AES
Avatar of CEHJ

ASKER

THIS post (an intricate screenshot ;)) shows the only security config options i currently have
On OpenSUSE/kde i have dialog automatic/tkip/aes-ccmp when i select wpa/wpa2 psk
Could you show us the contents of your existing config file?
Avatar of CEHJ

ASKER

Could you show us the contents of your existing config file?
There isn't one as such - only the dbus one. This is how wpa-supplicant is launched:
 /sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant

Open in new window

which is mysterious in itself as most of those switches are not even in my man page

fwiw, i attach the dbus file
wpa-supplicant.conf.txt
it should be /etc/wpa_supplicant.conf or something like that.
Avatar of CEHJ

ASKER

But i've already said - it doesn't exist on my system
Connections are under /etc/NetworkManager/system-connections
man 5 nm-settings has following:
(it did not copy/paste well, but if you press /CCMP in manual page it gets right one)
Avatar of CEHJ

ASKER

Well done! Here it is

[connection]
id=BTHub4-CK85
uuid=3d2bde2a-bd3f-40e1-94fe-597093681f50
type=802-11-wireless
timestamp=1391261393

[802-11-wireless]
ssid=BTHub4-CK85
mode=infrastructure
mac-address=54:E6:FC:88:7C:42
security=802-11-wireless-security

[802-11-wireless-security]
key-mgmt=wpa-psk
psk=XXXXXXXXXXXXXXXX

[ipv4]
method=auto

[ipv6]
method=ignore
ip6-privacy=2

Open in new window

This will force WPA2+AES:

[802-11-wireless-security]
key-mgmt=wpa-psk
psk=XXXXXXXXXXXXXXXX
proto=rsn
pairwise=ccmp
group=ccmp
Avatar of CEHJ

ASKER

I can't find any corroboration in man pages. These seem to be the only ones i have:

goose@vaio:/tmp$ lc NetworkManager | grep man
/usr/share/man/man5/NetworkManager.conf.5.gz
/usr/share/man/man8/NetworkManager.8.gz
goose@vaio:/tmp$ lc NetworkManager | grep man
/usr/share/man/man5/NetworkManager.conf.5.gz
/usr/share/man/man8/NetworkManager.8.gz
goose@vaio:/tmp$ lc nm- | grep man
/usr/share/man/man1/nm-applet.1.gz
/usr/share/man/man1/nm-online.1.gz
/usr/share/man/man1/nm-tool.1.gz
/usr/share/man/man5/nm-system-settings.conf.5.gz

Open in new window

OpenSUSE:
$ apropos NetworkManager
NetworkManager (8)   - network management daemon
NetworkManager.conf (5) - NetworkManager configuration file
nm-online (1)        - ask NetworkManager whether the network is connected
nm-settings (5)      - Description of settings and parameters of NetworkManager
nm-system-settings.conf (5) - Deprecated NetworkManager configuration file
nm-tool (1)          - utility to report NetworkManager state and devices
nmcli (1)            - command - line tool for controlling NetworkManager

"lc" is mono licence compiler, no idea how it functions on ubuntu
Avatar of CEHJ

ASKER

http://manpages.ubuntu.com/manpages/saucy/man5/nm-settings.5.html

Perhaps?

Mar 14 00:00:51 vaio wpa_supplicant[2591]: wlan1: WPA: Group rekeying completed with cc:33:bb:12:a7:fc [GTK=TKIP]

Open in new window

still happening after new settings
Fro the suse's mouth: (client has b43 card, server ralink, server is openwrt, and does not use TKIP or WPA1 as configured.

As you see WPA is used as name for  WPA2.

wlan0: WPA: Key negotiation completed with aa:bb:cc:dd:ee:ff [PTK=CCMP GTK=CCMP]
Avatar of CEHJ

ASKER

I'm beginning to think that part of my kit, perhaps nm, perhaps wpa_, perhaps both, is not able to support this. I think missing gui options should be a signal that they're not going to be honoured if they're forced into config files. And that's what's happening - nm simply creates a new config file without my forced settings when a new session is created.
try to edit file with nm stopped?
Avatar of CEHJ

ASKER

Thanks folks. Pretty unfathomable. It could be partly due to my poor quality router.
Try some friends' USB wifi card...