Hi OpenWRT dev's,
It looks like the scanlist method of the iwinfo lua binding hangs when the
wifi stack is restarted.
This happens when my init script is called, which attempts to perform a
scan, but the wifi stack is restarted because the country and channel is
changed (according to the wireless configuration in uci). With hanging I
mean that Lua doesn't get past this function call, there is no timeout. And
not being able to make this non blocking makes this pretty problematic.
The only solution thus far was adding a 5 seconds sleep in my init script.
The only traces of info I could find are here:
http://wiki.openwrt.org/doc/howto/wireless.utilities#iwconfig
http://git.openwrt.org/?p=project/iwinfo.git;a=tree;hb=HEAD
This happens in the 14.07 version of OpenWRT.
I can reproduce this after boot with the following lua script:
local io = require('io')
local file = assert(io.open('/tmp/scan.log', a+))
local function logger(message)
print(message)
file:write(message .. \n)
file:flush()
end
logger(init)
logger(starting wifi restart)
local handler = io.popen(wifi)
local iwinfo = require('iwinfo')
local deviceName = 'wlan0'
local deviceID = iwinfo.type(deviceName)
if not deviceID then
logger(wireless device ' .. deviceName .. ' not found)
else
logger(found wireless device ' .. deviceName .. ')
end
local wifiDevice = iwinfo[deviceID]
if not wifiDevice then
logger('iwinfo. .. deviceID .. ' interface not found)
else
logger(found 'iwinfo. .. deviceID .. ' interface)
end
logger(calling scanlist)
local scanList = wifiDevice.scanlist(deviceName)
logger(scanlist completed)
logger(scanlist:)
for _,sn in ipairs(scanList) do
logger( - .. (sn.ssid or nil))
end
logger(finished)
Isn't there a more specific project site, issue queue or mailinglist?
Thanks in advance,
Peter Uithoven
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel