Problems with connman and wifi

373 views
Skip to first unread message

Axel Barkow

unread,
Sep 1, 2016, 7:23:47 AM9/1/16
to BeagleBoard
Hi,

I try to use wifi on a Beaglebone Black with an Edimax EW-7811UN 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 get an access point automatically, when the BBB is booted.
I currently face the problem that the wifi dongle is not activated (led on dongle is off) after a reboot. A "connmanctl enable wifi" returns "Error wifi: Already enabled". A "connmanctl disable wifi" and "connmanctl enable wifi" activates the wifi dongle (led is on). Instead of manually disabling and reenabling wifi I can also restart the connman daemon by "systemctl restart connman.service" to activate the wifi dongle.
Does anybody have any hint, why the dongle is not active after boot? I already had a similar setup several months ago without this problems, but based on a much older debian version.

Regards

Axel

Axel Barkow

unread,
Sep 1, 2016, 7:23:51 AM9/1/16
to BeagleBoard
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

Chris Green

unread,
Sep 1, 2016, 9:18:29 AM9/1/16
to beagl...@googlegroups.com
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)

--
Chris Green
·

Robert Nelson

unread,
Sep 1, 2016, 9:30:07 AM9/1/16
to Beagle Board, ax...@barkow.name
Your just tripping over the "tether" option, which is enabled by
default in our images..

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

Regards,


--
Robert Nelson
https://rcn-ee.com/

Axel Barkow

unread,
Sep 1, 2016, 10:32:18 AM9/1/16
to BeagleBoard, c...@isbd.net
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

Axel Barkow

unread,
Sep 1, 2016, 10:33:50 AM9/1/16
to BeagleBoard, ax...@barkow.name
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
Reply all
Reply to author
Forward
0 new messages