Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to wifi AP with uid/pass got from file #8

Open
chuxuanhy opened this issue Dec 24, 2015 · 1 comment
Open

Cannot connect to wifi AP with uid/pass got from file #8

chuxuanhy opened this issue Dec 24, 2015 · 1 comment

Comments

@chuxuanhy
Copy link

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

@SmartArduino
Copy link
Owner

Please check the exact length reading back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants