RPi3 Auto reconnect to wifi when lost connect
Create script file
#!/bin/bash
SSID=$(/sbin/iwgetid --raw)
if [ -z "$SSID" ]
then
echo "`date -Is` WiFi interface is down, trying to reconnect" >> /home/pi/wifi-log.txt
sudo ifconfig wlan0 down
sleep 30
sudo ifconfig wlan0 up
fi
echo "WiFi check finished"Make new file executable
Install cron
Edit crontab
Check log file
Last updated
