Telit LE910 V2, cdc_ncm and systemd

Aleksander Morgado aleksander at aleksander.es
Thu Nov 8 15:59:12 UTC 2018


Hey,

> This is the first time I'm using ModemManager.
> The type of the modem is Telit LE910 V2 (product ID = 0036), providing cdc_acm, and cdc_ncm ports.
> I'm working on an embedded system, running kernel version 4.9.26.
> The Init-system is systemd version 232.
> Actually I've installed MM version 1.6.4 (which comes with Yocto 2.3).
> 

That is an extremely old version, you should definitely try to update. But anyway, for the specific issue you're seeing, it would probably be the same, see below.

> I can successfully establish a connection to the bearer.
> 
> The command mmcli -b 0 outputs:
> 
> --------------------------
> Status             |    connected: 'yes'
>                    |    suspended: 'no'
>                    |    interface: 'ttyACM0'
>                    |   IP timeout: '20'
> --------------------------
> Properties         |          apn: '****'
>                    |      roaming: 'allowed'
>                    |      IP type: 'ipv4'
>                    |         user: '****'
>                    |     password: '****'
>                    |       number: 'none'
>                    |         user: '****'
>                    |  Rm protocol: 'unknown'
> --------------------------
> IPv4 configuration |   method: 'ppp'
>                    |  address: 'unknown'
>                    |   prefix: '0'
>                    |  gateway: 'unknown'
>                    |      DNS: 'none'
> --------------------------
> IPv6 configuration |   method: 'unknown'
> --------------------------
> Stats              |          duration: '300'
>                    |    Bytes received: 'N/A'
>                    | Bytes transmitted: 'N/A'
> 
> If I start my ppp-on script immediately (within the same second) after issuing the command mmcli -m 0 -c -b 0, and receiving the message 'successfully connected the bearer', the PPP connection can be established, and the configured interface ppp0 comes up. The IP connection works fine.
>> But, when waiting several seconds (5 seconds or more) between mmcli -m 0 -c -b 0 ('successfully connected the bearer') and starting the ppp-on script, the PPP connect attempt always fails. Within /var/log/syslog, I can see the following messages:
> pppd[493]: pppd 2.4.7 started by root, uid 0
> pppd[493]: using channel 1
> pppd[493]: Using interface ppp0
> pppd[493]: Connect: ppp0 <--> /dev/ttyACM0
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x081d45a2> <pcomp> <acomp>
> pppd[493]: LCP timeout sending Config-Requests
> 
> In this case, when opening /dev/ttyACM0 with minicom, I can send AT and get back OK from the modem. That surprise me. I would expect that ttyACM0 is a transparent channel for PPP, and not an AT interface, when successfully connected to the bearer. At the same time, I can see MM communicating with the modem via ttyACM3 (as expected).
> 

Maybe there's some max time to get PPP up in the tty before it goes back to command mode?

> I can't see any dependency to the output of mmcli -b 0 Status IP timeout: '20'. Where is this timeout set? Is this the intended behavior of MM or do I miss something?
> 

That value is just a "hint" for the upper layers (e.g. NetworkManager) about the max time to wait for an IP addressing setup in the data port. In reality that value is always 20s except for the very special case of satellite comm modems (e.g. Iridium) where 20s for an IP establishment was too optimistic...

> Another question I have, is there a way to automatically configure the wwan0 (NCM) interface directly, using only systemd mechanisms (no NetworkManager involved)? Telit suggests to use the NCM protocol in conjunction with LTE connections. Is PPP really a bottleneck for LTE connections?
> 

PPP over the TTY is indeed a bottleneck if you want LTE throughput. This modem is designed to be used with the NCM interface definitely.

> I've tried
> [Match]
> Name=wwan0
> 
> [Network]
> DHCP=ipv4
> 
> but this does not work. Most probably, because the modem LE910 V2 does not support DHCP (neither QMI or MBIM). ip shows the wwan0 interface, but it is neither configured nor up. 

Doesn't have to do anything with QMI or MBIM really. This modem needs an AT command to get the modem connected before anything can be sent via the NCM interface. ModemManager currently doesn't support the AT+NCM combination in Telit modems, but it's just a lack of implementation, no other real reason. I actually think I have an old LE910 around somewhere here...

Speaking of which, I believe you can change the device to MBIM mode with AT#USBCFG=5, have you tried that?

> Does anybody have a working systemd configuration or an idea how to achieve this (without NetworkManager)?
> 

Unless you can configure the modem to "transparently autoconnect" and act as a router, then you cannot use the NCM interface directly, you need to control the modem via AT commands to bring the connection up.

> At least, I miss settings for the PDP context ID to use for a specific bearer. With a Vodafone SIM, we have to use a specific PDP context ID to access a private APN. Furthermore, the PDP context is different for 2G and 4G. Is this an undocumented feature of MM?

The missing AT commands to setup the connection via the NCM interface (AT#NCM, AT+CGACT, AT+CGDATA...) would also allow you to configure exactly which PDP contexts/EPS bearers to use. E.g you would do something like "configure PDP context with cid N with the settings you want" and then "connect cid N over the NCM interface", something in those lines.

If you're interested in implementing the AT+NCM support let me know and I can guide you a bit if needed.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list