Re: Problems with modems/Example config for QMI-based modem,

On Wed, 2018-02-28 at 18:40 +0100, Jakob Hasse wrote:

We want to integrate different modems into our embedded system. 
Recently, our Linux-distributor decided to introduce NetworkManager. 
When we switch to NetworkManager, network connectivity via 3G/2G is 
never reliable: the connection either succeeds only sporadically or
at all. This happens on three types of modems from two different 
vendors. When we set up the modems manually with pppd or with a QMI
program, everything works fine an reliably, also automatically after
Could you give me advice what steps to do to produce debug/log output
then come back here and have someone look at it?

You want to increase the NetworkManager and ModemManager logging level:

nmcli g log level debug
mmcli -G debug

and then plug your modem in.  This will dump debug logging to whatever
system log service your linux distro uses.  For systemd-based distros,
you want:

journalctl -b -u NetworkManager
journalctl -b -u ModemManager

other distros will use /var/log/messages, /var/log/daemon.log, or
wherever else syslog 'daemon' facility output goes.

Furthermore, it would be really nice to have an example
file for /etc/NetworkManager/system-connections/ to configure a
with QMI connection. All the examples I had so far (seem to) only 
establish the connection with pppd.

There should be no difference between a QMI or MBIM based modem and a
PPP based one.  The only options you really need are the APN and
possibly the username and password in the [gsm] section.

Since your email address is ".ch" I'm going to assume you don't care
about CDMA/EVDO and thus you only need to use [gsm].  The simplest
connection would be something like:

id=T-Mobile Internet


Again, there should be no difference between QMI and PPP-based modems
from a NetworkManager perspective.  ModemManager abstracts that away
for us.

Another problem is that it often happens that we use NetworkManager
devices which changes some settings and afterwards we can't even use
old methods to establish a connection. This is really scary since it 
basically renders our devices unusable so far. Is it possible to
NetworkManager to put the device in the original state again after
using it?

What kind of changes happen here?  Are they things that are done
externally, or done by NetworkManager?

I also have a question to ModemManager but don't know whether I'm
with it here:
We want to send AT commands to the modems while they serve an
connection. Normally, this is possible since the Modems all have 
multiple serial interfaces. But when using ModemManager, it locks
serial interfaces of the modems and we can't use them anymore. I
that ModemManager can send AT commands with "mmcli --command" but
in debug mode, so apparently not for production use. Is it possible
send commands another way with ModemManager or prevent it from
all AT interfaces?

Yeah, this request comes up periodically, and MM should probably just
not open ports it doesn't need.  With PPP-based modems MM needs at
least two AT ports (one for the PPP connection and a second to use for
status while connected).  I don't think MM will care about the AT ports
when it's using QMI/MBIM, but if you can get debug logs from
ModemManager we can verify that.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]