Jessie WIFI client

From embeddedTS Manuals
Revision as of 12:10, 12 February 2016 by Mark (talk | contribs) (Created page with "If you're using a WPA/WPA2 network, first create your wpa_supplicant config: <source lang=bash> wpa_passphrase yournetwork yourpassword > /etc/wpa_supplicant/wpa_supplicant-wl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If you're using a WPA/WPA2 network, first create your wpa_supplicant config:

wpa_passphrase yournetwork yourpassword > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Create the file /lib/systemd/system/wpa_supplicant@.service with these contents

[Unit]
Description=WPA supplicant daemon (interface-specific version)
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=simple
ExecStart=/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I

[Install]
Alias=multi-user.target.wants/wpa_supplicant@%i.service

Now enable the service to start up automatically: systemctl enable wpa_supplicant@wlan0

Create the file /etc/systemd/network/wlan0.network with:

[Match]
Name=wlan0

[Network]
DHCP=yes

See the Networked clients example for setting a static IP for a network interface. The wlan0.network can be configured the same way as an eth.network. To enable these changes:

systemctl start wpa_supplicant@wlan0
systemctl restart systemd-networkd