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


Hi Denis,

I've spent most of the day trying to make sense of this. I'll send some new logs when I get a chance but I thought I'd just ask a couple of questions that popped up during the day:

i) For LTE, does it really make sense for the Attached property to be set before the context is Active? The two are intricately linked.

ii) For LTE, I'm not sure we should call ofono_gprs_status_notify() when we are registered to the network. Instead, I suspect we should just wait until cid_activated() gets called. Is that sufficient? It looks to be, mostly, in my eyes and didn't break terribly when I tried it.

iii) Looking at src/gprs, couldn't we just set gprs->attached and gprs->driver_attached right away if we are registered on an LTE network. It seems that conceptually that would be true...??? If we do that, I think we can drop most of the _ATTACHING flags which might make the code easier to understand.

iv) Even if we do iii), I'm inclined to not set the Attached DBUS property until _cid_activated() returns, and then _after_ context Active instead of before.

v) If we detach from the network, do things break conceptually if we set Attached=false before setting context Active=false?

A lot of the above comes from my understanding of what connman is trying to do: if it sees the state as Attached and has no Active contexts then it starts trying to activate the first context. Ideally, it would never see an inactive context for LTE, at least not in the Attached state. However, I may be missing something in my understanding of how this is intended to work, so any clarification would be appreciated.

/Jonas



This is an explicit UMTS to LTE transition:

{RadioSettings} [/quectelqmi_0] TechnologyPreference = lte

Okay, so you set the Technology preference and the modem goes into disconnect and search mode

{ConnectionManager} [/quectelqmi_0] Attached = False
{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False
{NetworkRegistration} [/quectelqmi_0] Status = searching

So far so good

{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


This actually looks fine.  I do wonder what an actual modem roam looks like, without the technology preference interference.


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

So we get detached, okay...

{NetworkRegistration} [/quectelqmi_0] LocationAreaCode = 11
{NetworkRegistration} [/quectelqmi_0] CellId = 752047
{NetworkRegistration} [/quectelqmi_0] Technology = umts

Switch technology

{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

Reattach and get our settings back, so far so good...

{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False

This part looks bizarre, is the modem deactivating the context for some reason?

^[[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

And back to active

{ConnectionContext} [/quectelqmi_0/context1] Settings = {}
{ConnectionContext} [/quectelqmi_0/context1] Active = False

Back to inactive

{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.


I don't get this part actually.  ConnMan is only activating the context right?  What is deactivating it?

Regards,
-Denis

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

Reply via email to