Difference between systemd wpa_supplicant.service and [email protected]?
Solution 1
As stated on here, the wpa_supplicant.service file is for DBus aware services, so it will be autodetected by NetworkManager for example. As I imagine you are not using NetworkManager, either you have to write a program/script that will use DBus information to lift the interface or use the specific interface version [email protected]. Quoting:
The wpa_supplicant package provides multiple systemd service files:
wpa_supplicant.service - uses D-Bus, recommended for NetworkManager users.
[email protected] - accepts the interface name as an argument and starts the wpa_supplicant daemon for this interface. It reads a /etc/wpa_supplicant/wpa_supplicant-interface.conf configuration file.
[email protected] - also interface specific, but explicitly forces the nl80211 driver (see below). The configuration file path is /etc/wpa_supplicant/wpa_supplicant-nl80211-interface.conf.
[email protected] - also interface specific, uses the wired driver. The configuration file path is /etc/wpa_supplicant/wpa_supplicant-wired-interface.conf.
Solution 2
The [email protected]
installed with the wpa_supplicant package from pacman at /usr/lib/systemd/system/[email protected]
is a dynamic service file which allows a service such as wpa_supplicant@wlan0
to be managed. It will look for a wpa_supplicant configuration file at /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
, where the wlan0 in the filename corresponds to the wlan0 in the service name.
If your nic uses the nl80211 driver, you may use the [email protected]
in the same way. The configuration file it looks for is /etc/wpa_supplicant/wpa_supplicant-nl80211-<interface>.conf
Related videos on Youtube
rityzmon
Updated on September 18, 2022Comments
-
rityzmon over 1 year
Using Arch Linux on a Raspberry Pi and a USB Wi-Fi dongle, I can get Wi-Fi working by enabling the
wpa_supplicant@wlan0
systemd service. This uses the/etc/wpa_supplicant/[email protected]
file and specifies thewlan0
interface.I understand the
wpa_supplicant
systemd service does the same thing, except it autodetects the wireless interface, but starting this service instead doesn't work, even when I have a valid/etc/wpa_supplicant/wpa_supplicant.conf
file.How would I use the
wpa_supplicant
systemd service to autodetect the wireless interface and setup my Wi-Fi?If autodetection is not what the
wpa_supplicant
service does, what is the point of thewpa_supplicant
service vs thewpa_supplicant@interface
service?-
Dalvenjia almost 7 yearsTry with the configuration file
[email protected]
-
Heath Raftery about 4 yearsI believe
/etc/wpa_supplicant/[email protected]
should be/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
. In other words, the service uses the@
but the conf file uses-
.
-