# [SOLVED] wpa_supplicant: no configuration found 4 current AP

## NP_complete

I'm using systemd.  Trying to connect manually to an UNSECURED WLAN, to no avail.  "reason=3" means something is messed up on my end, but I can't figure out what.  The command is  *Quote:*   

> $ iw dev wlp3s0 connect <name>

 and the wpa_supplicant.log says *Quote:*   

> Successfully initialized wpa_supplicant
> 
> wlp3s0: No network configuration found for the current AP
> 
> wlp3s0: CTRL-EVENT-DISCONNECTED bssid=88:dc:96:03:5b:28 reason=3 locally_generated=1

 The kernel says: *Quote:*   

> [  799.221237] wlp3s0: authenticate with 88:dc:96:03:5b:28
> 
> [  799.222218] wlp3s0: send auth to 88:dc:96:03:5b:28 (try 1/3)
> 
> [  799.222485] iw (330) used greatest stack depth: 3440 bytes left
> ...

 wpa_configuration.service: *Quote:*   

> [Unit]Description=WPA supplicant
> 
> [Service]
> 
> Type=dbus
> ...

 wpa_supplicant.conf:

 *Quote:*   

> # Allow users in the 'wheel' group to control wpa_supplicant
> 
> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
> 
> # Allow user-made changes to be saved (e.g. add networks)
> ...

 Why, for life, would it authenticate and immediately deauthenticate???

Many thanks.Last edited by NP_complete on Sun Oct 19, 2014 11:00 am; edited 1 time in total

----------

## mir3x

Because u cannot use wpa_supplicant and connect using iw probably.

Either configure that network in wpa_supplicant.conf 

and connect via wpa_supplicant or disable wpa_supplicant and connect via iw or iwconfig.

ANyway your wpa_supplicant.conf is incorrect too.

(in wpa_supplicant add ssid="NETWORK_NAME" )

----------

## NP_complete

mir3x,

I used iw to connect because the connection doesn't happen automatically.  That's how I did troubleshooting.  I'm having a really really hard time getting used to SYSTEMD, and I have little choice: Gnome-3.12 requires it.

I added an appropriate ssid as you suggested, but that didn't change much.  My laptop doesn't connect to WLAN automatically, and the wpa_supplicant doesn't show any errors.  All it says is: "Successfully initialized wpa_supplicant".  If somebody with systemd expertise could help step by step, that would be awesome.  There gotta be a way to get to the bottom of this!

Many thanks.

----------

## mole

Have you tried starting wpa_supplicant from the command line? My wifi connects with  

```
/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -W -B -i wlan0 -P /var/run/wpa_supplicant-wlan0.pid
```

after loading the modules

and /etc/wpa_supplicant/wpa_supplicant.conf containing

```

ctrl_interface=/var/run/wpa_supplicant

network={

        ssid="SOME_PUBLIC_SSID"

        key_mgmt=NONE

        }
```

Then setting DNS and route information. If that doesn't work it's maybe not a systemd issue.....??

----------

## NP_complete

mole,

1.  How do I specify DNS and routing info?  If it's through /etc/resolv.conf, then this file gets overwritten by dhcpcd and ends up empty.  (It only contains comments).  resolv.conf is supposed to be handled by Gnome's NetworkManager, not dhcpcd.  Am I right?

2.  I don't know if there is an easy way to start wpa_supplicant from the command line: it is automatically started by something else. (Gnome Network Manager maybe?)  So when I do  *Quote:*   

> systemctl stop wpa_supplicant

  and then  *Quote:*   

> systemctl status wpa_supplicant

  wpa_supplicant is shown as active.  The invocation command, in my case, is  *Quote:*   

> /usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -f/var/log/wpa_supplicant.log -u

  which comes from wpa_supplicant.service.

3.  Most likely, the problem is NOT in systemd.  It's that systemd does things differently, and I can't get myself unstuck because of that.

Again, step by step instructions will really help.

----------

## mole

 *NP_complete wrote:*   

