On Fri, Sep 9, 2016 at 3:03 AM, Patrik Flykt <Patrik.Flykt(a)linux.intel.com>
On Thu, 2016-09-08 at 22:44 -0700, Naveen Singh wrote:
> Hi All
> Let us consider device has two ways to go over internet (one via
> cellular and other via wifi). Even though device has two ways, the
> default route is either via wifi or via cellular. Is it possible to
> change the default route to other technology on fly? My understanding
> is that we have agent API that can let user change it.
> To change the default connection to your access point, the user needs
> manually drag the access point service to the top of the list.
> Do we have a command for doing the same? Looks like what is required
> here is to change the order.
Updating the order doesn't work flawlessly, i.e. order is rest whenever
ConnMan sorts the services internally. Fixing this to work as expected
will not be at all trivial, unfortunately.
For a bit more static configuration, one can set PreferredTechnologies
in /etc/connman/main.conf. Then there is always the option to enhance
ConnMan to have multiple default routes out, but that solution ends up
with a default defaultroute used anyway and is perhaps not what it
Thanks for the response. Can this be accomplished by user trying to
disconnect with the service. In that case the another connected services's
gateway becomes's the default gateway. The only problem here would be that
that auto-connect/favorite flag for the service would be turned off once
the disconnect is issued. So user may have to issue connect again. In short
this is the sequence:
1) Connected with service A (tech A) and Service B (tech B) and default
route is via tech A.
2) We want to change the default route via tech B.
3) Issue a disconnect to service A
4) This disconnect would trigger the change and connman would make default
route via tech B
5) Wait for that to happen
6) Issue a connect to service A again (as we still want service A to be
What if user decides to bypass connman and directly change the default
route/gateway (using some ip command). Will that have any side effects on