|
@@ -5,18 +5,14 @@ print('set (mode='..wifi.getmode()..')')
|
|
|
print('MAC: ',wifi.sta.getmac())
|
|
|
print('chip: ',node.chipid())
|
|
|
print('heap: ',node.heap())
|
|
|
-<<<<<<< HEAD
|
|
|
-
|
|
|
-local joincounter = 0
|
|
|
-
|
|
|
+
|
|
|
+wifi.sta.config("BT_WiFi", "PlacNinObOj9")
|
|
|
+
|
|
|
cfg={}
|
|
|
cfg.ssid="ESP-"..node.chipid()
|
|
|
cfg.pwd="ESP-"..node.chipid()
|
|
|
wifi.ap.config(cfg)
|
|
|
cfg = nil
|
|
|
-=======
|
|
|
-wifi.sta.config("Kirsch Extreme","1151511515")
|
|
|
->>>>>>> parent of 4989410... Update init.lua
|
|
|
|
|
|
-- Compile server code and remove original .lua files.
|
|
|
-- This only happens the first time afer the .lua files are uploaded.
|
|
@@ -29,7 +25,7 @@ local compileAndRemoveIfNeeded = function(f)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
-local serverFiles = {'httpserver.lua', 'httpserver-request.lua', 'httpserver-static.lua', 'httpserver-error.lua','http/ual.lua'}
|
|
|
+local serverFiles = {'httpserver.lua', 'httpserver-request.lua', 'httpserver-static.lua', 'httpserver-error.lua'}
|
|
|
for i, f in ipairs(serverFiles) do compileAndRemoveIfNeeded(f) end
|
|
|
|
|
|
compileAndRemoveIfNeeded = nil
|
|
@@ -37,6 +33,9 @@ serverFiles = nil
|
|
|
|
|
|
-- Connect to the WiFi access point. Once the device is connected,
|
|
|
-- you may start the HTTP server.
|
|
|
+
|
|
|
+local joincounter = 0
|
|
|
+
|
|
|
tmr.alarm(0, 3000, 1, function()
|
|
|
|
|
|
if wifi.sta.getip() == nil and joincounter < 5 then
|