Author Message

<  Everything Coding  ~  Unexpected unbind for Option HSO modems

PostPosted: Wed Jan 11, 2017 1:26 pm Reply with quote
Posts: 8 Joined: Wed Nov 11, 2015 9:50 pm
Hey,

Since some time ago dcbw and me have a couple of Option modems that no longer work properly in ModemManager, because it seems that usb_modeswitch unbinds them from the hso driver and they never get re-bound again.

Manually doing "rmmod hso && modprobe hso" makes the hso0 network interface be exposed again.

usb_modeswitch log:
Code:
$ cat /var/log/usb_modeswitch_4-1.5.3

USB_ModeSwitch log from Wed Jan 11 12:19:20 CET 2017

Use global config file: /etc/usb_modeswitch.conf

Started via systemd
Raw args from udev: _4-1.5.3

Use top device dir /sys/bus/usb/devices/4-1.5.3
Check class of first interface ...
 Interface 0 class is ff.

----------------
USB values from sysfs:
  manufacturer   Option N.V.
  product   Globetrotter HSDPA Modem
  serial   Serial Number
----------------
bNumConfigurations is 1 - don't check for active configuration
ConfigList: /usr/share/usb_modeswitch/0af0:6971
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/0af0:6971
! matched. Read config data
Unbinding driver
Command to be run:
usb_modeswitch -W -D -u -1 -b 4 -g 60 -v 0af0 -p 6971 -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.4.0 (C) Josua Dietze 2016
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x0af0
DefaultProduct= 0x6971
TargetClass=    0xff
OptionMode=1
System integration mode enabled

Use given bus/device number: 004/060 ...
Look for default devices ...
 bus/device number matched
  found USB ID 0af0:6971
   vendor ID matched
   product ID matched
   target class ff matches
   device not counted, target class reached
 No devices in default mode found. Nothing to do. Bye!

--------------------------------
(end of usb_modeswitch output)


Core program reported switching failure. Exit


This is the full lsusb of the modem:
Code:
$ lsusb -v -d 0af0:6971

Bus 004 Device 062: ID 0af0:6971 Option Globetrotter HSDPA Modem
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass       255 Vendor Specific Subclass
  bDeviceProtocol       255 Vendor Specific Protocol
  bMaxPacketSize0        64
  idVendor           0x0af0 Option
  idProduct          0x6971 Globetrotter HSDPA Modem
  bcdDevice            0.00
  iManufacturer           1
  iProduct                2
  iSerial                 4
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           95
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              3
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 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     0x03  EP 3 OUT
        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     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval             128
        INTERFACE CLASS:  03 24 03
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              3
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 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     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              3
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval             128
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 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     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0


Offline
PostPosted: Wed Jan 11, 2017 2:37 pm Reply with quote
Posts: 1157 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
0af0:6971 is the id for a device with a single interface (virtual cd-rom storage) but the same id is also used for the switched device.
usb_modeswitch detects that your device is already switched so it skips switching, the problem is that the driver should not had been unloaded for a skipped device. It is indeed a bug!

Code:
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0af0 ProdID=6971 Rev= 0.00
S: Manufacturer=Option N.V.
S: Product=Globetrotter HSDPA Modem
S: SerialNumber=Serial Number
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms


Offline
PostPosted: Wed Jan 11, 2017 6:58 pm Reply with quote
Site Admin Posts: 6366 Joined: Sat Nov 03, 2007 12:30 am
Ouch!

Needs fixing. Thanks for the report!


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
3 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron