Configuring a PPP device with NetworkManager nmcli
After a long time working through little to no documentation, I have found there are two parts to solving this.
Part 1: Getting ModemManager to detect serial devices
By default, and for good reason, ModemManager does not probe every serial device on your system. This differs from its default behaviour with USB devices which is to scan and apply manufacturer and device filters until it finds a match.
To get ModemManager to find serial modems, you must add a flag (ID_MM_PLATFORM_DRIVER_PROBE
) to the necessary udev
node to allow scanning on that particular device. See this post for detailed instructions.
Part 2: Setting up NetworkManager to use the device
NetworkManager will show the device in nmcli device status
as disconnected
if ModemManager did the right thing (if not, check /var/log/messages). Now a connection needs to be created for the device to connect to. See my answer for another question on how to do this.
Related videos on Youtube
Chris Watts
Updated on September 18, 2022Comments
-
Chris Watts almost 2 years
I have the
ppp
andnetwork-manager
packages installed on my Debian-based BeagleBone and I'm trying to reliably connect it to a GPRS modem over serial.I'm using an Adafruit FONA which works like a charm with the recommended configuration script using
pon fona
andpoff fona
. This creates appp0
device once a network connection is granted.Now I want NetworkManager to be able to connect and disconnect my FONA without me needing to manually turn on the device with
pon fona
(which can fail).I'm just using the terminal for NetworkManager with
nmcli
. Before you ask, I have not addedppp0
to/etc/network/interfaces
.I was originally using ConnMan but since the documentation was so poor I abandoned trying to get it to work.
This is what I have at the minute when I run
nmcli device status
:DEVICE TYPE STATE CONNECTION wlan0 wifi connected MyHomeWiFi eth0 ethernet unavailable -- usb0 ethernet unmanaged -- lo loopback unmanaged --
Obviously there's no
ppp0
in here. As I mentioned, if I manually run pppd withpon fona
then it'll appear. The type is unknown though and I would have expected something likeDEVICE TYPE STATE CONNECTION ppp0 unknown connected ppp0 wlan0 wifi connected MyHomeWiFi eth0 ethernet unavailable -- usb0 ethernet unmanaged -- lo loopback unmanaged --
How do I get it to play nicely?
-
Chris Watts over 8 yearsIt looks like ModemManager is the way to go, but since this is a UART modem, it doesn't automatically get detected. There's documentation of how to manually add a modem through the GUI, but not in the CLI
mmcli
documentation. Can anybody help here? -
Chris Watts over 8 yearsI figured out how to get ModemManager to pick up serial devices. See this post: askubuntu.com/questions/740584/…
-