Unfortunately, I have no idea how exactly the mobile data connection is established.
DISCLAMER: Everything that follows now is dangerous half-knowledge. Please correct me if you know better!
As far as I know, initially there are only the APN settings, the default values of most providers stored in “/usr/share/mobile-broadband-provider-info/serviceproviders.xml”.
The provider is contacted with this connection data and everything else, e.g. IP address, gateway, DNS server etc. is then handed over by the provider.
In the ofono log on the Xperia X I could see the corresponding entries almost in plain text.
2022-06-11 09:34:11.482 RIL1> DATA_CALL_LIST_CHANGED
2022-06-11 09:34:11.482 RIL1> 0000: 01 00 00 00 f2 03 00 00 0b 00 00 00 01 00 00 00 ........ ........
2022-06-11 09:34:11.482 RIL1 0008: 00 00 00 00 ff ff ff ff 00 00 00 00 02 00 00 00 ........ ........
2022-06-11 09:34:11.482 RIL1 0018: 06 00 00 00 49 00 50 00 56 00 34 00 56 00 36 00 ....I.P. V.4.V.6.
2022-06-11 09:34:11.483 RIL1 0028: 00 00 00 00 0b 00 00 00 72 00 6d 00 6e 00 65 00 ........ r.m.n.e.
2022-06-11 09:34:11.483 RIL1 0038: 74 00 5f 00 64 00 61 00 74 00 61 00 30 00 00 00 t._.d.a. t.a.0...
2022-06-11 09:34:11.483 RIL1 0048: 3a 00 00 00 31 00 30 00 2e 00 31 00 39 00 38 00 :...1.0. ..1.9.8.
2022-06-11 09:34:11.483 RIL1 0058: 2e 00 33 00 39 00 2e 00 31 00 36 00 2f 00 32 00 ..3.9... 1.6./.2.
2022-06-11 09:34:11.483 RIL1 0068: 37 00 20 00 32 00 61 00 30 00 31 00 3a 00 30 00 7. .2.a. 0.1.:.0.
2022-06-11 09:34:11.483 RIL1 0078: 35 00 39 00 38 00 3a 00 39 00 30 00 38 00 31 00 5.9.8.:. 9.0.8.1.
2022-06-11 09:34:11.483 RIL1 0088: 3a 00 64 00 64 00 30 00 62 00 3a 00 39 00 63 00 :.d.d.0. b.:.9.c.
2022-06-11 09:34:11.483 RIL1 0098: 65 00 63 00 3a 00 62 00 65 00 65 00 34 00 3a 00 e.c.:.b. e.e.4.:.
2022-06-11 09:34:11.483 RIL1 00a8: 35 00 37 00 33 00 35 00 3a 00 62 00 30 00 62 00 5.7.3.5. :.b.0.b.
2022-06-11 09:34:11.483 RIL1 00b8: 33 00 2f 00 36 00 34 00 00 00 00 00 6b 00 00 00 3./.6.4. ....k...
2022-06-11 09:34:11.483 RIL1 00c8: 31 00 30 00 2e 00 37 00 34 00 2e 00 32 00 31 00 1.0...7. 4...2.1.
2022-06-11 09:34:11.483 RIL1 00d8: 30 00 2e 00 32 00 31 00 30 00 20 00 31 00 30 00 0...2.1. 0. .1.0.
2022-06-11 09:34:11.483 RIL1 00e8: 2e 00 37 00 34 00 2e 00 32 00 31 00 30 00 2e 00 ..7.4... 2.1.0...
2022-06-11 09:34:11.483 RIL1 00f8: 32 00 31 00 31 00 20 00 32 00 61 00 30 00 31 00 2.1.1. . 2.a.0.1.
2022-06-11 09:34:11.483 RIL1 0108: 3a 00 30 00 35 00 39 00 38 00 3a 00 30 00 37 00 :.0.5.9. 8.:.0.7.
2022-06-11 09:34:11.483 RIL1 0118: 66 00 66 00 3a 00 30 00 30 00 30 00 30 00 3a 00 f.f.:.0. 0.0.0.:.
2022-06-11 09:34:11.483 RIL1 0128: 30 00 30 00 31 00 30 00 3a 00 30 00 30 00 37 00 0.0.1.0. :.0.0.7.
2022-06-11 09:34:11.483 RIL1 0138: 34 00 3a 00 30 00 32 00 31 00 30 00 3a 00 30 00 4.:.0.2. 1.0.:.0.
2022-06-11 09:34:11.483 RIL1 0148: 32 00 31 00 30 00 20 00 32 00 61 00 30 00 31 00 2.1.0. . 2.a.0.1.
2022-06-11 09:34:11.483 RIL1 0158: 3a 00 30 00 35 00 39 00 38 00 3a 00 30 00 37 00 :.0.5.9. 8.:.0.7.
2022-06-11 09:34:11.483 RIL1 0168: 66 00 66 00 3a 00 30 00 30 00 30 00 30 00 3a 00 f.f.:.0. 0.0.0.:.
2022-06-11 09:34:11.483 RIL1 0178: 30 00 30 00 31 00 30 00 3a 00 30 00 30 00 37 00 0.0.1.0. :.0.0.7.
2022-06-11 09:34:11.483 RIL1 0188: 34 00 3a 00 30 00 32 00 31 00 30 00 3a 00 30 00 4.:.0.2. 1.0.:.0.
2022-06-11 09:34:11.483 RIL1 0198: 32 00 31 00 31 00 00 00 34 00 00 00 31 00 30 00 2.1.1... 4...1.0.
2022-06-11 09:34:11.483 RIL1 01a8: 2e 00 31 00 39 00 38 00 2e 00 33 00 39 00 2e 00 ..1.9.8. ..3.9...
2022-06-11 09:34:11.483 RIL1 01b8: 31 00 37 00 20 00 66 00 65 00 38 00 30 00 3a 00 1.7. .f. e.8.0.:.
2022-06-11 09:34:11.483 RIL1 01c8: 30 00 30 00 30 00 30 00 3a 00 30 00 30 00 30 00 0.0.0.0. :.0.0.0.
2022-06-11 09:34:11.483 RIL1 01d8: 30 00 3a 00 30 00 30 00 30 00 30 00 3a 00 31 00 0.:.0.0. 0.0.:.1.
2022-06-11 09:34:11.483 RIL1 01e8: 30 00 34 00 62 00 3a 00 37 00 62 00 34 00 35 00 0.4.b.:. 7.b.4.5.
2022-06-11 09:34:11.483 RIL1 01f8: 3a 00 38 00 61 00 64 00 38 00 3a 00 65 00 32 00 :.8.a.d. 8.:.e.2.
2022-06-11 09:34:11.483 RIL1 0208: 38 00 36 00 00 00 00 00 00 00 00 00 00 00 00 00 8.6..... ........
2022-06-11 09:34:11.483 RIL1 0218: dc 05 00 00 ....
2022-06-11 09:34:11.484 src/ril_data.c: ril_data_call_list_parse() version=11,num=1
2022-06-11 09:34:11.484 src/ril_data.c: ril_data_call_parse() [status=0,retry=-1,cid=0,active=2,type=IPV4V6,ifname=rmnet_data0,mtu=1500,address=10.198.39.16/27,dns=10.74.210.210 10.74.210.211,gateways=10.198.39.17,pcscf=(null) ]
Unfortunately, this data is no longer displayed in the ofono log of the Xperia 10III.
2022-06-08 08:08:50.982 slot1 > 10 dataCallListChanged
2022-06-08 08:08:50.982 0000: 61 6e 64 72 6f 69 64 2e 68 61 72 64 77 61 72 65 android. hardware
2022-06-08 08:08:50.982 0010: 2e 72 61 64 69 6f 40 31 2e 30 3a 3a 49 52 61 64 .radio@1 .0::IRad
2022-06-08 08:08:50.982 0020: 69 6f 49 6e 64 69 63 61 74 69 6f 6e 00 00 00 00 ioIndica tion....
2022-06-08 08:08:50.982 0030: 01 00 00 00 85 2a 74 70 00 00 00 00 b8 e1 da 6e .....*tp .......n
2022-06-08 08:08:50.982 0040: 71 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 q....... ........
2022-06-08 08:08:50.982 0050: 00 00 00 00 00 00 00 00 00 00 00 00 85 2a 74 70 ........ .....*tp
2022-06-08 08:08:50.982 0060: 01 00 00 00 c8 e1 da 6e 71 00 00 00 78 00 00 00 .......n q...x...
2022-06-08 08:08:50.982 0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
2022-06-08 08:08:50.982 0080: 00 00 00 00 85 2a 74 70 01 00 00 00 40 e2 da 6e .....*tp ....@..n
2022-06-08 08:08:50.982 0090: 71 00 00 00 07 00 00 00 00 00 00 00 01 00 00 00 q....... ........
2022-06-08 08:08:50.983 00A0: 00 00 00 00 10 00 00 00 00 00 00 00 85 2a 74 70 ........ .....*tp
2022-06-08 08:08:50.983 00B0: 01 00 00 00 48 e2 da 6e 71 00 00 00 0c 00 00 00 ....H..n q.......
2022-06-08 08:08:50.983 00C0: 00 00 00 00 01 00 00 00 00 00 00 00 20 00 00 00 ........ .... ...
2022-06-08 08:08:50.983 00D0: 00 00 00 00 85 2a 74 70 01 00 00 00 58 e2 da 6e .....*tp ....X..n
2022-06-08 08:08:50.983 00E0: 71 00 00 00 2b 00 00 00 00 00 00 00 01 00 00 00 q...+... ........
2022-06-08 08:08:50.983 00F0: 00 00 00 00 30 00 00 00 00 00 00 00 85 2a 74 70 ....0... .....*tp
2022-06-08 08:08:50.983 0100: 01 00 00 00 88 e2 da 6e 71 00 00 00 50 00 00 00 .......n q...P...
2022-06-08 08:08:50.983 0110: 00 00 00 00 01 00 00 00 00 00 00 00 40 00 00 00 ........ ....@...
2022-06-08 08:08:50.983 0120: 00 00 00 00 85 2a 74 70 01 00 00 00 d8 e2 da 6e .....*tp .......n
2022-06-08 08:08:50.983 0130: 71 00 00 00 28 00 00 00 00 00 00 00 01 00 00 00 q...(... ........
2022-06-08 08:08:50.983 0140: 00 00 00 00 50 00 00 00 00 00 00 00 85 2a 74 70 ....P... .....*tp
2022-06-08 08:08:50.983 0150: 01 00 00 00 00 e3 da 6e 71 00 00 00 01 00 00 00 .......n q.......
2022-06-08 08:08:50.983 0160: 00 00 00 00 01 00 00 00 00 00 00 00 60 00 00 00 ........ ....`...
2022-06-08 08:08:50.983 0170: 00 00 00 00 ....
2022-06-08 08:08:50.983 src/binder_data.c: binder_data_call_list_1_0() num=1
2022-06-08 08:08:50.983 src/binder_data.c: binder_data_call_new_1_0() [status=0,retry=-1,cid=0,active=2,type=IPV4V6,ifname=rmnet_data3,mtu=1500,address=2a01:0598:a83d:02d5:e029:eddf:8fae:5e42/64,dns=2a01:0598:07ff:0000:0010:0074:0210:0221 2a01:0598:07ff:0000:0010:0074:0210:0222,gateways=fe80:0000:0000:0000:c8a1:04e3:7a52:c7dd,pcscf=]
From this, connman creates a corresponding entry for the context of the mobile network.
These context settings are saved under: /home/.system/var/lib/connman/cellular_[context_number]_context1/ in file “settings”:
[cellular_[censored]_context1]
Name=congstar
Favorite=true
AutoConnect=true
Modified=2022-08-21T12:05:06.977286+02
IPv4.method=off
IPv6.method=fixed
IPv6.privacy=disabled
IPv6.DHCP.DUID=[censored]
IPv6.netmask_prefixlen=64
IPv6.local_address=2a01:0598:d82b:e232:6871:e9df:0734:a43e
IPv6.gateway=fe80:0000:0000:0000:d185:8033:1ce4:f57f
What is immediately noticeable here is that the IPv4 configuration method is set to “off”.
In my opinion, “fixed” would actually be the right entry here.
…
For example the “Method” field has valid settings of “off”, “fixed”, “manual”
and “dhcp”. The “fixed” value however can not be set by any user program. It
is an internal value that some 3G cards require. Switching to “off” will
remove any IP configuration from the interface.
…
Unfortunately, I don’t know how to make the intermediate steps visible.
Perhaps the data is being transmitted incorrectly by the provider?
Perhaps the data transmitted by the provider are misinterpreted by ofono?
Perhaps the data is misinterpreted when passed from ofono to connman?