Confirming APN in use

Aleksander Morgado aleksandermj at chromium.org
Thu Oct 20 09:06:29 UTC 2022


Hey Peter,

>
> This is with ModemManager 1.18.6 and libqmi 1.30.4, but that I'm not necessarily
> tied to those, that's just what's in our stable code base. This is on OpenWrt
> 22.03.
>
> You'll also excuse the lack of detail in this; I don't think I need to report
> here the actual APNs we're using here.
>
> Now, when an APN is configured in OpenWrt, i.e,
>
> uci show network.wwan.apn
>
> ModemManager reports it's connecting to it:
>
> netifd: wwan (5109): starting connection with apn ...
>
> Now, this is *not* the APN reported in the "initial bearer apn" output,
> nor is it the APNs output from the commands:  AT+CGCONTRDP or AT+CGDCONT?.
>
> It is however, the APN reported by the bearer in use, bearer 1 in this case, and
> that's what I'm picking up for my reporting.
>
> So my question is, is this APN actually in use?  Is there a QMI query for this
> that ModemManager is using to check the modem with?
>
> Or do I need an explicit setting of mmcli -m 0
> --3gpp-set-initial-eps-bearer-settings="apn=yourAPN" - I would assume this is
> not necessary, since it should all  be driven by the OpenWrt scripts.
>

In 4G there are 2 different sets of APNs required for a successful
data connection: first, the initial EPS bearer settings (a.k.a. attach
APN), which is used during modem registration phase; and second the
data connection settings (a.k.a data APN), which is used during modem
connection phase. These settings may be equal or different, it really
depends on the operator. Some operators may require an attach APN that
is by default not providing Internet access, and so a different data
APN needs to be used if the user wants to get to the Internet. Some
operators allow requesting no specific attach APN (i.e. using blank ""
APN), so that the network decides which one is used.

In ModemManager, you will see:
 * the "initial EPS bearer settings"  as the settings the user has
requested via --3gpp-set-initial-eps-bearer-settings or that were
preconfigured in the device (e.g. via carrier config).
 * the "initial EPS bearer", which is the Bearer object exposed
including which is the current status agreed with the network. E.g.
user may have requested blank "" APN and IPv4v6 in settings but agreed
"internet" APN and IPv4-only with the network. These bearer properties
are not the ones used during the data connection.
 * the "data bearer", which is the Bearer object created during a
connection attempt, including the APN settings requested by the user
for the connection attempt.

In openwrt, the settings that you configure are exclusively the "data
bearer" settings, all the "initial EPS bearer" related things are
fully ignored. The effect of ignoring everything is that the modem
will use whatever has been preconfigured. Not saying this is the way
to go, it's definitely a limitation in the openwrt setup. There is the
same limitation in NetworkManager, btw, which is being fixed here:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1331

Back to your question, I assume your Bearer 0 was the initial EPS
bearer and your Bearer 1 was the data bearer, so yes, the Bearer1
should be the one with the information about the current ongoing
connection.




--
Aleksander


More information about the ModemManager-devel mailing list