Raspberry Pi ssh total dropped

Before starting a raspberry pie, but remote ssh connection frequently dropped calls, began to think that the power does not work, cause the machine to reboot later added a monitor, observe a period of time, and found that the machine does not restart, WiFi should be dropped, found on the Internet, raspberry pie if there is no traffic for a network, there will be WiFi dropped the case, and found a script for a scheduled restart WiFi, solved the problem

#!/usr/bin/python
import os, time

while True:
    if '192' not in os.popen('ifconfig | grep 192').read():
        print '\n****** wifi is down, restart... ******\n'
        os.system('sudo /etc/init.d/networking restart')
    time.sleep(5*60) #5 minutes

Guess you like

Origin www.cnblogs.com/xsirfly/p/11619552.html