Jessie WIFI client: Difference between revisions

From embeddedTS Manuals
(Added clarifications)
mNo edit summary
Line 1: Line 1:
{{Note|If the WiFi driver isn't already loaded, load it now with "modprobe wilc3000"}}
If connecting to a WPA/WPA2 network, a wpa_supplicant config file must first be created:
If connecting to a WPA/WPA2 network, a wpa_supplicant config file must first be created:
<source lang=bash>
<source lang=bash>

Revision as of 12:05, 19 April 2017

Note: If the WiFi driver isn't already loaded, load it now with "modprobe wilc3000"


If connecting to a WPA/WPA2 network, a wpa_supplicant config file must first be created:

wpa_passphrase yournetwork yournetworkpassphrase > /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


Next, enable the service to start up on boot:

systemctl enable wpa_supplicant@wlan0


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

[Match]
Name=wlan0

[Network]
DHCP=yes


See the systemctl-networkd 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 all of the changes that have been made, run the following commands:

systemctl enable wpa_supplicant@wlan0
systemctl start wpa_supplicant@wlan0
systemctl restart systemd-networkd