On Wed, 2018-02-28 at 18:40 +0100, Jakob Hasse wrote: > Hello, > > 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 > not > 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 > test > program, everything works fine an reliably, also automatically after > boot. > Could you give me advice what steps to do to produce debug/log output > to > 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 > configuration > file for /etc/NetworkManager/system-connections/ to configure a > modem > 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: [connection] id=T-Mobile Internet uuid=0083942e-b260-4b73-a1fd-860f3e6ca2c2 type=gsm [gsm] apn=epc.tmobile.com number=*99# 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 > on > devices which changes some settings and afterwards we can't even use > the > old methods to establish a connection. This is really scary since it > basically renders our devices unusable so far. Is it possible to > tell > 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 > right > with it here: > We want to send AT commands to the modems while they serve an > internet > connection. Normally, this is possible since the Modems all have > multiple serial interfaces. But when using ModemManager, it locks > all > serial interfaces of the modems and we can't use them anymore. I > know > that ModemManager can send AT commands with "mmcli --command" but > only > in debug mode, so apparently not for production use. Is it possible > to > send commands another way with ModemManager or prevent it from > locking > 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. Dan _______________________________________________ networkmanager-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/networkmanager-list
