On 03/01/2018 04:11 PM, Denis Kenzior wrote:
Hi Jonas,

Ofono does something like this on a tech transition to LTE:

Active: false
Attached: false
...
Attached: true
Active: true


This is from 3G to LTE or the initial registration to LTE?  Do you have an ofono-monitor log handy?

This is an explicit UMTS to LTE transition:

{RadioSettings} [/quectelqmi_0] TechnologyPreference = lte
{ConnectionManager} [/quectelqmi_0] Attached = False
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False
{NetworkRegistration} [/quectelqmi_0] Status = searching
{NetworkRegistration} [/quectelqmi_0] Technology = lte
{NetworkOperator} [/quectelqmi_0/operator/24001] Status = available
{NetworkRegistration} [/quectelqmi_0] Name =
{ConnectionManager} [/quectelqmi_0] Attached = True
{NetworkRegistration} [/quectelqmi_0] Status = roaming
{NetworkRegistration} [/quectelqmi_0] LocationAreaCode = 65534
{NetworkRegistration} [/quectelqmi_0] CellId = 26710796
{NetworkOperator} [/quectelqmi_0/operator/24001] Status = current
{NetworkRegistration} [/quectelqmi_0] Name = 24001
{NetworkRegistration} [/quectelqmi_0] MobileCountryCode = 240
{NetworkRegistration} [/quectelqmi_0] MobileNetworkCode = 01
{NetworkRegistration} [/quectelqmi_0] Status = registered
{NetworkRegistration} [/quectelqmi_0] Name = Orange F
{NetworkOperator} [/quectelqmi_0/operator/24001] Name = TELIA
{NetworkRegistration} [/quectelqmi_0] Strength = 20
{NetworkRegistration} [/quectelqmi_0] Name = Orange F
{NetworkOperator} [/quectelqmi_0/operator/24001] Name = 24001
{ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface = wwp0s20u1i4, Method = static, Address = 10.172.219.235, Netmask = 255.255.255.248, Gateway = 10.172.219.236, DomainNameServers = 194.51.3.56 194.51.3.56 }
{ConnectionContext} [/quectelqmi_0/context1] Active = True


Here's what connman does effects on the LTE to UMTS transition:

{RadioSettings} [/quectelqmi_0] TechnologyPreference = umts
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False
{ConnectionManager} [/quectelqmi_0] Attached = False
{NetworkRegistration} [/quectelqmi_0] LocationAreaCode = 11
{NetworkRegistration} [/quectelqmi_0] CellId = 752047
{NetworkRegistration} [/quectelqmi_0] Technology = umts
{ConnectionManager} [/quectelqmi_0] Attached = True
{ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface = wwp0s20u1i4, Method = static, Address = 10.160.218.173, Netmask = 255.255.255.252, Gateway = 10.160.218.174, DomainNameServers = 194.51.3.56 194.51.3.56 }
{ConnectionContext} [/quectelqmi_0/context1] Active = True
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False
^[[F{ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface = wwp0s20u1i4, Method = static, Address = 10.167.137.164, Netmask = 255.255.255.248, Gateway = 10.167.137.165, DomainNameServers = 194.51.3.56 194.51.3.56 }
{ConnectionContext} [/quectelqmi_0/context1] Active = True
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False
{ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface = wwp0s20u1i4, Method = static, Address = 10.173.100.170, Netmask = 255.255.255.252, Gateway = 10.173.100.169, DomainNameServers = 194.51.3.56 194.51.3.56 }
{ConnectionContext} [/quectelqmi_0/context1] Active = True
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False
{ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface = wwp0s20u1i4, Method = static, Address = 10.160.115.172, Netmask = 255.255.255.248, Gateway = 10.160.115.173, DomainNameServers = 194.51.3.56 194.51.3.56 }
{ConnectionContext} [/quectelqmi_0/context1] Active = True
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False
{ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface = wwp0s20u1i4, Method = static, Address = 10.167.11.161, Netmask = 255.255.255.252, Gateway = 10.167.11.162, DomainNameServers = 194.51.3.56 194.51.3.56 }
{ConnectionContext} [/quectelqmi_0/context1] Active = True
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False
{ConnectionContext} [/quectelqmi_0/context1] Settings = { Interface = wwp0s20u1i4, Method = static, Address = 10.173.65.6, Netmask = 255.255.255.252, Gateway = 10.173.65.5, DomainNameServers = 194.51.3.56 194.51.3.56 }
{ConnectionContext} [/quectelqmi_0/context1] Active = True
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False

....eventually that settles down and the connection is established.



When ofono does Attached: true, connman starts trying to set the context 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 properly.



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.


Maybe... take at look at the first ofono log above and see what the network registration state is doing... that's what's causing the unattached state, I think.

/Jonas


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.

Regards,
-Denis

_______________________________________________
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to