You are not logged in.

#1 2016-08-11 10:00:09

1Niklas
Member
From: Berlin, Germany
Registered: 2016-08-11
Posts: 6

[SOLVED] TL-WDN4800 wpa_supplicant not working

Hi, I use a TP-Link TL-WDN4800  PCI-E WiFi card which uses the Kernel module ath9k
I can't get wpa_supplicant working, although netctl works.
I have created the symlink for the hook which lets dhcpcd start wpa_supplicant

If I use "ip link" without starting any WiFI service, I get this output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether d0:50:99:75:1e:0a brd ff:ff:ff:ff:ff:ff
3: wlp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether ec:08:6b:0f:2f:ee brd ff:ff:ff:ff:ff:ff

If I use either "systemctl start dhcpcd@wlp4s0" or "ip link set wlp4s0 up", the state stays down and "ip link" gives this output:

...
3: wlp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether ec:08:6b:0f:2f:ee brd ff:ff:ff:ff:ff:ff

and I also get this error message in dmesg:

[   40.246446] IPv6: ADDRCONF(NETDEV_UP): wlp4s0: link is not ready

But if I use "netctl start wlp4s0-MySSID" everything works and "ip link" gives this output:

...
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether ec:08:6b:0f:2f:ee brd ff:ff:ff:ff:ff:ff

My /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf:

ctrl_interface=/var/run/wpa_supplicant
update_config=1
fast_reauth=1
ap_scan=1
country=DE

network={
	ssid="MySSID"
	priority=100
	psk="WPA2KEY"
	scan_freq=5180 5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5745 5755 5765 5775 5785 5795 5805 5825
	freq_list=5180 5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5745 5755 5765 5775 5785 5795 5805 5825
}

My /etc/netctl/wlp4s0-MySSID:

Description='Automatically generated profile by wifi-menu'
Interface=wlp4s0
Connection=wireless
Security=wpa
ESSID=MySSID
IP=dhcp
Key=WPA2KEY

I'd really appreciate it, if someone can help me with this problem smile

Last edited by 1Niklas (2016-08-11 17:03:39)

Offline

#2 2016-08-11 14:19:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: [SOLVED] TL-WDN4800 wpa_supplicant not working

Hi, and welcome to the Arch Linux forums.

I note that you are running the dhcpcd service, but you never show where you start  wpa_supplicant.   dhcpcd only works after you have associated with an access point.
wpa_supplicant is started by netctl as needed.  It can also be started by hand, or by the wpa_supplicant service.   On my system, I have enabled systemd-networkd.service and wpa_supplicant@wlo1.service.  I let the systemd-networkd control the launching of the dhcpcd daemon.

tl;dr; dhcpcd can do nothing until wpa_supplicant is running and is associated with an access point.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-08-11 15:18:47

1Niklas
Member
From: Berlin, Germany
Registered: 2016-08-11
Posts: 6

Re: [SOLVED] TL-WDN4800 wpa_supplicant not working

Hi, thank you for your help

Doesn't this say https://wiki.archlinux.org/index.php/dh … supplicant that the dhcpcd service automatically starts wpa_supplicant, if the symbolic link for the hook is created? (which I did)

Nevertheless I tried to start wpa_supplicant with

wpa_supplicant -Dnl80211 -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf

I get this output:

Successfully initialized wpa_supplicant
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
...
//cancelled with Ctrl-C 
nl80211: deinit ifname=wlp4s0 disabled_11b_rates=0
wlp4s0: CTRL-EVENT-TERMINATING 

Offline

#4 2016-08-11 15:43:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: [SOLVED] TL-WDN4800 wpa_supplicant not working

1Niklas wrote:

Doesn't this say https://wiki.archlinux.org/index.php/dh … supplicant that the dhcpcd service automatically starts wpa_supplicant, if the symbolic link for the hook is created? (which I did)

Ah, I have never done it that way.

Nevertheless I tried to start wpa_supplicant with

wpa_supplicant -Dnl80211 -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf

I get this output:

Successfully initialized wpa_supplicant
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
...
//cancelled with Ctrl-C 
nl80211: deinit ifname=wlp4s0 disabled_11b_rates=0
wlp4s0: CTRL-EVENT-TERMINATING 

Are you able to do a site survey doing iw dev wlp4s0 scan  (as root)?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2016-08-11 15:50:25

1Niklas
Member
From: Berlin, Germany
Registered: 2016-08-11
Posts: 6

Re: [SOLVED] TL-WDN4800 wpa_supplicant not working

yes,
iw dev wlp4s0 scan and wifi-menu list me all available networks

Offline

#6 2016-08-11 16:15:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,521
Website

Re: [SOLVED] TL-WDN4800 wpa_supplicant not working

I also just use dhcpcd@.service and let it start wpa_supplicant which works great.  I see two major differences between your approach and mine.  First, I just use /etc/wpa_supplicant/wpa_supplicant.conf.  You use the ...-interface.conf.  This may be fine - looking at the dhcpcd hook reveals there is logic there to detect this, but at several points, if anything goes wrong, it falls back to /etc/wpa_supplicant/wpa_supplicant.conf - have you tried using that config file name instead?

I also see your wpa_supplicant configuration has variables defined differently in the header.  My ctrl_interface is /run/wpa... not /var/run/wpa... I'm not sure if this matters, but it is noteworthy.  I also lack the fast_reauth, ap_scan and country variables.  The last may just be due to me being in the US which seems to often be the default assumption if not specified, but it may be worth trying different versions of wpa_supplicant.conf.

I don't know exactly how netctl works, but it essentially makes a wpa_supplicant.conf-like file out of the profile, and none of these extra settings are specified in the netctl profile ... and that works.

EDIT: as directly invoking wpa_supplicant with your config file explicitly specified still fails, I'd suspect it may be more likely that the variables at the start of your wpa_supplicant.conf may be the more likely suspect.  Start by trying without those.  Also is there a reason to use the -D flag to wpa_supplicant?  Start first without it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2016-08-11 17:02:41

1Niklas
Member
From: Berlin, Germany
Registered: 2016-08-11
Posts: 6

Re: [SOLVED] TL-WDN4800 wpa_supplicant not working

I've deleted the /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf file and edited the /etc/wpa_supplicant/wpa_supplicant.conf file.

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
fast_reauth=1

are indeed the default variables, maybe /run/wpa_supplicant was the default in an earlier version (?)

My /etc/wpa_supplicant/wpa_supplicant.conf know looks like this:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
fast_reauth=1
country=DE
network={
	ssid="MySSID"
	psk="WPA2KEY"
}

and the dhcpcd@wlp4s0 service now works smile
Thank you all smile

Last edited by 1Niklas (2016-08-11 17:41:39)

Offline

#8 2016-08-11 17:27:10

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [SOLVED] TL-WDN4800 wpa_supplicant not working

/var/run is symlinked to /run so either will work

Offline

Board footer

Powered by FluxBB