Hello, I start my Raspberry connection at startup using wpa_supplicant@wlan0.service and dhcpcd-wifi-wpa@wlan0.service, which is a customized version of dhcpcd, like this:
$this->bbcode_second_pass_code('', '[Unit]
Description=dhcpcd for WPA-protected wifi on %I
Wants=network.target
Requires=wpa_supplicant@%I.service
After=wpa_supplicant@%I.service
Before=network.target
[Service]
Type=forking
PIDFile=/run/dhcpcd-%I.pid
ExecStart=/sbin/dhcpcd -A -q -w %I
ExecStop=/sbin/dhcpcd -k %I
[Install]
Alias=multi-user.target.wants/dhcpcd-wifi-wpa@wlan0.service')
This works just fine, but sometimes I can't ping my raspberry anymore. I suspect the router I connect to (I don't have access to it) is of low quality and the network sometimes goes down. Is there a way to make sure my raspberry tries to reconnect and obtain an IP everytime the connection is lost?