modemmanager prevents Gobi 2000 firmware loading

Bug #686418 reported by Jochen Gruse on 2010-12-07
This bug affects 10 people
Affects Status Importance Assigned to Milestone
modemmanager (Ubuntu)
Mathieu Trudel-Lapierre
Mathieu Trudel-Lapierre

Bug Description

Binary package hint: modemmanager

System the bug occurs on:
Lenovo T410 2522 2VG with Qualcomm Gobi 2000 UMTS modem with Kubuntu 10.10 Maverick/amd64

Problem description:
The Qualcomm Gobi 2000 modem needs to get its firmware loaded before it can be used. Without firmware it registers as USB device 05c6:9204. The /dev/ttyUSB0 device registered by qcserial for this device is not usable as a modem, only for loading the firmware.

After firmware load, this USB device deregisters and the now functional modem registers with USB ID 05c6:9205. Now /dev/ttyUSB0 works for AT commands or pppd connections.

Package gobi-loader and firmware is correctly installed. Loading the firmware by hand works reliably.

After almost every boot, the modem still comes up uninitialized (USB ID 05c6:9204, "success rate" of maybe 1 in 20 boots that the modem is initialized). If uninitialized, "lsmod" shows the module "qcserial" in use, "fuser /dev/ttyUSB0" shows the modem-manager PID. Killing modem-manager and then loading the firmware by hand works reliably, restarting modem-manager shows a working WWAN device.

My conclusion is that while gobi-loader is still loading the firmware (takes about 0.5 - 0.75 seconds), modem-manager tries to connect to the modem to send AT+GCAP commands, thus corrupting the firmware.

To prevent modem-manager to access /dev/ttyUSB0 while the firmware load is still in progress, I added 2 lines to

        # Qualcomm Gobi 2000 QDL
        ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9204", ENV{ID_MM_DEVICE_IGNORE}="1"

This prevents modem-manager from corrupting the firmware load and the modem always comes up correctly initialized. Then modem-manager takes control of the new device and connecting via "mobile broadband" works.

Please note that there seem to be other Qualcomm modems which use the same procedure (come up uninitialized with USB ID X, deregister after firmware load and come up with USB ID X+1). Maybe there should be some more USB-IDs blacklisted?

One might argue that the real bug is a) modemmanager trying to work with the uninitialized modem at all or b) gobi-loader not locking /dev/ttyUSB0 or creating a matching lock file in /var/lock... But the workaround doesn't seem too much of a hack, as modem-manager seems to need a blacklist for other cases too.

Jochen Gruse (lpnet) wrote :

Output of "uname -a":
Linux thinky 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 11:55:36 UTC 2010 x86_64 GNU/Linux

Output of "lsb-release -a":
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick

Jochen Gruse (lpnet) wrote :

Output of "dpkg-query -W modemmanager network-manager":

modemmanager 0.4+git.20100809t153145.be28089-0ubuntu1
network-manager 0.8.1+git.20100810t184654.ab580f4-0ubuntu2

These are the up-to-date packages from the official repositories, no ppa's or third party repositories added.

Jochen Gruse (lpnet) wrote :

The attached file was generated out of the maverick kernel sources qcserial.c. It lists all known QDL devices (for firmware loading) in udev usb-blacklist format. These lines should be added to "/lib/udev/rules.d/77-mm-usb-device-blacklist.rules".

Martijn vdS (martijn) on 2011-01-07
Changed in modemmanager (Ubuntu):
status: New → Confirmed

Sounds like a reasonable fix in ModemManager, and agrees roughly with how we deal with flip-flop devices already: the initial device before flip (e.g. firmware load) needs to be ignored, and the device then re-registers with a new USB ID.

I'll get this shipped in Natty, could someone do testing there before this also gets pushed to maverick-proposed? I will let you know once the package is ready in Natty (and available on a live cd).

Changed in modemmanager (Ubuntu):
importance: Undecided → High
status: Confirmed → In Progress
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Pieter De Wit (pieter-insync) wrote :

Hi Mathieu,

I really really would like to see this "just work" so I will put my hand up for testing on Maverick (and a liveCD download). I can post my lsusb a bit later if needed, but I have the HP "brand" of this card. I do believe that there was a kernel patch that also had to be made ?

Thanks !

