Ofono does something like this on a tech transition to LTE:
This is from 3G to LTE or the initial registration to LTE? Do you have
an ofono-monitor log handy?
When ofono does Attached: true, connman starts trying to set the
active which seems to result in InProgress. connman doesn't seem to
like the InProgress response and tries again, which ends up pounding the
modem hard with "set active" messages until read_settings() returns (on
the modem side) and the modem becomes Active (automatically) for real.
That sounds like connman isn't taking InProgress into consideration
Similarly, on a transition from LTE to 3G, connman also tries to
activate the context hundreds of times before it settles. This
behaviour is harder to understand: connman has explicitly requested the
activation here and should know that it's in progress...
ofono-monitor log by any chance? I'm not sure why a switch from LTE to
3G would cause any changes to Active/Attached states. It should simply
twiddle the NetworkRegistration state and that's it, unless the modem is
reporting things it shouldn't.
What I think might be an issue here is the interplay between Attached
and Active. For LTE, Attached and Active are synonymous...(???) connman
should not be setting Active for these at all.
ConnMan doesn't keep track of the NetworkRegistration state, so it
doesn't really know about LTE...
Could ofono have Active set to true before Attached gets set true for
the LTE context case so that connman never sees the context as
Active:false? Or is there a better way to handle this?
I don't think that would make sense from an API consistency perspective.