Based lousely on https://unix.stackexchange.com/questions/173781/how-can-i-enable-wpa-supplicant-on-boot
First, learn some useful commands such us:
iw wlan0 link # to find if your Wireless Device is UP or DOWN
iw wlan0 scan # To find information about the Access Points available to your device
ip addr # to find if the interface is getting IP address
Once you know your AP SSID you can use wpa_passphrase to create the configuration file needed For example:
# this will overwrite any previous wpa_supplicant.conf file so be careful
wpa_passphrase eir27228402-2.4G > /etc/wpa_supplicant/wpa_supplicant.conf
Once this is done you can try to see if your device is able to connect using wpa_supplicant like this: Note: You may need to kill running wpa_supplicant processes before trying again
wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
By default wpa_supplicant should start at boot time, but if that doesn't work you can try this to create the systemd configuration
- Create a systemd unit file /etc/systemd/system/[email protected]
[Unit]
Description=Wireless network connectivity (%i)
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 link set dev %i up
ExecStart=/sbin/wpa_supplicant -B -D wext -i %i -c /etc/wpa_supplicant/wpa_supplicant.conf
ExecStop=/sbin/ip link set dev %i down
[Install]
WantedBy=multi-user.target
- Create a link into the corresponding directory
ln -s /etc/systemd/system/network-wireless\@.service /etc/systemd/system/multi-user.target.wants/network-wireless\@wlan0.service
- Try restarting the services
systemctl enable [email protected]
systemctl daemon-reload
systemctl start [email protected]
- Voilá!