APN settings values and storage

My provider for phone and data mobile is in Germany ‘Fonic’ (I think it is an O2 daughter). The APN settings are described here:
https://www.apnsettings.org/germany/fonic-de/
I’m wondering where the configured values of all the APN settings in my phone are stored. I see around 10, even one from Cuba because I used a cuban SIM there.

For Fonic I have tow entries, maybe as a result of y typo:

Fonic
pinternet.interkom.de

fonic
pinternet.interkom.de

For both, Username and Password are not set and the only difference is the spelling of the name, one with capital F, the other with bsmall f.

Sometimes, the network icon in the status bar has a yellow sign with an exclamation symbol and the wwan0 interface does not get an IP addr assigned by the provider. In such case it helps change between the two above entries. It seems it doesn’t matter to which one, the change is what matters. Even if I do not understand why it matters.

Any ideas about this? Where should the other values from the above page be configured or stored?

   Name : FONIC
   APN : pinternet.interkom.de
   Proxy : Not Set
   Port : Not Set
   Username : Not Set
   Password : Not Set
   Server : Not Set
   MMSC :  http://10.81.0.7:8002
   MMS Proxy : 82.113.100.6
   MMS Port : 8080
   MCC : 262
   MNC : 07
   Authentication Type : Not Set
   APN type : default,supl,mms
   APN protocol: Ipv4
   APN roaming protocol: Ipv4
   Enable/disable APN: APN Enabled
   Bearer: Unspecified
   MVNO type : None
   MVNO Value : Not set

The NAME just not matter, Fonic,fonic,Purism,Dorota,angus,gurú all is working… BUT the APN it is import and some NVMO share same APNs

Is the quoted above from the default file, or is it your custom configuration? Ive been trying to figure out how to delete some unused manual APNs

I hope to understanding good to guru.

Details for mobile broadband providers should be in the serviceproviders.xml file to work out of the box with the Librem 5. Here is a FONIC entry on the latest version in the mobile-broadband-provider-info GitLab:

On my Librem 5 this file is located here

/usr/share/mobile-broadband-provider-info/serviceproviders.xml

2 Likes

Thank you for this valuable information. I have the same file and about FONIC it says:

        <provider>
                <name>FONIC</name>
                <gsm>
                        <network-id mcc="262" mnc="07"/>
                        <network-id mcc="262" mnc="08"/>
                        <network-id mcc="262" mnc="11"/>
                        <balance-check>
                                <ussd>*101#</ussd>
                        </balance-check>
                        <balance-top-up>
                                <ussd replacement="CODE">*103*CODE#</ussd>
                        </balance-top-up>
                        <apn value="pinternet.interkom.de">
                                <plan type="postpaid"/>
                                <usage type="internet"/>
                                <username>fonic</username>
                                <password>fonic</password>
                        </apn>
                </gsm>
        </provider>

Questions: Is this file used by the L5 software, for example by the gnome-control-center? I do not see the above values within gnome-control-center. Why it specifies username and password?

1 Like

If I remember well, the /usr/share/mobile-broadband-provider-info/serviceproviders.xml is used. I made once modifications to it to add my provider, before it was in the provided version of this file. Maybe you have to restart certain services to apply modifications to the file. Unfortunately I do not know which services, so I would do a restart after making modifications.

You could for example try removing the username and password (make sure to have a copy of the original before editing).

If you make changes via g-c-c, I do not where they are stored.

I modified the file and rebooted; the file is read during boot, the modification and access times differ:

purism@pureos:~$ ls -l /usr/share/mobile-broadband-provider-info/serviceproviders.xml
-rw-r--r-- 1 root root 359013 May  3 10:48 /usr/share/mobile-broadband-provider-info/serviceproviders.xml
purism@pureos:~$ ls -lu /usr/share/mobile-broadband-provider-info/serviceproviders.xml
-rw-r--r-- 1 root root 359013 May  3 10:50 /usr/share/mobile-broadband-provider-info/serviceproviders.xml
1 Like

