Add udev rules for Huawei E1550 GSM modem

Bug #401655 reported by Erik Forsberg on 2009-07-20
This bug affects 15 people
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Nominated for Lucid by dav2dev

Bug Description

Binary package hint: udev-extras

The Huawei E1550 GSM/UMTS modem requires the following udev rules to work properly when plugged in:

-- begin /etc/udev/rules.d/etc/15-huawei-e1551.rules --
ACTION!="add", GOTO="huawei_zerocd_end"

SUBSYSTEM=="usb", ATTR{bDeviceClass}!="ff" ,ENV{DEVTYPE}=="usb_device", GOTO="huawei_zerocd_disable"
SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", GOTO="huawei_zerocd_disable"

ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"

-- end /etc/udev/rules.d/etc/15-huawei-e1551.rules --

I'm not claiming false credit for this rule, found it on this swedish ubuntu blog:

I have however verified that it works on Ubuntu 9.04 with udev-extras as detailed below:

$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04

$ apt-cache policy udev-extras
  Installed: 0~-2~gite5fb9bd-1
  Candidate: 0~-2~gite5fb9bd-1
  Version table:
 *** 0~-2~gite5fb9bd-1 0
        500 jaunty/universe Packages
        100 /var/lib/dpkg/status

Steve Langasek (vorlon) on 2009-07-20
affects: udev-extras (Ubuntu) → udev (Ubuntu)

These are old rules and would not work in Karmic (modem-modeswitch is gone) - pitti, any idea where it went?

