Rc.local connection to wifi not working with external usb wifi

Hi guys,

I’ve just configured my whole osmc media center on the rpi3, and I must say it’s a lot better than on the rpi1B.

I do however have an issue, which is odd. For this I’ll first explain my situation a little bit:
A RPi3 with GPIO LiRC, ethernet and wifi is desired. Ethernet is for local shares only, and wifi to get internet access on the device.
Everything worked with the internal wifi, putting the ‘connmanctl connect …’ in rc.local as suggested elsewhere in the forum. I did however realize the internal wifi is not great.

So: hook up the external usb wifi adapter I used on the model 1B, added the dtoverlay=sdhost besides the dtoverlay=lirc-rpi (they are now both in the file) and check my adapters. Everything seemed to work fine. I found the new WiFi name, changed the ‘connmanctl connect …’ to the new wifi name and reboot. On reboot however, it’s not connecting. I can manually connect via SSH using the same connmanctl connect command. It then takes a few seconds to connect but it works in the end.

I cannot find anything in the log suggesting there is an error message coming from the connmanctl command.

Any help would be much appreciated!

It’s possibly a timing issue. The external WiFi adapter probably becomes available too late in the startup sequence.

A simple hack is to place sleep n before the connmanctl line and alter the value of “n” until it works (or you give up :wink: )

If that doesn’t work, please post the URL from running grab-logs -J -K. Perhaps somone will see something.

Thanks for the advice, I’ll give this a go when I’m near the pi again :smiley: