I have a LeMaker Guitar with Lemuntu installed. My wpa_supplicant.conf
file looks like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="MySSID"
psk="MyPasswd"
}
and my /etc/network/interfaces
file looks like this:
auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -B -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
pre-down killall -q wpa_supplicant
When I boot up my Guitar and the wi-fi router is already running the wi-fi connects just fine. But when I boot up my Guitar and power up router after, it does not connect. I tried to create cron job that every minute does dhclient wlan0
but it didn't work.
So my question is, how to connect automatically to this wi-fi if it goes up after I booted the Guitar.
wpa_supplicant
then rundhclient
:systemctl restart wpa_supplicant
wlan0
then runwpa_supplicant
anddhclient
.