I see the following APN related messages with `journalctl:

purism@pureos:~$ sudo journalctl -b -0 | egrep 'APN'
May 05 09:18:23 pureos mmsdtng[744]: ../plugins/modemmanager.c:set_context() Current Context APN: pinternet.interkom.de, mmsd-tng settings MMS APN: apn.invalid
May 05 09:18:23 pureos mmsdtng[744]: ../plugins/modemmanager.c:set_context() The modem is not connected to the correct APN!
May 05 09:18:23 pureos mmsdtng[744]: ../plugins/modemmanager.c:bearer_handler() Set MMSC: http://mms.invalid, Set Proxy: (null), Set MMS APN: apn.invalid
May 05 09:18:23 pureos chatty[1550]: Bearer Handler emitted an error, the APN set in mmsd's settings does not match any connected APNs
May 05 09:18:23 pureos mmsdtng[744]: Could not find settings: Operator ID '26207' with APN 'pinternet.interkom.de' not found in service provider database

Some of the value can be found in:

purism@pureos:~$ cat ~/.mms/modemmanager/mms
[Modem Manager]
CarrierMMSC=http://mms.invalid
MMS_APN=apn.invalid
CarrierMMSProxy=NULL
DefaultModemNumber=NULL
AutoProcessOnConnection=true
AutoProcessSMSWAP=true
IMSI=262075156772756

[Settings]
UseDeliveryReports=false
TotalMaxAttachmentSize=1100000
MaxAttachments=25
AutoCreateSMIL=false
ForceCAres=false

But from where the Operator ID 26207 comes from? My provider is FONIC with ID 26203:

purism@pureos:~$ mmcli --modem=any | grep -B3 -A2 -i Operator
  -----------------------------------
  3GPP     |                    imei: 86397xxxxxxxxxxxxx
           |           enabled locks: sim, fixed-dialing
           |             operator id: 26203
           |           operator name: FONIC
           |            registration: home
  -----------------------------------

In your XML its the first network-id element, MCC + MNC.

Hmm, thanks, this is not mine XML file, but came from somewhere installed :slight_smile: I had already the feeling, that this is broken. Should I insert an additional line as

<network-id mcc="262" mnc="03"/>

The value 26203 is what mmcli says. Or should I replace all three lines with that new one? And should I file a bug report in gitlab.gnome.org?

I would just change the 07 to 03 and see what happens. If it fixes it, then it might be good to file a bug report.

I changed the file /usr/share/mobile-broadband-provider-info/serviceproviders.xml to:

                <name>FONIC</name>
                <gsm>
                        <network-id mcc="262" mnc="03"/>
                        <network-id mcc="262" mnc="08"/>
                        <network-id mcc="262" mnc="11"/>
                        <balance-check>
                                <ussd>*101#</ussd>
                        </balance-check>
...

and rebooted. The message remains the same:

purism@pureos:~$ sudo journalctl -b -0 | grep 'Operator ID'
May 05 16:30:01 pureos mmsdtng[729]: Could not find settings: Operator ID '26207' with APN 'pinternet.interkom.de' not found in service provider database

Seems that mmsdtng is looking elsewhere.

Yeah it does. Might try a reboot, but I’m out of ideas after that.

I diged into this and even git cloned the sources of
the mmsd-tng (the next generation) from
git clone https://gitlab.com/kop316/mmsd.git

My modem says about the IMSI:

AT+CIMI
262075156772756

OK

The config file for the mmsdtg is in ~/.mms/modemmanager/mms but
with broken default values, only the IMSI is the correct one from
my SIM (i.e. from my provider FONIC, an O2 spin off):

cat ~/.mms/modemmanager/mms
[Modem Manager]
CarrierMMSC=http://mms.invalid
MMS_APN=apn.invalid
CarrierMMSProxy=NULL
DefaultModemNumber=NULL
AutoProcessOnConnection=true
AutoProcessSMSWAP=true
IMSI=262075156772756
...

The IMSI is explained here (in German, because the English version
of the page is not very good structured):

IMSI (MCC Mobile Country Code, 3 digits, MNC Mobile Network Code, 2 or 3 disgits)
262 07 is: Telefónica Germany GmbH & Co. oHG

I modified the above file according the settings in

https://www.apnsettings.org/de/fonic-de/

cat ~/.mms/modemmanager/mms
[Modem Manager]
CarrierMMSC=http://10.81.0.7:8002
MMS_APN=pinternet.interkom.de
CarrierMMSProxy=82.113.100.6:8080
DefaultModemNumber=NULL
AutoProcessOnConnection=true
AutoProcessSMSWAP=true
IMSI=262075156772756

and rebooted; now it seems correctly set:

purism@pureos:~$ sudo journalctl -b -0 | grep APN
May 06 09:47:30 pureos mmsdtng[787]: ../plugins/modemmanager.c:set_context() Current Context APN: pinternet.interkom.de, mmsd-tng settings MMS APN: pinternet.interkom.de
May 06 09:47:30 pureos mmsdtng[787]: ../plugins/modemmanager.c:set_context() You are connected to the correct APN! Enabling context...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 06 09:47:30 pureos mmsdtng[787]: ../src/service.c:mms_service_set_apn() Service APN Set to pinternet.interkom.de
May 06 09:47:40 pureos mmsdtng[787]: ../plugins/modemmanager.c:set_context() Current Context APN: pinternet.interkom.de, mmsd-tng settings MMS APN: pinternet.interkom.de
May 06 09:47:40 pureos mmsdtng[787]: ../plugins/modemmanager.c:set_context() You are connected to the correct APN! Enabling context...
May 06 09:47:40 pureos mmsdtng[787]: ../src/service.c:mms_service_set_apn() Service APN Set to pinternet.interkom.de
purism@pureos:~$

purism@pureos:~$ sudo journalctl -b -0 | grep 'Operator ID'
(empty)

Update: sending a MMS with a Jpeg file went fine.

I see a similar line in my logging. I think this is because there are no MMS details in the serviceproviders.xml for FONIC. There is no <apn> with <usage type="mms"/> for FONIC.

I created quite a while ago already this issue for it.

It seems to me that MMS is to be configured in the file ~/.mms/modemnanager/mms. A case like yours (provider does not support MMS) should be handled in this file by a parameter which stops mmsdtng at all.

I do not know. Maybe you could try to add your mms settings to serviceprviders.xml as a test.

I can not investigate your case as my provider supports MMS.

I mentioned the issue not to investigate, but for info. I noticed that the FONIC entry also has no <usage type="mms"/> part. I assume this is why you get the message in the logging about: mmsdtng[729] Could not find settings: Operator ID '26207' with APN 'pinternet.interkom.de' not found in service provider database.