diff --git a/src/network/wlanconfig.lua b/src/network/wlanconfig.lua index 1e72933..637b586 100644 --- a/src/network/wlanconfig.lua +++ b/src/network/wlanconfig.lua @@ -25,14 +25,14 @@ local deviceName, deviceApi local cachedApSsid, baseApSsid = nil, nil function M.getSubstitutedSsid(unformattedSsid) + log:debug("getSubstitutedSsid unformattedSsid:'" .. unformattedSsid .. "' baseApSsid:'" .. (baseApSsid or "nil") .. "' cachedApSsid:'" .. (cachedApSsid or "nil")) if unformattedSsid == baseApSsid and cachedApSsid ~= nil then return cachedApSsid end if not unformattedSsid or type(unformattedSsid) ~= 'string' then return nil end local macTail = M.getMacAddress():sub(7) - + log:debug(" macTail:'" .. macTail) baseApSsid = unformattedSsid cachedApSsid = unformattedSsid:gsub('%%%%MAC_ADDR_TAIL%%%%', macTail) - return cachedApSsid end @@ -107,7 +107,9 @@ end --returns the wireless device's MAC address (as string, without colons) --(lua numbers on openWrt seem to be 32bit so they cannot represent a MAC address as one number) function M.getMacAddress() + log:debug("getMacAddress") local macText = utils.readFile('/sys/class/net/' .. deviceName .. '/address') + log:debug(" macText: '" .. (macText or "nil") .. "'") local out = '' -- Hack to prevent failure in case the MAC address could not be obtained.