On Mon, 2016-08-01 at 14:50 +0200, l.genevet wrote:
I am working on an connman integrated in an embedded system for
automation. We are using Connman 1.23
Ouch. Please upgrade to latest, we have fixed a few metric tons of bugs
since then. ConnMan 1.33 is 100% API compatible with 1.23, and if you
discover that it isn't, it's our fault and we will fix it immediately.
Latest oFono releases also contain bug fixes.
with an Ofono plugin to be able to switch to a GSM modem in case
an issue with the ethernet interface.
If we are not able to ping our server even if the ethernet service is
ready, we would like to force the switch to the GSM. For that, we use
the connman Service MoveBefore API.
After MoveBefore :
- the GSM interface is used.
- the default route is up to date.
- connman does not notify a change of State on the ethernet or the
- the services are not reordered after the switch.
The problem with MoveBefore and MoveAfter is that they don't
unfortunately keep services ordered forever. And the services are
ordered internally by ConnMan every time a state changes or a new
service is discovered, which can mean pretty much immediately.
The ServicesChanged signal contains the latest order, the topmost entry
is the one with the default route set if it is in states 'ready' or
'online'. But ServicesChanged are sent with a delay, meaning that
ConnMan has enough time to decide to re-sort the services list and end
up with the same order as before the switch before sending out the
signal... So currently MoveBefore/MoveAfter are not that useful and
require a bit more coding to get properly done.
Is this seems like a normal behaviour ?
Are there any other way to be notified via connman that the default
route has changed?
I saw that IPv4 "Gateway" field of the ethernet interface disappears
once MoveBefore GSM has changed -> can I use that information to be
ethernet does not have the default route anymore?
Individual services should send out information for any changed
property, please try with the latest version and see if your problem