Automatically determine APN for GSM internet connection
Epic: https://source.puri.sm/Librem5/use-cases/issues/2
If the devkit has a SIM inserted, then one can connect to the internet provided by their GSM network provider with the following:
$ sudo mmcli -m 0 --simple-connect="apn=fast.t-mobile.com"
$ sudo nmcli c add type gsm ifname cdc-wdm0 con-name mygsm apn fast.t-mobile.com
$ nmcli r wwan on
But this requires the user to first have looked up their provider's APN. Instead, a user should be able to plug in their SIM card and it "just works" without needing to lookup the APN.
A little bit of digging revealed that there is a file on the sim card that can contain the APN names which the operator wants the device to use but can't provide the apn. instead, the device should have a database (eg. apn-conf.xml in Android Phones) that contains the apn already [0].
"In the case that the APN Control List is enabled and no APN is indicated in the PDP context request, indicating that a network provided APN is to be used, then the ME shall only request the PDP context activation if "network provided APN" is contained within EFACL." [1]
[0] https://stackoverflow.com/questions/9896079/is-apn-login-information-stored-on-sim-cards
[1] p.163 of https://www.etsi.org/deliver/etsi_ts/131100_131199/131102/09.05.00_60/ts_131102v090500p.pdf