RaspberryPi 2 with Huawei E398

Dan Williams dcbw at redhat.com
Fri May 15 07:23:56 PDT 2015


On Fri, 2015-05-15 at 09:28 +0100, John Whitmore wrote:
> I'm trying to put together a system which uses 2 Huawei E398 USB Dongles with
> two different operator SIM's so that if one modem has no coverage the other
> takes over. 
> 
> I've followed the debugging information on [1] to try and get my hands on the
> logs but not sure where the NetworkManger is sending its logging info. I do
> have the output from ModemManager, which I'll attach to this email. 
> 
> I'm not sure that the logging from ModemManager will be of any help at all as
> it might not be the issue. What is happening is that I can establish a
> connection but as soon as I start to do a ping test from the command line the
> whole system freezes. 
> 
> This is with one 4G Dongle in place, I was hoping to be able to manage both
> connections. 
> 
> I'm using raspbian 2015-05-05 with kernel 3.18.13
> 
> If I can send on anything else please let me know. I'd really like to get this
> system working. Unfortunately I've only got two E398 Dongles so I can't try
> with a different modem at present. I'll try and get my hands on another.

So the first thing I notice is that you're using ModemManager 0.5.x,
which is quite old and no longer maintained.  It also doesn't support
QMI, which the E398 should natively use instead of PPP.  The best thing
to do is use ModemManager 1.4 or later; unfortunately the Raspberry Pi
distro is based on a Debian version where many packages are 3 years
old :(

What's happening here is that the modem is crashing and disconnecting
from the USB bus:

modem-manager[2632]: <debug> [1431617075.251639] [mm-generic-gsm.c:5813]
simple_state_machine(): (ttyUSB0): simple connect state 6
modem-manager[2632]: <debug> [1431617075.389628] [mm-manager.c:793]
device_added(): (net/ppp0): could not get port's parent device
modem-manager[2632]: <info>  [1431617088.100879] [mm-manager.c:862]
device_removed(): (tty/ttyUSB0): released by
modem /sys/devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.2
modem-manager[2632]: <debug> [1431617088.101365] [mm-serial-port.c:844]
mm_serial_port_close(): (ttyUSB0) device open count is 0 (close)

which be due to some specific setup that ModemManager did earlier.
Unfortunately much of that setup is necessary for other functions (SMS,
signal strength, registration info, etc) but we've seen this problem
with modems that don't typically use AT commands as their "native" mode.

What should happen here is that you should have a 'usb0' or 'wwan0'
network interface, and a 'cdc-wdm0' device.  The cdc-wdm0 interface will
speak QMI (Qualcomm MSM Interface, depending on who you talk to) which
is the native protocol of this modem.  ModemManager 1.0 and later will
speak native QMI with the modem and hopefully will avoid the crashing
issue.

If there's any way you can grab ModemManager 1.4 and libqmi 1.12 from
the git repos or from source tarballs:

http://cgit.freedesktop.org/ModemManager/ModemManager/
http://cgit.freedesktop.org/libqmi/

then I think we have a chance of making this all work much better.

Dan



More information about the ModemManager-devel mailing list