Re: automatic APN selection
Hi, On Mon, Mar 18, 2019 at 5:23 PM Lubomir Rintel wrote: > > 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/. 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. > > Cheers > Lubo Cheers, Alfonso > > > BR, > > > > marek > > ___ > > networkmanager-list mailing list > > networkmanager-list@gnome.org > > https://mail.gnome.org/mailman/listinfo/networkmanager-list > > ___ > networkmanager-list mailing list > networkmanager-list@gnome.org > https://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
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 ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: automatic APN selection
>> Also, I'd like to emphasize that IMHO this should not be the default in NM. >> Automatically selecting what APN to use should be explicitly enabled by the >> user somehow. Companies doing custom setups with MM+NM can enable this >> feature, even providing a "controlled" subset of the >> mobile-broadband-providers-info database, and that specific use case makes >> total sense. > > Why so? I’d see such a thing as a lovely features, and you pretty much loose > the benefit of it being default if you have to find out you need to activate. > On the other hand it would be so neat to put a sim card in a computer that > happens to have a free-software supported wwan card and get stuff just > working! > > I mean, it’s what most mobile phones do, right? > I believe there's always the fear of wrongly using the APN you're not supposed to use and getting automatically charged money for that. I'm not sure if this fear is based on known real usecases or it should really be obsoleted by now, though, especially since all LTE devices have "some sort of active connection" as soon as they're registered to the network. Otherwise, the worst thing that could happen if using a wrong APN is that the modem doesn't connect with the automatic settings, which, well, that shouldn't be a big issue. Users that require special APN settings will anyway need to insert them manually. I really have mixed feelings, so I've always suggested that automagic APN setup to be optional. But hey, I may be totally wrong, this is just my opinion :) -- Aleksander https://aleksander.es ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: automatic APN selection
Hi, On 2019/02/12 at 14:33, Aleksander Morgado wrote: > Also, I'd like to emphasize that IMHO this should not be the default > in NM. Automatically selecting what APN to use should be explicitly > enabled by the user somehow. Companies doing custom setups with MM+NM > can enable this feature, even providing a "controlled" subset of the > mobile-broadband-providers-info database, and that specific use case > makes total sense. Why so? I’d see such a thing as a lovely features, and you pretty much loose the benefit of it being default if you have to find out you need to activate. On the other hand it would be so neat to put a sim card in a computer that happens to have a free-software supported wwan card and get stuff just working! I mean, it’s what most mobile phones do, right? Could it at least be done so more user-friendly distribution (such as Debian, by opposition with, say, Parabola, Gentoo, etc.) makes this a default, through configuration files (and not only GUI), so uncaring user would benefit it neitherless? ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: automatic APN selection
Hey, just so you know this basically exists. You just need to create a connection profiles with the correct "sim-id" "apn" pairs. Some users, myself included, wouldn't want this to be automatic because we use private APNs, but you could easily put together an optional package of connection files that accomplishes this. Alex Ferm PetroPower, LLC. 3003 E. 37th Street N. Suite 100 Wichita, KS 67219 On 2/12/19 7:33 AM, Aleksander Morgado wrote: Hey, 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 Hi, sounds reasonable to me. Maybe the first step would be to move the code from libnma (network- manager-applet) to libnm (NetworkManager) to handle the mobile- provider-database. Or maybe better, make it an independent libnm- mobile-provider-database.so library to keep core libnm smaller. As it is, NetworkManager certainly cannot link against libnma. [1] https://gitlab.gnome.org/GNOME/network-manager-applet/blob/master/src/libnma/nma-mobile-providers.c Also, I'd like to emphasize that IMHO this should not be the default in NM. Automatically selecting what APN to use should be explicitly enabled by the user somehow. Companies doing custom setups with MM+NM can enable this feature, even providing a "controlled" subset of the mobile-broadband-providers-info database, and that specific use case makes total sense. ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: automatic APN selection
Sorry, I meant "sim-operator-id". "sim-id" wouldn't work, as it is unique to each sim card. Alex Ferm PetroPower, LLC. 3003 E. 37th Street N. Suite 100 Wichita, KS 67219 On 2/12/19 9:56 AM, Alex Ferm wrote: Hey, just so you know this basically exists. You just need to create a connection profiles with the correct "sim-id" "apn" pairs. Some users, myself included, wouldn't want this to be automatic because we use private APNs, but you could easily put together an optional package of connection files that accomplishes this. Alex Ferm PetroPower, LLC. 3003 E. 37th Street N. Suite 100 Wichita, KS 67219 On 2/12/19 7:33 AM, Aleksander Morgado wrote: Hey, 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 Hi, sounds reasonable to me. Maybe the first step would be to move the code from libnma (network- manager-applet) to libnm (NetworkManager) to handle the mobile- provider-database. Or maybe better, make it an independent libnm- mobile-provider-database.so library to keep core libnm smaller. As it is, NetworkManager certainly cannot link against libnma. [1] https://gitlab.gnome.org/GNOME/network-manager-applet/blob/master/src/libnma/nma-mobile-providers.c Also, I'd like to emphasize that IMHO this should not be the default in NM. Automatically selecting what APN to use should be explicitly enabled by the user somehow. Companies doing custom setups with MM+NM can enable this feature, even providing a "controlled" subset of the mobile-broadband-providers-info database, and that specific use case makes total sense. ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: automatic APN selection
Hey, > > 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 > > Hi, > > sounds reasonable to me. > > > Maybe the first step would be to move the code from libnma (network- > manager-applet) to libnm (NetworkManager) to handle the mobile- > provider-database. Or maybe better, make it an independent libnm- > mobile-provider-database.so library to keep core libnm smaller. > > As it is, NetworkManager certainly cannot link against libnma. > > > [1] > https://gitlab.gnome.org/GNOME/network-manager-applet/blob/master/src/libnma/nma-mobile-providers.c > Also, I'd like to emphasize that IMHO this should not be the default in NM. Automatically selecting what APN to use should be explicitly enabled by the user somehow. Companies doing custom setups with MM+NM can enable this feature, even providing a "controlled" subset of the mobile-broadband-providers-info database, and that specific use case makes total sense. -- Aleksander https://aleksander.es ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: automatic APN selection
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 Hi, sounds reasonable to me. Maybe the first step would be to move the code from libnma (network- manager-applet) to libnm (NetworkManager) to handle the mobile- provider-database. Or maybe better, make it an independent libnm- mobile-provider-database.so library to keep core libnm smaller. As it is, NetworkManager certainly cannot link against libnma. [1] https://gitlab.gnome.org/GNOME/network-manager-applet/blob/master/src/libnma/nma-mobile-providers.c best, Thomas > > , > > marek > -- > as simple and primitive as possible > - > Marek Belisko - OPEN-NANDRA > Freelance Developer > > Ruska Nova Ves 219 | Presov, 08005 Slovak Republic > Tel: +421 915 052 184 > skype: marekwhite > twitter: #opennandra > web: http://open-nandra.com > ___ > networkmanager-list mailing list > networkmanager-list@gnome.org > https://mail.gnome.org/mailman/listinfo/networkmanager-list signature.asc Description: This is a digitally signed message part ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
automatic APN selection
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 BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list