Private Sub connectToWifi
Private connectionStart As Long = DateTime.Now
Private connectionTimeOut As Long = 300000
Starter.wifi.EnableWifi(False)
Starter.wifi.EnableWifi(True)
If Starter.wifi.WifiSSID <> Starter.ServerWifiName Then
Starter.wifi.disconnectWifiAP
Starter.wifi.saveWifiAP(Starter.ServerWifiName , 2 , Starter.ServerWifiPassword,True ,30000)
Do Until Starter.wifi.isWifiConnected
Sleep(0)
If DateTime.Now > connectionStart + connectionTimeOut Then
Log("CONNECTION FAILED")
Return
End If
Loop
checkconnection="true"
Log(Starter.wifi.ActiveNetworkTypeName)
End If
End Sub