systemd-networkd: wireless configuration does not work

Have a working cable connection using systemd-networkd, but wireless does not work:

erlangen:~ # networkctl 
IDX LINK             TYPE               OPERATIONAL SETUP     
  1 lo               loopback           carrier     unmanaged 
  2 wlp3s0           wlan               no-carrier  configuring
  3 enp0s31f6        ether              routable    configured

3 links listed.
erlangen:~ # 

Any idea?

wpa_supplicant is running, but scanning does not work:

erlangen:~ # systemctl status wpa_supplicant@wlp3s0.service 
● wpa_supplicant@wlp3s0.service - Mein WPA-Service
   Loaded: loaded (/etc/systemd/system/wpa_supplicant@.service; enabled; vendor preset: disabled)
   Active: active (exited) since Fri 2019-03-15 13:45:46 CET; 14min ago
  Process: 3661 ExecStop=/sbin/ip l set wlp3s0 down (code=exited, status=0/SUCCESS)
  Process: 3663 ExecStart=/usr/sbin/wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf (code=exited, status=0/SUCCESS)
  Process: 3662 ExecStart=/sbin/ip l set wlp3s0 up (code=exited, status=0/SUCCESS)
 Main PID: 3663 (code=exited, status=0/SUCCESS)
    Tasks: 1 (limit: 4915)
   Memory: 1.2M
   CGroup: /system.slice/system-wpa_supplicant.slice/wpa_supplicant@wlp3s0.service
           └─3664 /usr/sbin/wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Mar 15 13:45:46 erlangen systemd[1]: Starting Mein WPA-Service...
Mar 15 13:45:46 erlangen wpa_supplicant[3663]: Successfully initialized wpa_supplicant
Mar 15 13:45:46 erlangen systemd[1]: Started Mein WPA-Service.
erlangen:~ # 

/usr/sbin/iwlist scan works, but wpa_cli doesn’t:

erlangen:~ # wpa_cli
wpa_cli v2.6
Copyright (c) 2004-2016, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.


Selected interface 'wlp3s0'

Interactive mode

> scan
OK
<3>CTRL-EVENT-SCAN-STARTED 
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>CTRL-EVENT-NETWORK-NOT-FOUND 
> erlangen:~ # 

Performed the following actions:

  1. Created file /etc/systemd/network/30-wireless.network
  2. Changed file /etc/wpa_supplicant/wpa_supplicant.conf
  3. Enabled wpa_supplicant@wlp3s0.service

Content of files:

erlangen:~ # cat /etc/systemd/network/30-wireless.network
[Match]
Name=wlp3s0

[Network]
Address=192.168.178.31/24
Gateway=192.168.178.1

erlangen:~ # cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
    ssid="FRITZ!Box Karl Mistelberger"
    psk="............................."
}
erlangen:~ # 

Log:


erlangen:~ # journalctl -b -u systemd-networkd
-- Logs begin at Mon 2019-02-11 16:20:00 CET, end at Fri 2019-03-15 18:25:53 CET. --
Mar 15 18:09:46 erlangen systemd[1]: Starting Network Service...
Mar 15 18:09:46 erlangen systemd-networkd[526]: Enumeration completed
Mar 15 18:09:46 erlangen systemd[1]: Started Network Service.
Mar 15 18:09:47 erlangen systemd-networkd[526]: wlan0: Interface name change detected, wlan0 has been renamed to wlp3s0.
Mar 15 18:09:47 erlangen systemd-networkd[526]: lo: Link is not managed by us
Mar 15 18:09:47 erlangen systemd-networkd[526]: eth0: Interface name change detected, eth0 has been renamed to enp0s31f6.
Mar 15 18:09:47 erlangen systemd-networkd[526]: lo: Link is not managed by us
Mar 15 18:09:49 erlangen systemd-networkd[526]: wlp3s0: Gained carrier
Mar 15 18:09:50 erlangen systemd-networkd[526]: wlp3s0: Gained IPv6LL
Mar 15 18:09:52 erlangen systemd-networkd[526]: wlp3s0: Configured
Mar 15 18:09:54 erlangen systemd-networkd[526]: enp0s31f6: Gained carrier
Mar 15 18:09:55 erlangen systemd-networkd[526]: enp0s31f6: Gained IPv6LL
Mar 15 18:09:57 erlangen systemd-networkd[526]: enp0s31f6: Configured
erlangen:~ # 

erlangen:~ # systemd-analyze blame|grep network
            41ms systemd-networkd.service
erlangen:~ #