I will also help on testing this on Maverick (got a Lenovo Thinkpad T510i here)

AIAMUZZ (muzafsh-113) wrote :

I am using Ubuntu 10.10 Maverick too,
ready to help provided i am given step-by-step instructions
a non-developer me :)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package modemmanager - 0.4+git.20110124t203624.00b6cce-0ubuntu1

modemmanager (0.4+git.20110124t203624.00b6cce-0ubuntu1) natty; urgency=low

  * upstream snapshot 2011-01-24 20:36:24 (GMT)
    + 00b6cce4df7d4acbf3e580a03c2f044e18589d2c
    - rules: blacklist some unlikely USB serial dongles
    - gsm: enable unsolicited codes on secondary ports too
    - test: handle cancel and distinguish between initiate and respond
    - gsm: wire up USSD Respond function
    - api: add reply parameter to USSD Respond method
    - linktop: add plugin for Linktop/Teracom LW273
    - gsm: prefer AT+CIND signal quality for modems that support it (LP: #682282)
    - huawei: don't spam syslog with tx/rx stats (LP: #673457, #662791)
    - gsm: query signal strength with +CIND if modem does not support +CSQ
    - gsm: add preliminary USSD support
    - huawei: fix potential double-free on error
    - core: prefer CDMA capabilities over GSM for dual-mode devices
    - gsm: allow use of GSM 03.38 character set
    - polkit: fix for polkit >= 0.97
    - core: work around dbus-glib property access bug (CVE-2010-1172)
  * debian/patches/qdl-blacklist.patch: add a blacklist of Gobi QDL devices so
    that we don't break firmware loading by trying to initialize them before
    the modem is really ready. (LP: #686418)
 -- Mathieu Trudel-Lapierre <email address hidden> Wed, 26 Jan 2011 21:03:12 -0500

Changed in modemmanager (Ubuntu Natty):
status: In Progress → Fix Released

So I just uploaded an updated modem-manager to natty. Provided this makes it into the next daily live cd (in a couple of hours from now), what should be done would be to test with a system that contains a Gobi device such as the one this report is about (any device in the list in the above comments will do though).

You should be able from the Live CD to install the firmware loader and set up a 3G connection in NetworkManager to test it. I will provide full instructions if needed once I can confirm this version is in a working daily image ;)

AIAMUZZ (muzafsh-113) wrote :

thanks Mathieu Trudel-Lapierre :)
If you provide full instructions then i put my hand up too...

dasunsrule32 (aaron.e) wrote :

I have a Google CR-48 and am running natty, I believe this has the same Gobi2000 modem installed. The card doesn't work for me, I checked the version number and it matches the one on launchpad. I also do not have any ttyUSB* devs listed either. Thank you.


Bus 005 Device 003: ID 0cf3:3005 Atheros Communications, Inc.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 04f2:b205 Chicony Electronics Co., Ltd
Bus 001 Device 003: ID 0bda:0138 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 1410:a014 Novatel Wireless
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dpkg-query -s modemmanager:

Package `modem-manager' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
atechols@aaron-laptop:~/Downloads$ sudo dpkg-query -s modemmanager
Package: modemmanager
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 1136
Maintainer: Alexander Sack <email address hidden>
Architecture: amd64
Version: 0.4+git.20110124t203624.00b6cce-0ubuntu1
Depends: libc6 (>= 2.7), libdbus-glib-1-2 (>= 0.88), libglib2.0-0 (>= 2.22.0), libgudev-1.0-0 (>= 147)
Recommends: usb-modeswitch
 /etc/dbus-1/system.d/org.freedesktop.ModemManager.conf a2a61104bf3fc6aef138de420243f06b
Description: D-Bus service for managing modems
 Provides a D-Bus interface to communicate with mobile broadband (GSM, CDMA,
 UMTS, ...) cards. Implements a loadable plugin interface to add work-arounds
 for non standard devices. Also provides patches to use networkmanager (and
 the applet) with modem manager.
 Git Repository:

dasunsrule32 (aaron.e) wrote :

Also note, this is a clean install, not these side-by-side installs sharing the chromeOS kernel.

dasunsrule32: please see bug 842702 which I've opened for that addition.

All, further QDL device additions should be sent as a separate bug, please. It's too easy otherwise to miss comments on closed bugs :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers