]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_core/commitdiff
nwfnet-go: move to modern wifi configuration
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Fri, 10 Nov 2017 22:06:04 +0000 (17:06 -0500)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Fri, 10 Nov 2017 22:06:04 +0000 (17:06 -0500)
net/nwfnet-go.lua

index c073e40a08f57038dded3bfe86d771bfdcf0636a..d89d2b7ed6f9c71875c9ab5eb70e2911fdca301d 100644 (file)
@@ -14,7 +14,7 @@ if file.open("nwfnet.conf","r") then
   local conf = sjson.decode(file.read() or "")
   if type(conf) == "table" then
     local essid = conf["sta_essid"]; local pw = conf["sta_pw"]
-    if essid ~= nil and pw ~= nil then wifi.sta.config(essid,pw,0) end
+    if essid ~= nil and pw ~= nil then wifi.sta.config({['ssid'] = essid, ['pwd'] = pw, save=true}) end
 
     if conf["ap"] ~= nil then pcall(wifi.ap.config,conf["ap"]) end