Hi Aleksander,

How is the initial-attach-ip-type decided in the NM MR you shared? I've seen in 
a network in New Zealand where initial-attach-iptype has to be IPV4 and then it 
can be changed to IPV4V6 during connection establishment.

Also, modem might have already gone through registration process before 
"--3gpp-set-initial-eps-bearer-settings" is called. So when are we supposed to 
call "mmcli --3gpp-set-initial-eps-bearer-settings"?

Thanks

-----Original Message-----
From: ModemManager-devel <modemmanager-devel-boun...@lists.freedesktop.org> On 
Behalf Of Aleksander Morgado
Sent: Friday, 17 March 2023 3:13 PM
To: Juan A. Rubio <jarubio2...@gmail.com>
Cc: modemmanager-devel@lists.freedesktop.org
Subject: Re: initial bearer apn

Hey!

>
> I'm using ModemManager version 1.18.12. I'm also using Network Manager 
> 1.22.16
>
> I'm wondering what part of the system stores or configures the initial 
> bearer apn, since I'm not explicitly setting this value?
>
> $ mmcli -m 0 | grep 'bearer apn'
>            |      initial bearer apn: Telstra.internet
>
> Is this a default value set by MM or NM, or is this something that is 
> stored in the SIM by the carrier?
>

In LTE there are always two different APN settings in use:
 * initial EPS default bearer settings (a.k.a. attach APN)
 * data connection settings (a.k.a. connection APN).

The attach APN is the APN used during *registration* to the LTE network, it is 
LTE-specific. This APN is stored as a profile configured in the device, and is 
subject to change via different ways; e.g. it could have been preconfigured in 
the device via carrier settings, or it could be manually set by the user, or it 
could even be updated via OTA. In MM we have 2 different sets of attach APN 
info:
the settings requested by the user (these are the ones you see in mmcli -m a 
output) and the settings agreed with the network (these are the ones you see in 
the bearer object reported as initial bearer in the mmcli -m a output). Some 
networks allow you to request any initial APN (even the blank "" APN) and then 
it will tell you which one to use (so requested and agreed may be different). 
Other networks are strict and if you don't request the correct one the 
registration will be rejected (very common in Japan for some reason). Also IP 
type is important here, if you request a IPv4-only initial attach APN, 
attempting to get a IPv6 connection later on won't work.

The connection APN is the one that you're probably most familiar with.
This is the APN that you need to get the modem connected to e.g. the Internet. 
This may or may not be the same as the initial APN! E.g. I recall some network 
in Germany where you required an initial APN just to get the service but it 
wouldn't give you internet connectivity; you then had to connect to a different 
APN in order to get the bearer to the Internet established correctly. In most 
cases, though, both initial and connection APNs are the same.

In NetworkManager 1.42 the user will have explicit settings to configure the 
initial attach APN as part of the config profile, see
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1331

if you're using an older version, and you need to specify a custom attach APN, 
you can do it with mmcli.

--
Aleksander

Reply via email to