Hi,

On Mon, 2014-06-16 at 08:38 +0000, Natarajan, Ponniah (P.) wrote:
> > Is there a differentiation between Ethernet & usb gadget
> > technologies ? why usb gadget is identified as Ethernet service?
> 
> Gadget is very similar technology as ethernet, but it has different
> devtype so they are different slightly. 

In this case there is actually only ordinary ethernet. One connected via
host side USB and the other perhaps built in. Both of these will show up
under the 'ethernet' technology.

A USB client device, i.e. the end with the Micro/Mini/B connector, would
show up as a 'gadget' technology.

> > 2.    When Ethernet cable is connected but there is no interface
> > connection, I am able to connect to wifi network which has internet
> > connection. But internet connection is not working for wifi
> > connection, still connman trying to use the Ethernet for internet
> > connection. Is this the expected behavior and how connman works when
> > there is multiple connections available?

>From the above it is not clear which connection is intended to be the
default uplink. Could you enlighten us a bit more with the actual use
case?

> You can tweak the technology connect order from /etc/connman/main.conf
> file, see PreferredTechnologies setting. You can specify which
> technologies are connected and which order. 

The order of technologies in PreferredTechnologies is the one that
changes the default route. If a more preferred one appears, ConnMan
tries to use that as its uplink. But do notice that also the connected
state needs to be the same, no matter how preferred technology A is, it
will never be preferred over technology B unless they both have the same
state, i.e. 'ready' or 'online'. If the network of technology A stays in
state 'ready', no amount of tweaking can make it more preferred than the
network of technology B in 'online' state.

If less preferred technologies appear while connected, ConnMan does not
try to connect them. The same applies if PreferredTechnologies is unset,
as it normally is when installed, in this case ConnMan considers all
technologies equally preferred and will not connect more than the first
one automatically.

> [Natarajan, Ponniah (P.)]  As in our system we have multiple suppliers
> using different interfaces uses the generic dhcp client instead of
> connman.

That is a recipe of ultimate disaster. Try avoiding it at all costs.

Solving this kind of situation depends on what you want to achieve. If
all available networks need to be connected,
net.connman.Service.Connect() needs to be called for each service that
needs to be connected. ConnMan only autoconnects the "best" one as
described above. According to your example with two ethernet networks
earlier, this is probably what you will end up doing. But also in this
case ConnMan has only one default uplink at a time - the default route
in the default routing table in Linux will anyway pick only the first
one and use that. If you have more tricky routing behavior as well,
net.connman.Session API has a few advantages.

Then again, if the use case is about connecting components locally,
please consider setting up ConnMan  to handle tethering. It does not
need an uplink to function, it simply connects all network devices into
a bridge and starts a DHCP server for that locally available network.
This way one can bridge ethernet, WiFi and bluetooth devices together to
a "personal" network for example.


Cheers,

        Patrik

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to