3

I have the ppp and network-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 and poff fona. This creates a ppp0 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 added ppp0 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 with pon fona then it'll appear. The type is unknown though and I would have expected something like

DEVICE  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?

1 Answers1

2

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.