regression on udev rules for HUAWEI mobile broadband?

Bug #1707810 reported by ghomem
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Undecided
Unassigned
usb-modeswitch-data (Ubuntu)
New
Undecided
Unassigned

Bug Description

I found several bug reports about mobile broadband USB sticks not working on Ubuntu 16.04. It seems that all the low level support is in place but the udev rules are incomplete, in what could be a regression from previous versions.

----------------------- 16.04 -------------------------

ATTRS{idVendor}=="12d1", ATTRS{manufacturer}!="Android", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1573", RUN+="usb_modeswitch '%b/%k'"

----------------------- 12.04 -------------------------

ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1001", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1003", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1009", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="101e", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1030", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1031", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1414", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1449", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14ad", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14b5", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14b7", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14c1", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14c4", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14c5", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14d1", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14fe", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1505", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1520", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1521", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1523", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1553", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1557", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c0b", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1d50", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1da1", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="380b", RUN+="usb_modeswitch '%b/%k'"

For example the HUAWEI device with vendor:product pair 12d1:1f01 (see #1527914 ) worked fine (plug and play) on Ubuntu 12.04 but appears as as mass storage device on Ubuntu 16.04.

The missing rule is simply:

ATTRS{idVendor}=="12d1", ATTR{idProduct}=="1f01", RUN+="usb_modeswitch '%b/%k'"

References: #1431179 #1527914 #1514231

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1707810

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
ghomem (gustavo) wrote :

Just to be clear, I commented the "catch all" line:

#ATTRS{idVendor}=="12d1", ATTRS{manufacturer}!="Android", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"

and added this line:

ATTR{idVendor}=="12d1", ATTR{idProduct}=="1f01", RUN+="usb_modeswitch '%b/%k'"

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

$ dpkg -S /lib/udev/rules.d/40-usb_modeswitch.rules
usb-modeswitch-data: /lib/udev/rules.d/40-usb_modeswitch.rules

So probably not Linux kernel related?

Revision history for this message
ghomem (gustavo) wrote :

Strange as this sounds I went to try the solution above on a different computer with the same Ubuntu version (16.04) and didn't work - device appeared as mass storage. The line that worked was this one:

ATTR{idVendor}=="12d1", ATTR{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -v 12d1 -p 1f01 -J"

which bypasses the udev modeswitch wrapper and has the parameters hardcoded. [1]

There is a related bug on the Debian bug tracker:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754348

[1] http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=4&t=2562

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

The post mentioned it was fixed here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751271

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

I've backported usb-modeswitch 2.4 and usb-modeswich-data 2017-01 from Ubuntu 17.04 (Zesty) to 16.04 LTS (Xenial), you can update packages from ppa:baltix-members , see
https://launchpad.net/~baltix-members/+archive

Please reboot after installing usb-modeswitch 2.4 and usb-modeswich-data 2017-01 from ppa:baltix-members , test if your USB modem works correctly with updated packages and write a comment here in any case (works or not).

Thanks,
Mantas Kriaučiūnas
Developer of Baltix GNU/Linux Ubuntu derivative

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.