From eedc6d3c6b1ea49c0da62c6f37182e25650b7011 Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Tue, 16 Jun 2015 16:49:18 +0200 Subject: [PATCH] Update network status after boot when no action was needed When it already was connected to a WiFi network or it already was a access point. --- src/main.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.lua b/src/main.lua index ff4d324..12260cd 100644 --- a/src/main.lua +++ b/src/main.lua @@ -73,6 +73,15 @@ local function setupAutoWifiMode() -- if the currently active network is client mode and is also visible, do nothing since it will connect automatically further along the boot process if netMode == 'sta' and netName ~= nil and netName ~= "" and findSsidInList(scanList, netName) then + -- signin to connect.doodle3d.com + local success, output = Signin.signin() + if success then + log:info("Signed in") + else + log:info("Signing in failed") + end + -- report we are connected after signin attempt + netconf.setStatus(netconf.CONNECTED,"Connected"); return true, "autowifi: no action - existing configuration found for currently wifi visible network (" .. netName .. ")" end @@ -102,6 +111,7 @@ local function setupAutoWifiMode() return nil, "autowifi: failed to configure as access point with ssid '" .. apSsid .. "' (" .. msg .. ")" end else + netconf.setStatus(netconf.CREATED,"Access point created"); return true, "autowifi: no action - no known networks found, already in access point mode" end