Discussion:
Wi-Fi service won't auto-connect when Ethernet is already present
(too old to reply)
Craig McQueen
2015-10-30 03:18:18 UTC
Permalink
I'm using ConnMan v1.30 on a BeagleBone Black based system. I've got a USB Wi-Fi device, as well as Ethernet.

Is it possible to configure ConnMan so that it will auto-connect Wi-Fi even if it's got an Ethernet connection? Ethernet would still be "preferred" in the sense of having the default route. But I want Wi-Fi to always connect if an auto-connect service is available, even while Ethernet is present.

If Wi-Fi connects while Ethernet is unplugged, then later Ethernet is plugged in, then they can both be connected at the same time, which is good.

But if Ethernet connects first, and the USB Wi-Fi device is plugged in later, then it won't auto-connect to the configured Wi-Fi service, and I wish it would.

I've read the "Preferred Technologies" section of the ConnMan web site documentation page. It sounds as though there are twists indeed. Can the "Preferred Technologies" feature be disabled? I tried putting in my /etc/connman/main.conf:

PreferredTechnologies =

But that didn't seem to make a difference.
--
Craig McQueen
Patrik Flykt
2015-10-30 07:43:37 UTC
Permalink
Post by Craig McQueen
I'm using ConnMan v1.30 on a BeagleBone Black based system. I've got a
USB Wi-Fi device, as well as Ethernet.
Is it possible to configure ConnMan so that it will auto-connect Wi-Fi
even if it's got an Ethernet connection? Ethernet would still be
"preferred" in the sense of having the default route. But I want Wi-Fi
to always connect if an auto-connect service is available, even while
Ethernet is present.
No. ConnMan will autoconnect a newly detected WiFi only if wifi is a
more preferred technology than the already connected ethernet.
Post by Craig McQueen
If Wi-Fi connects while Ethernet is unplugged, then later Ethernet is
plugged in, then they can both be connected at the same time, which is
good.
Yes. Ethernet is more preferred than WiFi, so it will be selected as the
interface with the default route. As it is more preferred than WiFi, it
will be automatically connected.

But as it is ethernet, it's also a bit special. It will always be
connected on a cable plug-in as documented in doc/service-api.txt,
Connect() method call.
Post by Craig McQueen
But if Ethernet connects first, and the USB Wi-Fi device is plugged in
later, then it won't auto-connect to the configured Wi-Fi service, and
I wish it would.
WiFi won't autoconnect as ethernet is more preferred than wifi by
default.
Post by Craig McQueen
I've read the "Preferred Technologies" section of the ConnMan web site
documentation page. It sounds as though there are twists indeed. Can
the "Preferred Technologies" feature be disabled? I tried putting in
PreferredTechnologies =
But that didn't seem to make a difference.
That restores the default behavior, which is the order in which the
services are sorted - and presented in ServicesChanged() signals -
according to connected state, favorite and technology type. With
everything being equal, the default sorting based on technologies is in
src/service.c, service_compare(), and is ethernet, wifi, cellular,
bluetooth, vpn and gadget.

Cheers,

Patrik

Loading...