mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 11:03:48 +01:00
Fix issue where autowifi would associate with ssid equal to locally known AP ssid.
This commit is contained in:
parent
05b4f00a48
commit
ca25ab0487
@ -50,7 +50,7 @@ local function setupAutoWifiMode()
|
|||||||
local netName, netMode = wifiState.ssid, wifiState.mode
|
local netName, netMode = wifiState.ssid, wifiState.mode
|
||||||
|
|
||||||
local apSsid = wifi.getSubstitutedSsid(settings.get('network.ap.ssid'))
|
local apSsid = wifi.getSubstitutedSsid(settings.get('network.ap.ssid'))
|
||||||
local apMode = (apSsid == netName) and netMode == 'ap'
|
local apMode = (apSsid == netName) and (netMode == 'ap')
|
||||||
|
|
||||||
local scanList,msg = wifi.getScanInfo()
|
local scanList,msg = wifi.getScanInfo()
|
||||||
local knownSsids = wifi.getConfigs()
|
local knownSsids = wifi.getConfigs()
|
||||||
@ -80,7 +80,7 @@ local function setupAutoWifiMode()
|
|||||||
local connectWith = nil
|
local connectWith = nil
|
||||||
for _,kn in ipairs(knownSsids) do
|
for _,kn in ipairs(knownSsids) do
|
||||||
if kn.mode == 'ap' and kn.ssid == apSsid then break end
|
if kn.mode == 'ap' and kn.ssid == apSsid then break end
|
||||||
if findSsidInList(scanList, kn.ssid) then
|
if findSsidInList(scanList, kn.ssid) and kn.mode == 'sta' then
|
||||||
connectWith = kn.ssid
|
connectWith = kn.ssid
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user