3x3cut0r
Posts: 6
Joined: Fri Dec 08, 2017 4:45 pm

Kein WLAN mit wpa_supplicant und systemd-networkd [gelöst]

Sun Jun 24, 2018 6:11 pm

Hallo
ich verzweifle gerade dabei eine WLAN-Verbindung mit dem systemd-networkd und wpa_supplicant mit meinem RaspberryPi 3B+ aufzubauen.
Meine Specs:
- RasbperryPi 3B+
- Raspbian Stretch, Kernel 4.14.41-v7+
- systemd 232-25+deb9u2

# cat /etc/systemd/network/20-wlan0.network

Code: Select all

[Match]
MACAddress=b8:27:eb:xx:xx:xx
Virtualization=no
Type=wlan

[Network]
DHCP=yes
IPv6AcceptRA=no
LinkLocalAddressing=no
Address=192.168.178.245/24
Gateway=192.168.178.1
DNS=192.168.178.1
DNS=8.8.8.8
DNS=8.8.4.4


# ip address show

Code: Select all

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:yy:yy:yy brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.244/24 brd 192.168.178.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2003::xxxx/64 scope global mngtmpaddr noprefixroute dynamic
       valid_lft 7179sec preferred_lft 1720sec
    inet6 fe80::xxxx/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b8:27:eb:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.245/24 brd 192.168.178.255 scope global wlan0
       valid_lft forever preferred_lft forever


# cat /etc/systemd/system/wpa_supplicant\@.service

Code: Select all

[Unit]
Description=Mein WPA-Service
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes

ExecStart=/sbin/ip l set %i up
ExecStart=/sbin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant/wpa_supplicant-%i.conf
ExecStart=/sbin/dhclient %i

ExecStop=/sbin/ip l set %i down

[Install]
WantedBy=multi-user.target


# cat /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE


# cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE
network={
        ssid="WLAN-12345"
        psk="*****"
        scan_ssid=1
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
}


# systemctl status systemd-networkd

Code: Select all

● systemd-networkd.service - Network Service
   Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-06-24 20:01:45 CEST; 47s ago
     Docs: man:systemd-networkd.service(8)
 Main PID: 132 (systemd-network)
   Status: "Processing requests..."
   CGroup: /system.slice/systemd-networkd.service
           └─132 /lib/systemd/systemd-networkd

Jun 24 20:01:45 RPi3 systemd[1]: Starting Network Service...
Jun 24 20:01:45 RPi3 systemd-networkd[132]: Enumeration completed
Jun 24 20:01:45 RPi3 systemd[1]: Started Network Service.
Jun 24 20:01:45 RPi3 systemd-networkd[132]: eth0: IPv6 enabled for interface: Success
Jun 24 20:01:48 RPi3 systemd-networkd[132]: eth0: Gained carrier
Jun 24 20:01:49 RPi3 systemd-networkd[132]: eth0: Gained IPv6LL
Jun 24 20:01:51 RPi3 systemd-networkd[132]: eth0: Configured
Jun 24 20:02:14 RPi3 systemd-networkd[132]: wlan0: IPv6 disabled for interface: Success


# systemctl status wpa_supplicant.service

Code: Select all

● wpa_supplicant.service - WPA supplicant
   Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-06-24 19:24:37 CEST; 28min ago
 Main PID: 271 (wpa_supplicant)
   CGroup: /system.slice/wpa_supplicant.service
           └─271 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant

Jun 24 19:24:37 RPi3 systemd[1]: Starting WPA supplicant...
Jun 24 19:24:37 RPi3 systemd[1]: Started WPA supplicant.
Jun 24 19:24:37 RPi3 wpa_supplicant[271]: Successfully initialized wpa_supplicant


# systemctl status [email protected]

Code: Select all

[email protected] - WPA supplicant daemon (interface-specific version)
   Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-06-24 19:51:45 CEST; 33s ago
 Main PID: 767 (wpa_supplicant)
   CGroup: /system.slice/system-wpa_supplicant.slice/[email protected]
           └─767 /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlan0.conf -Dnl80211,wext -iwlan0

Jun 24 19:51:45 RPi3 systemd[1]: Started WPA supplicant daemon (interface-specific version).
Jun 24 19:51:45 RPi3 wpa_supplicant[767]: Successfully initialized wpa_supplicant
Jun 24 19:52:03 RPi3 wpa_supplicant[767]: wlan0: Failed to initiate sched scan
Jun 24 19:52:11 RPi3 wpa_supplicant[767]: wlan0: Failed to initiate sched scan
Jun 24 19:52:18 RPi3 wpa_supplicant[767]: wlan0: Failed to initiate sched scan
Warum kommen hier die ganze Zeit diese "wlan0: Failed to initiate sched scan" Fehler?
Weil scannen lässt sich alles.
Mit:
# iw wlan0 scan
... wird mein WLAN-12345 angezeigt
auch mit wavemon kann ich nach WLANs scannen

Er verbindet sich nicht mit dem WLAN.

Fehlt hier irgend eine config? Habe ich was vergessen?
Die gezeigten Dienste sind alle enabled. Sonst kann ich auch keine Fehler erkennen.
Die configs wurde größtenteils von howtos von ubuntuusers.de kopiert.
Alle anderen Network-Manager wurden deinstalliert. auch dhcpcd.

Ich weis nicht mehr weiter.


//EDIT:
Ich werd wahnsinnig. Ich habe es gefunden:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE
network={
        ssid="WLAN-12345"
        psk="*****"
#        scan_ssid=1
#        proto=RSN
#        key_mgmt=WPA-PSK
#        pairwise=CCMP
#        group=CCMP
}
und schon gings :X

Return to “Deutsch”

Who is online

Users browsing this forum: No registered users and 4 guests