> mole,
> 
> 1.  How do I specify DNS and routing info?  If it's through /etc/resolv.conf, then this file gets overwritten by dhcpcd and ends up empty.  (It only contains comments).  resolv.conf is supposed to be handled by Gnome's NetworkManager, not dhcpcd.  Am I right?

  I wouldn't worry about that until the card/stick gets an IP address, you can overwrite /etc/resolv.conf and set route(s) after then if you need to.

 *NP_complete wrote:*   

>  2.  I don't know if there is an easy way to start wpa_supplicant from the command line: it is automatically started by something else. (Gnome Network Manager maybe?)  So when I do  *Quote:*   systemctl stop wpa_supplicant  and then  *Quote:*   systemctl status wpa_supplicant  wpa_supplicant is shown as active.  The invocation command, in my case, is  *Quote:*   /usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -f/var/log/wpa_supplicant.log -u  which comes from wpa_supplicant.service.

 

If wpa_supplicant is starting automatically, the next step may be to check the correct modules are being loaded, and if there's any firmware which you need to download and copy into /lib/firmware. Have you had this card/stick working before on another network? 

 *NP_complete wrote:*   

> Again, step by step instructions will really help.

 

I guess step by step would be:

1 Check you have the latest modules and firmware required, depending on which card you have

2 Make sure /etc/wpa_supplicant/wpa_supplicant.conf is correctly written, with the SSID in quotes as shown - should that DIR= be in the top line...?

3 In a root console, enter 

```
ls -l /sys/class/net
```

 to check the interface is still named wlp3s0

4 Start dhcpcd

5 Make sure modules for the wireless card / stick are loaded 

```
lsmod
```

6 Kill any running instances of wpa_supplicant 

```
ps aux|grep wpa
```

```
kill -9 <PIDS of wpa>
```

6 As root, enter (on one line) - assuming it's still wlp3s0

```
 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -W -B -i wlp3s0 -P /var/run/wpa_supplicant-wlp3s0.pid
```

7 Check to see if you have an ip address, ifconfig will also show the number of sent and received packets

Getting late now, hope that makes sense and is some use....    my money would be on problems with modules/firmware or wpa_supplicant.conf    FWIW

----------

## NP_complete

Can you please post your NetworkManager.service file?

I've done more troubleshooting.  Everything goes well when NetworkManager is off.  I first start WPA Supplicant, then DHCPCD, then use 'iw' to connect, and things "just work", so my DHCPCD config is probably ok (although its syntax does seem strange, I admit).  Now the NeworkManager kicks in (which I need for Gnome), and things immediately get violent.  After some Google'ing, I found that (please correct if this is not true and/or outdated):

1.  NeworkManager and DHCPCD have a fistfight when running side by side.

2.  The latter must NOT be run independently but be activated by the NM.

So, I deactivated all the three and manually started NM.  It automatically started WPA Supplicant but not DHCPCD.  And this is where I started getting the same errors I mentioned in the original post.  I guess, I'm back to square 1, but at least I've verified that the problem is caused by neither the hardware support in the kernel nor a bogus wpa_supplicant.conf file.  This also made me wonder if my NetworkManager conf (which I never touched) is bad.  Or maybe it doesn't use DHCPCD anymore?  But then why is it complied with that USE flag?

My NetworkManager.service file contains NO reference to DHCPCD: *Quote:*   

> [Unit]
> 
> Description=Network Manager
> 
> Wants=network.target
> ...

 

----------

## snum

Hi!

Do you test WiFi from other laptops/computers?

Do you have desktop environment on laptop(gnome,kde or others), networkmanager?

Thanks.

 *NP_complete wrote:*   

> I'm using systemd.  Trying to connect manually to an UNSECURED WLAN, to no avail.  "reason=3" means something is messed up on my end, but I can't figure out what.  The command is  *Quote:*   $ iw dev wlp3s0 connect <name> and the wpa_supplicant.log says *Quote:*   Successfully initialized wpa_supplicant
> 
> wlp3s0: No network configuration found for the current AP
> 
> wlp3s0: CTRL-EVENT-DISCONNECTED bssid=88:dc:96:03:5b:28 reason=3 locally_generated=1 The kernel says: *Quote:*   [  799.221237] wlp3s0: authenticate with 88:dc:96:03:5b:28
> ...

 

----------

## NP_complete

