Huawei E3131 gives error when plugged in

Bug #1193815 reported by Juha Jeronen
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usb-modeswitch-data (Ubuntu)
New
Undecided
Unassigned

Bug Description

In Ubuntu 13.04, the Huawei E3131 (correctly) switches to modem mode upon insertion (and works), but while the device is still in storage mode, Ubuntu tries to automatically mount the storage device, which then disappears upon modeswitching. The result is an error dialog with content similar to [1], which the user must ok each time the device is plugged in.

[1] https://answers.launchpad.net/ubuntu/+question/219742

The device is branded "DNA" (Finland), device IDs are 12d1:151a (storage mode), 12d1:151d (modem mode).

I was able to get rid of the error by editing the udev rules. To prevent Ubuntu from automounting the storage, it can be ejected by udev before running the modeswitch command.

I did this by copying /lib/udev/40-usb_modeswitch.rules to /etc/udev/rules.d/usb_modeswitch_customized.rules (to create an override) and then changing

---8<---8<---8<---

# Huawei E392u-12
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="151a", RUN+="usb_modeswitch '%b/%k'"

---8<---8<---8<---

to

---8<---8<---8<---

# Huawei E392u-12, DNA (FI) Huawei E3131
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="151a", RUN+="eject -s '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="151a", RUN+="usb_modeswitch '%b/%k'"

---8<---8<---8<---

i.e. by adding the eject command (the SCSI mode "-s" is important). This gets rid of the error dialog.

It would be nice if this was fixed in the official package.

Finally, note that the storage device still reappears after the modeswitch, but this is a problem in the E3131 itself (apparently rather common in USB mobile modems). After the switch, it appears as both a modem and a storage device (where the storage contains the Windows drivers). I haven't found a workaround for this part.

Martin Pitt (pitti)
affects: udev (Ubuntu) → usb-modeswitch-data (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.