udev + usb_modeswitch fails if modem is on USB 3

Bug #1094973 reported by Raul Dias
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
usb-modeswitch (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

If I plug my modem on a USB 3 instead of a USB 2 it fails to do the switch.

It will work fine if I:
  1 - extract /usr/share/usb_modeswitch/configPack.tar.gz from usb-modeswitch-data to /etc/usb_modeswitch.d/
  2 - run the command:
           sudo usb_modeswitch -v 19d2 -p 2000 -s 10 -I -c /etc/usb_modeswitch.d/19d2\:2000

(btw: why are these configs tared in -data?!?)

If I plug directly on a USB 2 udev works out of the box.

12.10 64bits - 3.5.0-21-generic
On a Dell XPS L502X.

lspci -vv attached, more info below.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: usb-modeswitch 1.2.3+repack0-1ubuntu3
ProcVersionSignature: Ubuntu 3.5.0-21.32-generic 3.5.7.1
Uname: Linux 3.5.0-21-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.6.1-0ubuntu9
Architecture: amd64
Date: Mon Dec 31 23:33:00 2012
InstallationDate: Installed on 2012-12-26 (5 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
SourcePackage: usb-modeswitch
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Raul Dias (rsd) wrote :
Revision history for this message
Raul Dias (rsd) wrote :

This is the kernel log on a USB 3:

usb 3-2: new high-speed USB device number 21 using xhci_hcd
usb 3-2: New USB device found, idVendor=19d2, idProduct=2000
usb 3-2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
usb 3-2: Product: ONDA CDMA Technologies MSM
usb 3-2: Manufacturer: ONDA,Incorporated
usb 3-2: SerialNumber: 1234567890ABCDEF
usb 3-2: ep 0x1 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 3-2: ep 0x81 - rounding interval to 32768 microframes, ep desc says 0 microframes
scsi47 : usb-storage 3-2:1.0
scsi 47:0:0:0: CD-ROM ONDA USB SCSI CD-ROM USB PQ: 0 ANSI: 2
sr1: scsi-1 drive
sr 47:0:0:0: Attached scsi CD-ROM sr1
sr 47:0:0:0: Attached scsi generic sg2 type 5

And this is on a USB2:

usb 2-1.2: new high-speed USB device number 19 using ehci_hcd
usb 2-1.2: New USB device found, idVendor=19d2, idProduct=2000
usb 2-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
usb 2-1.2: Product: ONDA CDMA Technologies MSM
usb 2-1.2: Manufacturer: ONDA,Incorporated
usb 2-1.2: SerialNumber: 1234567890ABCDEF
scsi44 : usb-storage 2-1.2:1.0
scsi 44:0:0:0: CD-ROM ONDA USB SCSI CD-ROM USB PQ: 0 ANSI: 2
sr1: scsi-1 drive
sr 44:0:0:0: Attached scsi CD-ROM sr1
sr 44:0:0:0: Attached scsi generic sg2 type 5

Revision history for this message
Raul Dias (rsd) wrote :
Download full text (8.4 KiB)

This is the lsusb -v for the modem on the USB3 before usb_modeswitch:

-------------------------------------- >8 -------------------------------
Bus 003 Device 021: ID 19d2:2000 ZTE WCDMA Technologies MSM MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x19d2 ZTE WCDMA Technologies MSM
  idProduct 0x2000 MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
  bcdDevice 0.00
  iManufacturer 3 ONDA,Incorporated
  iProduct 2 ONDA CDMA Technologies MSM
  iSerial 4 1234567890ABCDEF
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 32
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 1 ZTE Configuration
    bmAttributes 0xe0
      Self Powered
      Remote Wakeup
    MaxPower 500mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 8 Mass Storage
      bInterfaceSubClass 6 SCSI
      bInterfaceProtocol 80 Bulk-Only
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
Device Qualifier (for other device speed):
  bLength 10
  bDescriptorType 6
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  bNumConfigurations 1
Device Status: 0x0000
  (Bus Powered)
------------------------- 8< ------------------------------

This is the output after modemswitch (sucessfully):

-------------------------------------- >8 -------------------------------
Bus 003 Device 026: ID 19d2:0037 ZTE WCDMA Technologies MSM
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x19d2 ZTE WCDMA Technologies MSM
  idProduct 0x0037
  bcdDevice 0.00
  iManufacturer 3 ONDA,Incorporated
  iProduct 2 ONDA CDMA Technologies MSM
  iSerial 4 1234567890ABCDEF
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 108
    bNumInterfaces 4
    bConfigurationValue 1
    iConfiguration 1 ZTE Config...

Read more...

Revision history for this message
Raul Dias (rsd) wrote :
Download full text (14.0 KiB)

This is the usb_modeswitch output on the USB 3:

$ sudo usb_modeswitch -v 19d2 -p 2000 -s 10 -I -c /etc/usb_modemswitch.d/19d2\:2000 -W

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.3 (C) Josua Dietze 2012
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x19d2
DefaultProduct= 0x2000
TargetVendor= 0x19d2
TargetProduct= not set
TargetClass= not set
TargetProductList="0001,0002,0015,0016,0017,0031,0037,0052,0055,0063,0064,0066,0091,0108,0117,0128,0157,1402,2002,2003"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=1
ResponseEndpoint= not set

InquireDevice disabled
Success check enabled, max. wait time 10 seconds
System integration mode disabled

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 025 on 003
usb_os_find_devices: Found 002 on 003
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 003
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 004 on 002
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xFF
skipping descriptor 0xB
skipped 2 class/vendor specific endpoint descriptors
skipped 7 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 28 class/vendor specific interface descriptors
skipped 2 class/vendor specific interface descriptors
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 045e:074f
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8086:0189
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 0408:2fb1
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 045e:074f
  searching devices, found U...

Revision history for this message
Raul Dias (rsd) wrote :
Download full text (8.5 KiB)

This are the lsbusb on the USB 2 before and after udev/usb_modeswitch:

Bus 002 Device 019: ID 19d2:2000 ZTE WCDMA Technologies MSM MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x19d2 ZTE WCDMA Technologies MSM
  idProduct 0x2000 MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
  bcdDevice 0.00
  iManufacturer 3 ONDA,Incorporated
  iProduct 2 ONDA CDMA Technologies MSM
  iSerial 4 1234567890ABCDEF
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 32
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 1 ZTE Configuration
    bmAttributes 0xe0
      Self Powered
      Remote Wakeup
    MaxPower 500mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 8 Mass Storage
      bInterfaceSubClass 6 SCSI
      bInterfaceProtocol 80 Bulk-Only
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
Device Qualifier (for other device speed):
  bLength 10
  bDescriptorType 6
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  bNumConfigurations 1
Device Status: 0x0000
  (Bus Powered)

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

Bus 002 Device 020: ID 19d2:0037 ZTE WCDMA Technologies MSM
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x19d2 ZTE WCDMA Technologies MSM
  idProduct 0x0037
  bcdDevice 0.00
  iManufacturer 3 ONDA,Incorporated
  iProduct 2 ONDA CDMA Technologies MSM
  iSerial 4 1234567890ABCDEF
  bNumConfigurations 1
  Configuration Descriptor:...

Read more...

Revision history for this message
Raul Dias (rsd) wrote :
Download full text (14.7 KiB)

Finally, this is the same usb_modeswitch, but now on the USB2 (without udev, for comparison):

* usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.3 (C) Josua Dietze 2012
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x19d2
DefaultProduct= 0x2000
TargetVendor= 0x19d2
TargetProduct= not set
TargetClass= not set
TargetProductList="0001,0002,0015,0016,0017,0031,0037,0052,0055,0063,0064,0066,0091,0108,0117,0128,0157,1402,2002,2003"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=1
ResponseEndpoint= not set

InquireDevice disabled
Success check enabled, max. wait time 10 seconds
System integration mode disabled

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 002 on 003
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 003
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 019 on 002
usb_os_find_devices: Found 004 on 002
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xFF
skipping descriptor 0xB
skipped 2 class/vendor specific endpoint descriptors
skipped 7 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 28 class/vendor specific interface descriptors
skipped 2 class/vendor specific interface descriptors
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 045e:074f
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 8086:0189
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 0408:2fb1
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 045e:074f
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found ...

Revision history for this message
Raul Dias (rsd) wrote :

This is a dup of 979697

using
options usb-storage delay_use=3

solves the problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in usb-modeswitch (Ubuntu):
status: New → Confirmed
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.