Why do we need to set the APN manually for certain providers?
Aleksander Morgado
aleksandermj at chromium.org
Mon Nov 7 14:52:45 UTC 2022
Hey,
> My company produces a device with the Sierra EM7565 Modem and we have encountered problems related to the APN setting. (A collegue of mine sent a message into this list a week ago and has received kind help by Aleksander Morgado whom I'd like to thank.)
>
> We observed the following:
>
> * When using a German Vodafone SIM card in Germany, 3GPP registration remains at `idle`.
> * When using a German O2 SIM card in Germany, 3GPP registration advances to `home` instantly.
> * With the Vodafone SIM card, only after running `qmicli -d /dev/cdc-wdm0 -p --wds-modify-profile="3gpp,1,apn=web.vodafone.de,username=,password="`, ModemManager can connect and registration advances to `home`.
> * In contrast to that, when using the Vodafone SIM card in one of our private smartphones, no manual APN setting was necessary.
>
That is because Vodafone DE requires a specific set of APN settings
during *registration* (initial EPS bearer settings, a.k.a. attach
APN). If the modem doesn't provide the exact settings required, the
operator may reject the registration to the network (so will remain in
idle).
> I'm trying to understand why our device ran into the issues described while 3rd party smartphones do not.
>
> I searched the internet for a bit and learned that Google is maintaining a list linking the network carriers with APNs. Is this the correct way to go? Does everyone producing GSM enabled devices (that is, us too) need to equip their devices with that list as a lookup table? Does that list work with Roaming, too? I guess an alternative would be to prompt the user for the APN, like in the old times. But still, if APNs need to be set explicitely then I don't understand why it worked with O2 instantly.
>
It worked in O2 because operators may decide to not be strict in the
initial APN requirements. Passing the empty APN during registration
would allow the modem to say "I want to register, I don't know what
APN settings should I use" and the network would then say "nevermind,
you can register, here are the APN settings that should be considered
during registration". There are nicer cases even, e.g. with Movistar
Spain I can request whatever APN I want as initial, and it will work
(for now it does work, that is).
Google and other big manufacturers keep their own lists of APNs to
autodetect what should be using. This is a huge task, and not even
Google has "the latest and greatest", the list changes continuously.
There is also an open source database we maintain in
https://gitlab.gnome.org/GNOME/mobile-broadband-provider-info but
which also has the same problems, it lacks a lot of latest updates
even from major carriers. For modems in the US, there are also
carrier-certified firmwares that come with predefined settings,
including custom APN settings required.
--
Aleksander
More information about the ModemManager-devel
mailing list