How to do mobile broadband from command line

Dan Williams dcbw at redhat.com
Thu Mar 20 17:24:19 PDT 2014


On Thu, 2014-03-20 at 23:21 +0100, Yegor Yefremov wrote:
> On Thu, Mar 20, 2014 at 4:41 PM, Dan Williams <dcbw at redhat.com> wrote:
> > On Thu, 2014-03-20 at 15:20 +0100, Yegor Yefremov wrote:
> >> On Fri, Mar 14, 2014 at 5:47 PM, Dan Williams <dcbw at redhat.com> wrote:
> >> > On Fri, 2014-03-14 at 11:42 +0100, Aleksander Morgado wrote:
> >> >> Hey Yegor,
> >> >>
> >> >> On Fri, Mar 14, 2014 at 11:34 AM, Yegor Yefremov
> >> >> <yegorslists at googlemail.com> wrote:
> >> >> > I have some questions regarding NetworkManager<->ModemManager integration.
> >> >> >
> >> >> > 1. how do I create a connection in nm, that is later referenced by its
> >> >> > id in "nmcli connection up"? I saw examples with "edit" command but nm
> >> >> > 0.9.8.8 says: Error: 'con' command 'edit' is not valid.
> >> >> >
> >> >>
> >> >> Try using nm-connection-editor (GTK+ based UI app). Don't know in
> >> >> which version the nmcli support for editing connections was added.
> >> >> Dan?
> >> >
> >> > The direct edit functionality was added to NM 0.9.9, so no, it's not
> >> > available in 0.9.8 and lower.
> >> >
> >> > For example, here's a minimal WWAN connection, which should go
> >> > into /etc/NetworkManager/system-connections/ and be mode 0600 and owned
> >> > by root:
> >> >
> >> > [connection]
> >> > id=wwan
> >> > uuid=15d742f1-2b5a-421e-9f27-fcb1fc26d72c
> >> > type=gsm
> >> > autoconnect=false
> >> >
> >> > [ipv4]
> >> > method=auto
> >> >
> >> > [gsm]
> >> > number=*99#
> >> > username=blahblah
> >> > password=blahblah
> >> > apn=internet
> >> >
> >> > Then you can use "nmcli con up wwan" and "nmcli con down wwan".
> >>
> >> Thanks for the info. I've managed to compile the latest git version of
> >> NM in Buildroot. NM provides even a small terminal based GUI, where
> >> you can create/edit connections. Waiting for the final version to be
> >> released.
> >>
> >> P.S. NM still lacks udhcpc backend.
> >
> > Yeah, it does; want to contribute one?  We'll take it!
> 
> I'll try. I have looked at dhclient and it seems to be doable. Though
> udhcpc has quite different structure. Nevertheless it
> is worth implementing, especially for embedded distros, that are using Busybox.

Definitely.  One thing to note is that both the dhclient and dhcpcd code
use the same environment variables in their callout scripts, so that
probably won't work for udhcpc.  But that's OK, since then you're free
to do what's most efficient.

Dan



More information about the ModemManager-devel mailing list