Wireless USB modems - mode-switching conflict

Bug #500726 reported by Josua Dietze on 2009-12-27
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Undecided
Unassigned
Nominated for Karmic by Bl4cK_$h4Rk
Nominated for Lucid by Bl4cK_$h4Rk

Bug Description

Binary package hint: udev

This affects all udev packs that contain "modem-modeswitch". It is a configuration (high level) problem.

Some USB devices have a pseudo CD-ROM state where they provide drivers (mostly non-Linux) and must be switched to a usable state with certain USB/SCSI commands. These commands are chosen by the firmware developers and vary quite a bit.

Some of these devices are handled in Ubuntu by "modem-modeswitch".

Unfortunately, there is the case of ambiguous USB IDs: the same CD-ROM state ID is used by various devices that need different switching commands or none at all (like cell phones). So a simple udev rule for this ID leads to conflicts which is what happened in the case at hands.

The devices "Vertex Wireless 100 Series" use the USB ID "05c6:1000" and need a SCSI eject command to switch. This ID is in all recent udev rules in Ubuntu, but the rules are targeting solely some "Option" modems, using a different switching command issued by "modem-modeswitch". There are more devices (AnyDATA ADU-500 Series, Samsung SGH-Z810) with the same USB ID, all needing different switching commands. Many cell phones with Qualcomm chipsets use this ID as well and should be left untouched when connected via USB.

The "Vertex" modem was not usable until all udev rules for the "05c6:1000" ID were disabled. On a side notice, there is even a procedure in the recent kernels to do the "Option" switch for this ID. It can be bypassed by the "usb-storage" option "option_zero_cd=2". According to the kernel developers, these kind of switching procedures will be thrown out in the future. New ones are only accepted if there is no other way (in userspace).

One solution for all these problems would be to include "usb_modeswitch" in the udev package. It has the ability to do further checks beyound the USB IDs and to identify ambiguos devices properly. In the latest version (1.0.6) there is support for more than 150 different devices and it should integrate quite well into the current udev system. It does not hurt to use it alongside the other switching mechanisms, but this obviously does not resolve the ambiguity problems.

The wrapper of "usb_modeswitch" does an additional check after switching to see if a driver was bound to the newly created modem device. If that did not happen, it will try to bind the "option" driver to make the device usable. Thanks to the "new_id" facility the modem ID doesn't even have to be known to the driver beforehand.

I'm at a loss what this bug report is about.

Changed in udev (Ubuntu):
status: New → Incomplete
Josua Dietze (digidietze) wrote :

OK. Annother try.

"0x05c6:0x1000". One USB ID, many different devices. Cellphones and wireless modems.

The wireless modems usually need a special treatment to be usable at all; the treatment is different for each brand, some inside the USB specs, some not. The cellphones generally don't need any treatment.

Details at http://www.draisberghof.de/usb_modeswitch

Now, Ubuntu 9.10 has "/lib/udev/rules.d/61-option-modem-modeswitch.rules" where a device with said USB ID gets a special treatment for ONE of the various modems:

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

This confused annother device with that ID which recently popped up and needs a completely different treatment ("Vertex Wireless 100").

Bottom line is that a tool for the treatment (mode switching) of these various devices should be able to recognize them properly and not just check the USB ID. In case of an unrecognized device there should be no action.

That is what USB_ModeSwitch is able to do since version 1.0.3. In Karmic/Universe is an old version (1.0.2). The current version is 1.0.6 and treats over 150 different modem models, in the ideal case without any user interaction.

Modem-modeswitch was derived from USB_ModeSwitch but doesn't have the "fine filter" ability as of now.

I suggest using USB_ModeSwitch instead of Modem-Modeswitch to solve many problems in one go.

Josua Dietze (digidietze) wrote :

Somebody tell me what else I should provide.

Changed in udev (Ubuntu):
status: Incomplete → New
Martin Pitt (pitti) wrote :

Current maverick udev has dropped modem-modeswitch, it got replaced with the more modern and maintained usb-modeswitch. Please check if it works now (Ubuntu 10.10 beta will be released in two weeks, which is a good opportunity to test a live CD). If it still happens, please file a bug against usb-modeswitch. Thanks!

Changed in udev (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers