Problems with connman and wifi

Hi,

I’m trying to get wifi working on a Beaglebone Black with an Edimax EW7811-UN USB dongle. I started with the image bone-debian-8.5-console-armhf-2016-08-14-2gb.img and installed connman and firmware-realtek via apt. My goal is to automatically provide an wifi access point after boot. Some months ago I successfully build a similar setup, but based on an older Debian image.
When booting the BBB, the wifi dongle is deactivated (led is off). When I execute connmanctl enable wifi I get the message Error wifi: Already enabled. When I execute connmanctl disable wifi and then connmanctl enable wifi, the dongle gets activated and the led turns on. Instead of disabling and enabling via connmanctl, I can also restart the connman daemon with systemctl restart connman.service to activate the dongle.
Does anybody know what to do to have the wifi automatically activated after boot?

Thanks

Axel

My *guess* would be that the problem is something to do with startup
timing. My experience with BBB is that it takes a *long* time to
get round to initialising networking and that sometimes confuses
things.

As a workaround I would simply suggest running a script from
/etc/rc.local which waits for a minute or so and then does the
'systemctl restart connman.service'. You need to background the
script as you can't put something with a long delay in /etc/rc.local.

E.g. add the following to rc.local:-

    /home/axel/bin/enableWifi.sh &

... and the script in /home/axel/bin/enableWifi.sh is:-

    #!/bin/bash
    sleep 60
    systemctl restart connman.service

(not tested so there may be typos and other silly errors, but you can
see the idea)

Hi,

I'm trying to get wifi working on a Beaglebone Black with an Edimax
EW7811-UN USB dongle. I started with the image
bone-debian-8.5-console-armhf-2016-08-14-2gb.img and installed connman and
firmware-realtek via apt. My goal is to automatically provide an wifi access
point after boot. Some months ago I successfully build a similar setup, but
based on an older Debian image.
When booting the BBB, the wifi dongle is deactivated (led is off). When I
execute connmanctl enable wifi I get the message Error wifi: Already
enabled. When I execute connmanctl disable wifi and then connmanctl enable
wifi, the dongle gets activated and the led turns on. Instead of disabling
and enabling via connmanctl, I can also restart the connman daemon with
systemctl restart connman.service to activate the dongle.
Does anybody know what to do to have the wifi automatically activated after
boot?

Your just tripping over the "tether" option, which is enabled by
default in our images..

tether wifi disable
enable wifi
scan wifi
services
agent on
connect wifi_*_managed_psk
quit

Regards,

Hi Robert,

I doubt that the tether option is enabled by default in my system. First I’m using the console image and I had to install connman manually. Second my goal is to have tethring enabled after boot, so if the image would already contain that option, no necessary actions from my side. But as described the USB stick doesn’t seem to be active after boot, since its LED is off.

Regards

Axel

Hi Chris,

thanks for your answer. Your workaround is exactly what I had in mind. I was just hoping to find the root cause of the problem instead of building a workaround…

Regards

Axel