- Tue Oct 20, 2015 1:16 pm
#31852
I'm using this with Float-DEV 0.9.6 20150704 Firmware
I'm having no issues... The QQ is optional
Code: Select allwifi.setmode(wifi.STATION)
wifi.sta.config("12345-NETGEAR81","mikeis12345") ---SSID and PASSWORD
tmr.alarm(0, 1000, 1, function(QQ)
print("Try Connecting:")
ip, nm, gw=wifi.sta.getip()
if ip ~= nil then
print("\nIP Info: \nIP Address: ",ip,"\n Netmask: ",nm,"\n Gateway: ",gw)
tmr.stop(0)
end
end)
I could increase the time [ie] tmr.alarm(0, 3000, 1, function(QQ)
-- 3 seconds depends signal strength/conectivity/traffic
this works also:
Code: Select allwifi.setmode(wifi.STATION)
wifi.sta.config("SSID","PW") --PWmust be at least 8
tmr.alarm(0, 1000, 1, function()
ip = wifi.sta.status()
print("Connect Status: "..ip)
if ip == 5 then
tmr.stop(0)
ip, nm, gw=wifi.sta.getip()
print("\nIP Address: ",ip,"\n Netmask: ",nm,"\n Gateway: ",gw)
end
end)