Snum, the WiFi I'm using to install Gentoo is perfectly functional: it works with the other laptop I have.  I unfortunately do not have a wired Internet access.  For your second question, I'm trying to set up the Gnome-3.12/Systemd combo on a laptop, and, yes, I am having trouble with the NetworkManager (see above) Gnome-3 requires.

Many thanks.

----------

## mir3x

I dont use systemd - but I check sometimes what changed there, and in 216 there was something about systemd::dhcp not broadcasting by default ? maybe u have also systemd-network enabled  fighting for net too? or maybe u have to enable it ? or maybe enable broadcasting in 216 ?

And there was some post about gnome-3.12 without systemd some time ago ... some kung-fu with some flags and I guess it worked, but I didnt read to end.

----------

## NP_complete

mir3x, you mean port 216?  If at all possible, can you send the link(s)?

I did try to set up Gnome 3.12 with OpenRC, but was told this is not recommended because not envisioned by the upstream devs.  Of course, I would MUCH MUCH rather do business with OpenRC.

Calling all Gnome-3+Systemd+NetworkManager+dhcpcd experts.  Please help.  Any step by step guidance will be appreciated.  Everything works without the NM, but I need the NM for Gnome.  Being new to Systemd, I'm almost positive I overlooked something silly like a config file of some sort.  The solution gotta be trivial.

Many thanks.

----------

## mir3x

I dont know how to call it - just systemd version 216

google systemd what's new -> http://cgit.freedesktop.org/systemd/systemd/tree/NEWS

shortly: systemd-networkd's DHCP client will no longer request

          broadcasting by default, as this tripped up some networks.

          For hardware where broadcast is required the feature should

          be switched back on using RequestBroadcast=yes.

( thats a total mystery for me, so now most systems will need to add RequestBroadcast=yes ?? instead few to add RequestBroadcast=no )

but check page, there is a more  changes to dhcp... if u upgrading systemd u have to go read whats changed first I guess.

----------

## snum

 *NP_complete wrote:*   

> Snum, the WiFi I'm using to install Gentoo is perfectly functional: it works with the other laptop I have.  I unfortunately do not have a wired Internet access.  For your second question, I'm trying to set up the Gnome-3.12/Systemd combo on a laptop, and, yes, I am having trouble with the NetworkManager (see above) Gnome-3 requires.
> 
> Many thanks.

 

Please check

1. Setup USE

File/etc/portage/make.conf

USE="... networkmanager..."

if needs, update world

2. Check driver for wi-fi card

select driver for wifi card in kernel*(Networking support/Wireless) or install from portage

3. install networkmanager with USE="wifi"

4. Reboot your system

5. Go to All settings/Network and setup wifi connection.

P.s.: you do not have a wired Internet access. why do you need dhcp?

----------

## mir3x

Check if u have enabled dhcpcd@wlp3s0.service, if yes, disable it and problem solved

----------

## NP_complete

EDIT (10/19/2014): SOLVED.  The config file was erroneous (missing network name), and no network interface (wlp3s0, in my particular case) was indicated via -i option.

************************

EDIT (9/9/2014): this topic is now being discussed at https://bugzilla.gnome.org/show_bug.cgi?id=736206

************************

Thx for help, guys.

1.  The NM is already built with dhcp,systemd,wext,wifi USE flags.

2.  I added networkmanager as a USE flag into make.conf and rebuilt (emerge --deep --newuse @world), but nothing changed.

3.  I do use DHCPCD, not because I have a wired connection (I DON'T; I depend 100% on WiFi), but because that's how I access WiFi, since NetworkManager doesn't work.

4.  I run DHCPCD as a normal daemon, not as dhcpcd@wlp3s0.service, and never mix it with NM.

The WPA_Supplicant log is below.  (Pardon the length).  It finds the correct network and blacklists it!  So, my biggest question is: how come WPA Supp succeeds with DHCPCD and fails with NM under the same configuration??

wpa_supplicant.service:

 *Quote:*   

> wpa_supplicant v2.0
> 
> random: Trying to read entropy from /dev/random
> 
> dbus: Register D-Bus object '/fi/w1/wpa_supplicant1'
> ...

 

Many thanks again.

----------

