def connect_savedwifi(thessid):
    # get all cells from the air
    print "connecting to saved wifi network"
    flushIP("wlan0")
    isok = False
    #ifdown("wlan0")
    isok = wpa_cli_mod.enable_ssid("wlan0", thessid)
    time.sleep(1)
    return isok
Beispiel #2
0
def connect_savedwifi(thessid):
	# get all cells from the air
	print "connecting to saved wifi network"
	flushIP("wlan0")
	isok=False
	#ifdown("wlan0")
	isok=wpa_cli_mod.enable_ssid("wlan0",thessid)
	time.sleep(1)
	#ifup("wlan0")			
	addIP("wlan0")	
	return isok