I've now ruled out kernel module usb_storage as the cause of the problem
and have found that usb_modeswitch is failing to read device information
even though lsusb shows me that the relevant information is available.
I'm not familiar with device naming, but I can't see how
/sys/bus/usb/devices/7-1:1.0 relates to the information I can get from
lsusb.  In particular lsusb refers to 'Bus 007 Device 004' while
usb_modeswitch has been passed '7-1:1.0' by udev.  Am I naïve in
expecting to see a '4' somewhere in the parameter passed by udev?

I removed usb-storage.ko (by renaming it to out of the  kernel directory
tree), rebooted and tested both dongles.  The K3520-Z behaved as before,
i.e. it failed to switch modes.  The K-3770 still worked, but checking
udev debug output in syslog revealed that its mode was now being
switched by usb_modeswitch rather than by the kernel module usb_storage.

My next step was to enable debug output in usb_modeswitch.  It produced
the following:

USB_ModeSwitch log from Fri May 10 17:48:11 2013

Using global config file: /etc/usb_modeswitch.conf

Raw args from udev: 7-1:1.0/7-1:1.0

Using top device dir /sys/bus/usb/devices/7-1:1.0

USB dir exists: /sys/bus/usb/devices/7-1:1.0
Warning: USB attribute "idVendor" not readable.
Warning: USB attribute "idProduct" not readable.
Warning: USB attribute "manufacturer" not readable.
Warning: USB attribute "product" not readable.
Warning: USB attribute "serial" not readable.
Warning: USB attribute "bNumConfigurations" not readable.
Warning: USB attribute "bConfigurationValue" not readable.
Warning: USB attribute "devnum" not readable.
Warning: USB attribute "busnum" not readable.

SCSI dir exists: /sys/bus/usb/devices/7-1:1.0
Warning: SCSI attribute "vendor" not readable.
Warning: SCSI attribute "model" not readable.
Warning: SCSI attribute "rev" not readable.
USB IDs not found in sysfs tree. Exiting.

So, basically usb_modeswitch (I think it's actually
usb_modeswitch_dispatcher but I could be wrong)  is failing to get any
information about the device and hence can't look the device up in the
usb_modeswitch_data tarball to find out the actions necessary to switch
the mode.

The following is the output from lsusb --verbose -d 19d2:2000 and shows
that the information that usb_modeswitch can't read is in fact
available:

Bus 007 Device 004: ID 19d2:2000 ZTE WCDMA Technologies MSM 
MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  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           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus 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     0x89  EP 9 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x09  EP 9 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1175093

Title:
  K3520-Z mode not switched automatically

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1175093/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to