Re: NetworkManager, ModemManager, and pppd



On Thu, 2019-03-14 at 16:52 +1300, Harry Mander via networkmanager-list 
wrote:
Hi,

I have a PPP connection brought up by pppd running on a ttyUSB
connection
to an LTE modem, which is managed by ModemManager. When pppd is
started
after simple-connecting the modem using ModemManager it is able to
get an
IP address fine (which can be seen from ifconfig and ip route etc.)
and I
can connect to the network using the modem. However, nmcli shows the
ppp0
connection as disconnected.

When used in combination with ModemManager, NetworkManager handles PPP
through a pppd plugin. MM itself does not do any IP configuration, that
is left to a connection manager like NetworkManager since IP config
(and routing, and DNS, etc) is pretty complicated and MM shouldn't re-
invent that wheel.

So, typically you run MM and NM at the same time, and NM will see the
modem and allow you to 'nmcli con up <modem connection>' and NM will
handle talking to MM and then the IP configuration.

What you're probably missing is the NetowrkManager "WWAN" plugin. I see
below you have the ADSL, OVS, and WiFi plugins. But you should also
have a WWAN plugin in the same directory.

That's likely a build-time problem. NM must be built with the --with-
modem-manager-1 flag. It should also be built with the --with-pppd flag
so it knows where to put the pppd plugin that it uses.

But that brings up the question, why is your modem using PPP at all?
Typically LTE-capable devices use a pseudo-ethernet device or a netdev
that just does IP ("raw-ip"). PPP is typically not used as it limits
network speeds due to its overhead. I'd expect your device to use
something like QMI, MBIM, or a CDC-NCM port for data instead of PPP.

Dan

How can I configure NetworkManager to see the PPP connection
properly? Is
it possibly related to the pppd plugin since we have libnm-ppp-
plugin.so
present in /usr/lib/NetworkManager/1.14.4 but the log does not show
any
pppd plugin being loaded:

NetworkManager[285]: <info>  [1552534718.0779] Loaded device
plugin:
NMAtmManager (/usr/lib/NetworkManager/1.14.4/libnm-device-plugin-
adsl.so)
NetworkManager[285]: <info>  [1552534718.1004] Loaded device
plugin:
NMOvsFactory (/usr/lib/NetworkManager/1.14.4/libnm-device-plugin-
ovs.so)
NetworkManager[285]: <info>  [1552534718.1181] Loaded device
plugin:
NMWifiFactory (/usr/lib/NetworkManager/1.14.4/libnm-device-plugin-
wifi.so)

This is running on an iMX7 based board using Yocto. I have added

--enable-ppp=yes
--with-pppd-plugin-dir=${libdir}/pppd/2.4.5

to the networkmanager recipe file.
_______________________________________________
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]