Re: automatic APN selection



Ahoj,

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

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 -
https://lists.freedesktop.org/archives/modemmanager-devel/2019-February/006996.html

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

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/98

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
new_default_connection().

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
conf.d/.

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.

Cheers
Lubo

BR,

marek
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list



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