You are not logged in.
hi,
I want to setup my wifi as simple as possible without some sort of manager.
So I'm using 'wpa_supplicant' in combination with 'dhcpcd'.
What is the easiest/fastest way to enable my wireless interface at boot (ip link set wlp1s0 up) before wpa_supplicant and dhcpcd are run?
Thx!
Last edited by chrisdb (2019-03-02 10:13:48)
Failure is success in progress.
A.E.
Offline
There is no need to do `ip link set {netif} up`, wpa_supplicant should handle that.
What have you tried so far?
I'm currently using netctl, but I was thinking of just using 'wpa_supplicant' and 'dhcpcd' because it would require less setup
during a new installation and maybe increase boot time...
I thought the interface needed to be setup first, as indicated on the Wiki:
'Activate the interface' comes before 'Connect to an access point'
The steps I would try during a new installation are the following:
wpa_passphrase "$ssid" "$wpa_key" > /etc/wpa_supplicant/wpa_supplicant-wlp1s0.conf
systemctl enable wpa_supplicant@wlp1s0
systemctl enable dhcpcd@wlp1s0
So basically this would be enough?
Failure is success in progress.
A.E.
Offline
That looks fine to me, yes.
I thought the interface needed to be setup first, as indicated on the Wiki:
'Activate the interface' comes before 'Connect to an access point'
Yes, but those subsections are in the iw section, not in the WPA2 section, so they don't apply to wpa_supplicant.
Last edited by ayekat (2019-02-28 13:47:14)
Offline
I prefer just enabling the wpa_supplicant hook of dhcpcd, then the only systemd service you need to enable is dhcpcd@wlp1s0.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I use this custom unit file to bring the interface up, start wpa_supplicant and assign the IP addresses:
https://raw.githubusercontent.com/Head- … 40.service
No need for dhcpcd then
That's for Debian though so perhaps swap /sbin/$command for /usr/bin/$command and also adjust the addresses to suit your network, obviously — use `ip r` to check the addresses assigned by dhcpcd and copy those if you're not sure (the "default via" address should be for your router).
Usage example:
# systemctl enable --now network-wireless@wlp1s0
Note that the interface must be set down before the unit file is started or it will fail.
Last edited by Head_on_a_Stick (2019-02-28 20:04:22)
Jin, Jîyan, Azadî
Offline
That looks fine to me, yes.
Thx indeed that was enough
I'll also be looking into the other propositions from Trilby and Head_on_a_Stick , but for now this seems to be the easiest way...
Failure is success in progress.
A.E.
Offline