Jessie WIFI client: Difference between revisions

From embeddedTS Manuals
(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...")
 
No edit summary
Line 33: Line 33:
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:
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:
<source lang=bash>
<source lang=bash>
systemctl enable wpa_supplicant@wlan0
systemctl start wpa_supplicant@wlan0
systemctl start wpa_supplicant@wlan0
systemctl restart systemd-networkd  
systemctl restart systemd-networkd  
</source>
</source>

Revision as of 11:38, 1 June 2016

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 enable wpa_supplicant@wlan0
systemctl start wpa_supplicant@wlan0
systemctl restart systemd-networkd