Hello Dan, thanks for the answer. On 28.02.2018 22:38, Dan Williams wrote:
I attached the log of a successful run and an unsuccessful run. NetworkManager was successful with a Telit UE-910-UED (3G) and unsuccessful with a Quectel BG96 (LTE Cat M1/2G). In the latter case, the modem was registered in the network, according to he Manual and the LED feedback. ModemManager recognized the modem as it printed me output with mmcli -m 0. But no Internet connection so far. Normally, we also had problems with the Telit modem, I don't know why it worked yesterday... So far it was completely random for me, I could see no correlation of time or place or configuration with successful connections.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.
I tried the Quectel modem with this system-connections file: [connection] id=cellular type=gsm [gsm] apn=shared.m2m.ch number=*99# [ipv6] method=ignoreLater I added a uuid and tried again without success, even though the connection to the Telit module which was successful also didn't contain a uuid.
We suspect NetworkManager but don't have evidence, maybe it's something else but the main change we do is that NetworkManager is installed. Besides not being able to connect anymore, I noticed that the connection search mode of our Quectel modem changed, meaning it would search LTE Cat M1 and NB and 2G, not just LTE without 2G.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
All the Best, Jakob -- Jakob Hasse Software Developement E: jakob hasse smart-home-technology ch T: +41 44 552 02 66 Smart Home Technology GmbH www.smart-home-technology.ch
Attachment:
messages.zip
Description: Zip archive
Attachment:
success_messages.zip
Description: Zip archive