I am Running a raspberrypi 3 as a small Squid Proxy. but from time to time I need to log in and need to restart the wlan0 interface. The raspberrypi lost its network connection. I cannot reach the box using ping or ssh.
Network configuration /etc/network/interfaces
Code:
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.14
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 192.168.0.1
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.15
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 192.168.0.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
pre-up iw dev wlan0 set power_save off
post-down iw dev wlan0 set power_save on
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
When I lost connection I need to log in directly and run the commands in a root shell
Code:
# ifdown wlan0
# ifup wlan0
To make it work again. How can I avoid this?
The interface is not allowed for power save.