ModemManager and ppp

Colin Helliwell colin.helliwell at ln-systems.com
Fri Mar 10 16:52:07 UTC 2017


> On 10 March 2017 at 16:37 Aleksander Morgado <aleksander at aleksander.es> wrote:
> 
> On Fri, Mar 10, 2017 at 5:24 PM, Tom Hayward <tom at harbortronics.com> wrote:
> 
> > I'm a new user of ModemManager and trying to understand the scope of
> > the software.
> > 
> > I've used ModemManager successfully with a cdc-wdm modem. It created a
> > wwan0 interface where I could use a dhcp client and then route
> > packets.
> > 
> > Now I have a cdc-acm modem that requires running pppd on /dev/ttyACM0.
> > I have a pppd and chatscript config to initialize it, a ppp0 interface
> > is created, and I can route packets over it. Can I do any of this with
> > ModemManager? I've found that I can use --simple-connect="apn=xxxx" to
> > get the modem state to change to "connected", but it does not create a
> > ppp0 interface on which to route packets.
> > 
> > Is this a matter of configuration, lack of support, or simply outside
> > the scope of ModemManager? Is there a way to use ModemManager to
> > initiate the ppp connection?
> 
> Initiating a ppp session is currently out of scope of MM. MM will put
> the TTY in connected mode; then you need to (externally, another app)
> launch pppd on the TTY that MM reported as "connected".
> 
> The whole MM sequence is the same for TTY-only and QMI/MBIM+wwan
> devices; just launch --simple-connect, if successful it creates a
> bearer object that is in connected state. The bearer object will
> report which is the data interface to use (which could be a wwan, or a
> TTY) and also which method to use (ppp over the tty, or DHCP or Static
> IP config over the wwan). An application that wants to use MM as modem
> management and handle multiple modem types needs to handle all 3
> methods and use explicitly the one reported by MM (e.g. some modems
> won't be able to use DHCP over a wwan and in that case static IP
> setting needs to be performed).
> 

At the moment I'm working through other issues/compatibilities on a SysV-based system - it's just a simpler way to experiment and understand! But just prior to that I also did a systemd variant, and was *well* impressed that simply loading the modem driver could fire off not only MM but also the establishment of the ppp connection.
As Aleksander points out, other manual steps are possible - I do a '--simple-connect' then a 'pon', and the IP connection is successful [aside from my other niggles]. 
It's mentioned by Aleksander in other threads here, but your ppp 'peers' file probably doesn't need too much to work. Just the pppd options needed, i.e. no need for a 'chat' script - MM will do the 'chat' for you.


More information about the ModemManager-devel mailing list