Re: automatic APN selection


On Mon, Mar 18, 2019 at 5:23 PM Lubomir Rintel <lkundrak v3 sk> wrote:


On Tue, 2019-02-12 at 11:49 +0100, Belisko Marek via networkmanager-
list wrote:

I posted yesterday question to ModemManger mailing list about implementing
automatic APN selection (based on mobile broadband database) and it was
pointed [0] out that this feature should be added to NM. My case is that
embedded device using GSM modem should connect to internet automatically
(without user intervention only by plugging SIM card). Isomebody working on
such solution already? It is right approach? Thanks for replies.

0 -

I've given this a stab in lr/gsm-default-apn branch. Please take a

Connecting the modem is not entirely automatic; you still need to
connect a device ("nmcli d connect ttyUSB666").

For the device to connect automatically new_default_connection() would
need to be implemented for NMDeviceModem. That would probably involve
factoring out the logic from src/devices/nm-device-ethernet.c's

Elsewhere in the thread Aleksander argued that it would be somewhat
risky, but it has been also argued that phones tend to do that and the
world hasn't imploded yet. I tend to think it is in fact a good policy
for most installations and distributors or users who would object this
could do so by dropping a snippet with no-auto-default= setting into

As a side comment, if automatic connection is ever implemented, it
should probably
consider whether the modem is roaming or not, to avoid excessive charges.

For now the biggest shortcoming of the branch is that the code is
probably not very beautiful and could use some review or polishing. If
you'd like to pick it up and maybe add the autoconnect functionality,
you're welcome to do so. Feedback is also welcome.




networkmanager-list mailing list
networkmanager-list gnome org

networkmanager-list mailing list
networkmanager-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]