Re: Wi-Fi Reconnect
Posted: Thu Jun 01, 2017 6:04 am
Hi,
Basically I query google.com, and if I got an empty string it means that i'm not connected to the internet (or google is down ) then reconnect
Not sure if is the best method..
Basically I query google.com, and if I got an empty string it means that i'm not connected to the internet (or google is down ) then reconnect
Code: Select all
if wget("www.google.com") == "" then
gosub [reconnect]
....
[reconnect]
dim c_inf(2) as string
c_inf(1) = read("WIFIname")
c_inf(2) = read("WIFIpass")
wifi.connect(c_inf(1),c_inf(2))
undim c_inf
return
Not sure if is the best method..