You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hard code credential in lua scripts worked successfully. But I have tried, and could not connect to wifi with uid/pass read from file stored in wifimcu. Please check this!
init.lua content :
cfg={}
if file.open("info.lua","r") then
cfg.ssid=file.readline()
cfg.pwd=file.readline()
file.close()
if cfg.ssid ~= nil and cfg.pwd ~= nil then
print("Start connect to AP :")
print("ssid : " .. cfg.ssid)
print("pwd : " .. cfg.pwd)
wifi.startsta(cfg);
cfg = nil
else
tmr.stop(1)
print("start AP mode to config credential")
end
end
info.lua content :
username
password
The text was updated successfully, but these errors were encountered:
Hello,
The hard code credential in lua scripts worked successfully. But I have tried, and could not connect to wifi with uid/pass read from file stored in wifimcu. Please check this!
init.lua content :
cfg={}
if file.open("info.lua","r") then
cfg.ssid=file.readline()
cfg.pwd=file.readline()
file.close()
if cfg.ssid ~= nil and cfg.pwd ~= nil then
print("Start connect to AP :")
print("ssid : " .. cfg.ssid)
print("pwd : " .. cfg.pwd)
wifi.startsta(cfg);
cfg = nil
else
tmr.stop(1)
print("start AP mode to config credential")
end
end
info.lua content :
username
password
The text was updated successfully, but these errors were encountered: