APN settings values and storage

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.

These error messages from the mmsdtng are caused by missing correct configuration entries in the file ~/.mms/modemmanager/mms. Mine is correct now for my provider FONIC and I do not see any error messages anymore from mmsdtng. Only success meessages like

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:~$

Please read my post #14 in
APN settings values and storage