Changed in udev (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Low
status: New → Incomplete
Martin Pitt (pitti) wrote :

udev still ships /lib/udev/modem-modeswitch, however, I don't know what it does. Alex, any idea about this?

Martin Pitt (pitti) wrote :

Anyway, it looks pretty much the same as the existing Option modem rules in /lib/udev/rules.d/61-option-modem-modeswitch.rules . For understanding this, Erik, what does this change exactly? Thanks!

Erik Forsberg (forsberg) wrote :

Just as you say, this rule looks very much like the rule in 61-option-modem-modeswitch.rules, and removing my /etc/udev/rules.d/15-huawei-e1551.rules then adding this line to 61-option-modem-modeswitch.rules:

ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"

..also makes the modem work as intended (rebooted after udev rulechange to be sure I got the new rules).

What's odd is that this is a huawei modem, not an option modem, so one would expect it to work better with usb_modeswitch and it's -H (huawei) mode - but that's not the case, I've tested that as well.

Hope that gave you the answer to your question?

Martin Pitt (pitti) wrote :

Committed to git trunk (53842b5). Thanks!

Changed in udev (Ubuntu):
status: Incomplete → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package udev - 146-1

udev (146-1) karmic; urgency=low

  * New upstream release:
    - udevadm trigger "--retry-failed" replaced by "--type=failed"
    - RUN "ignore_error" option replaced by "fail_event_on_error"
    - Added HP Presario 2100 keymap. LP: #20223.
    - Added more keymap coverage for Compaq Evo models. LP: #35382.
    - Added Fujitsu Amilo M keymap. LP: #48547.
    - Added Compal Hel80i keymap. LP: #198530.
    - Added Zepto ZNote keymap. LP: #400252.
    - Added Everex Stepnote XT5000T keymap. LP: #400921.
    - Added rules to switch mode of Huawei E1550 GSM modem. LP: #401655.
    - Various other keymap and modem updates.

  [ Martin Pitt ]
  * debian/control: Add missing Breaks: casper (<< 1.174) to avoid breaking
    upgrades from jaunty in wubi installations. (LP: #400138)

 -- Scott James Remnant <email address hidden> Tue, 25 Aug 2009 13:45:17 +0100

Changed in udev (Ubuntu):
status: Fix Committed → Fix Released
David G (dlg443) on 2009-10-03
Changed in udev (Ubuntu):
status: Fix Released → Incomplete
status: Incomplete → Fix Released
Felix Schwarz (felix-schwarz) wrote :

Actually this bug is not fixed any longer as there was a revert on November 23rd:;a=commitdiff;h=8a993fab2f218234f06743bcc127dda61a45711b

Hey Dan,

in [1] you reverted a previous commit [2] to fix the Huawei E1550 GSM
modem in udev (using modem-modeswitch) with the rationale that "other
manufacturers have completely different methods for killing their fake
driver CD". However, the rule was tested on that actual hardware, and
it worked fine.

I'm interested in why this rule was bad, and what should be done



Martin Pitt |
Ubuntu Developer ( | Debian Developer (

Martin Pitt (pitti) wrote :

Reopening. I mailed Dan about the reversion (keeping this bug in CC).

Changed in udev (Ubuntu):
status: Fix Released → Triaged
dav2dev (gin18) wrote :

i can confirm the bug on lucid.

Jeffrey Seguerra (jepong) wrote :

i also confirm the bug on lucid... im using kubuntu...

Jeffrey Seguerra (jepong) wrote :

so whats our workaround now?

Jonas Bonn (jonas.bonn) wrote :

So it seems we need to add a usb-modeswitch rule instead of a modem-modeswitch rule... doesn't seem like a big deal. Would somebody who has this hardware see if they can effect the mode switch using the usb-modeswitch command? Then we can put the appropriate rule into a udev rule.

Jeffrey Seguerra (jepong) wrote :

installed usb-modeswitch on ubuntu and kubuntu lucid beta 1 and it WORKS! Huawei E1550 works!

Jonas Bonn (jonas.bonn) wrote :

Jeffrey: Could you give more detail? What did you do? Did you run the usb-modeswitch command by hand? If yes, what parameters did you pass?

Jeffrey Seguerra (jepong) wrote :

i just sudo aptitude install usb-modeswitch and presto... it works.

Jonas: usb-modeswitch in Lucid Lynx are redesigned to be launched by udev if rules fit. For example, if you plugin device and usb strings match, it launches usb-modeswitch with right configuration file and device automagically works.

In Karmic/Jaunty you still have to edit and run it from console with sudo.

Jonas Bonn (jonas.bonn) wrote :

OK, this is good.... this is bug just about closeable then. One last detail to be taken care of: Network Manager should depend on usb-modeswitch... correct?

Propably should (but more like in suggests status). Also there is work going on to include usb-modeswitch in main and by default in Ubuntu, but this won't make for Lucid because of amount of testing this step requires. But I will try to get it into Lucid+1.

Jonas Bonn (jonas.bonn) wrote :

Suggests? I don't know about this... one of the strongest arguments we have for Ubuntu is ease of use. This argument fails pretty badly for this hardware right now. In Sweden there are prepaid cards that come with this modem and that are pretty popular.

But of course, if it's not in main then there's not one much one can do...

Jonas: you can suggest for OEMs and people who installs Ubuntu to add this package to the mix. If people who does installing knows this, this is already some kind of solution.

So, anyway, can someone else test this modem with Lucid and confirm that it works with usb-modeswitch installed?

@ Peteris: I tested Lucid beta1 (with a desktop i386 live-cd) with the Huawei e1550 and can confirm that the modem only works if the usb-modeswitch package is installed.

I think that this is some sort of regression, because it works fine under karmic without installing any additional packages. If the bug still exists when Lucid is released, it willl probably annoy a lot of people, who wont be able to connect to the internet after an upgrad from 9.10 to 10.04.

i can confirm this bug in lucid beta 1 .. but after installing usb-modeswitch ...... huawei E1550 works !!!

Martin Pitt (pitti) wrote :

modem-modeswitch was obsoleted upstream, so please install usb-modeswitch as indicated in the previous comments.

Changed in udev (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: Triaged → Won't Fix
João Machado (geral-jpaulo) wrote :

I was using this modem, but lately it don't work.
Network manager in debug mode says
... udevd-work[3953]: exec of program '/lib/udev/' failed
Is this normal?

Works perfectly with usb-modeswitch in lucid!!!

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

Related questions