Skip to content

Commit 4808c6c

Browse files
committed
retry if WiFi connect fails due to invalid password
1 parent 5794c9f commit 4808c6c

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

scripts/build-firmware

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fi
1818
set -e
1919

2020
FW_TAG="3.0.0-release_20210201"
21-
VERSION="3-0-0"
21+
VERSION="$1"
2222
FIRMWARE_OVERLAY_PATH="firmware/nodemcu-firmware-overlay"
2323

2424
LFS_BASE="${PWD}/src/lfs"

src/lfs/wifi.lua

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,7 @@ failsafeTimer:register(300000, tmr.ALARM_SINGLE, function() node.restart() end)
1919

2020
wifi.eventmon.register(wifi.eventmon.STA_DISCONNECTED, function(T)
2121
print("Heap: ", node.heap(), "Cannot connect to WiFi ", T.SSID, 'Reason Code:', T.reason)
22-
23-
if T.reason == wifi.eventmon.reason.AUTH_EXPIRE then
24-
-- wifi password is incorrect, immediatly enter setup mode
25-
print("Heap: ", node.heap(), "Wifi password is incorrect")
26-
startWifiSetup()
27-
else
28-
wifiFailTimer:start()
29-
end
22+
wifiFailTimer:start()
3023
end)
3124

3225
if wifi.sta.getconfig() == "" then

0 commit comments

Comments
 (0)