OpenELEC/OpenELEC.tv — Issue #169: Wireless nic discovered by kernel too late.
Author: tompen-
Created: 2012-02-08 17:31:09+00:00
State: open

With the latest builds, why does it take 90 sec before kernel discovers the mac-adress for my wireless card?

With build r9546, 12 Jan 2012, I had no problems with my wireless whatsoever. It always connected before XBMC started so both the Wheather and RSS feeds got populated OK during xbmc startup.

Message-log when wireless WORKS OK: http://pastebin.com/b8SbJS5g
Notice: The log starts 14:39:29, and wlan0 mac-adress is found the same second. (Connmand can start directly).

The next build I upgraded to was r9817, 6 Feb 2012.
ifconfig showed no ip-adress for wlan0. I had not made any changes to Openelec addon settings.
Downgrade back to r9546 solved the problem and wireless works again.

After I upgraded again to the problematic build, I understood with r9546 build, the file /sys/class/net/wlan0/address does not get created fast enough. The /etc/init.d/21_network startup-script performed all 30 retries without getting the mac-adress for wlan0, then it created the Connmand profile and started Connmand anyway. Connmand was unable to connect to my router.

Message log from problematic build r9546: http://pastebin.com/xyd8cWss
Notice: Connman is started when the 30 retries have been exhausted.

I tweaked line 67 and 128 in the file /etc/init.d/21_network to allow a few seconds between each retry. Now we wait until mac-adress for wlan0 nic is available before Connman profile is created, then Connmand can start. With this workaround the wireless starts OK, but wireless gets connected 2 minutes after OpenELEC is booted!

Message log from tweaked build r9851: http://pastebin.com/QiCA73XK
Note: The log starts 14:51:26, wlan0 mac-adress is found 14:52:01, thats 90 seconds too slow.

My question is: With the latest builds, why does it take 90 sec before kernel discovers the wireless nic?

Logs from problematic build r9546:
lsmod: http://pastebin.com/fvq2QtU2
dmesg: http://pastebin.com/dwsjY6MB
Connmand profile: http://pastebin.com/1EhsGSMR
OE addon settings: http://pastebin.com/ajWKGbGL
Message-log, with Connmand debugging enabled: http://pastebin.com/nukFCWsE