Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
aleksander0m
Posts: 8
Joined: 11 Nov 2015, 21:50

USB configuration selection for HP lt4120

Post by aleksander0m » 10 Jan 2017, 18:24

Hey hey,

The HP lt4120 is an LTE module (vid 0x03f0, pid 0x9d1d) that comes with 3 different USB configurations: USB configuration 1 seems to be a set of QMI and TTYs; USB configuration 2 is ECM; and USB configuration 3 is MBIM.

By default the kernel switches to the ECM configuration, but unless the modem has been configured for auto-connect, that should not work out of the box. I believe the obvious choice is to switch the device to USB configuration #3, i.e. MBIM. I personally prefer MBIM over QMI because we can anyway run all QMI commands with "QMI over MBIM" (e.g. with qmicli --device-open-mbim ...)

I've tested the simple patch requesting "Configuration 3" for 03f0:9d1d and it worked correctly, directly doing the USB conf switch after the kernel started it in ECM mode:

Code: Select all

[ +14,033541] usb 4-1.5.3: new high-speed USB device number 48 using ehci-pci
[  +0,144992] cdc_ether 4-1.5.3:2.0 usb0: register 'cdc_ether' at usb-0000:00:1d.0-1.5.3, CDC Ethernet Device, 5a:d6:97:8a:30:dd
[  +0,067498] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[  +0,000136] cdc_ether 4-1.5.3:2.0 usb0: kevent 12 may have been dropped
[  +0,000006] cdc_ether 4-1.5.3:2.0 usb0: kevent 12 may have been dropped
[  +0,004680] cdc_ether 4-1.5.3:2.0 usb0: kevent 12 may have been dropped
[  +0,566153] cdc_ether 4-1.5.3:2.0 usb0: unregister 'cdc_ether' usb-0000:00:1d.0-1.5.3, CDC Ethernet Device
[  +0,162715] cdc_mbim 4-1.5.3:3.0: cdc-wdm2: USB WDM device
[  +0,000339] cdc_mbim 4-1.5.3:3.0 wwan0: register 'cdc_mbim' at usb-0000:00:1d.0-1.5.3, CDC MBIM, 2e:5c:ba:2b:67:18

Full lsusb here:

Code: Select all

$ sudo lsusb -v -d 03f0:9d1d

Bus 004 Device 030: ID 03f0:9d1d Hewlett-Packard 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x03f0 Hewlett-Packard
  idProduct          0x9d1d 
  bcdDevice            2.28
  iManufacturer           1 HP
  iProduct                2 HP lt4120 Snapdragon X5 LTE
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      3
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          209
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              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
      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
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        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     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        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     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        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     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x89  EP 9 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        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     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           80
    bNumInterfaces          2
    bConfigurationValue     2
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0 
      iInterface              6 CDC Ethernet Control Model (ECM)
      CDC Header:
        bcdCDC               1.10
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      CDC Ethernet:
        iMacAddress                      8 620DCD51F50E
        bmEthernetStatistics    0x00000000
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0000
        bNumberPowerFilters              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              7 CDC Ethernet Data
      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
      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
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          111
    bNumInterfaces          3
    bConfigurationValue     3
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass      14 
      bFunctionProtocol       0 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass     14 
      bInterfaceProtocol      0 
      iInterface              9 HP lt4120 Snapdragon X5 LTE
      CDC Header:
        bcdCDC               1.10
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      CDC MBIM:
        bcdMBIMVersion       1.00
        wMaxControlMessage   4096
        bNumberFilters       32
        bMaxFilterSize       128
        wMaxSegmentSize      2048
        bmNetworkCapabilities 0x20
          8-byte ntb input size
      CDC MBIM Extended:
        bcdMBIMExtendedVersion           1.00
        bMaxOutstandingCommandMessages     64
        wMTU                             1500
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      2 
      iInterface             10 MBIM Data
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      2 
      iInterface             10 MBIM Data
      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
      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
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               9
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      3
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: USB configuration selection for HP lt4120

Post by Josh » 10 Jan 2017, 20:27

Hmm, usb_modeswitch is supposed to check for the presence of the MBIM kernel driver, and then determine which configuration to choose. It seems this is not working in the intended way with your setup.

Can you create a usb_modeswitch log as indicated in /etc/usb_modeswitch.conf ?

aleksander0m
Posts: 8
Joined: 11 Nov 2015, 21:50

Re: USB configuration selection for HP lt4120

Post by aleksander0m » 11 Jan 2017, 13:17

Josh wrote:Can you create a usb_modeswitch log as indicated in /etc/usb_modeswitch.conf ?
Here it is:

Code: Select all

$ cat /var/log/usb_modeswitch_4-1.5.3 

USB_ModeSwitch log from Wed Jan 11 12:15:12 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 02.

----------------
USB values from sysfs:
  manufacturer	HP
  product	HP lt4120 Snapdragon X5 LTE
  serial	0123456789ABCDEF
----------------
ConfigList: /usr/share/usb_modeswitch/03f0:9d1d
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/03f0:9d1d
! matched. Read config data
Device may have an MBIM configuration, check driver ...
 driver for MBIM devices is available
Find MBIM configuration number ...
Unbinding driver
Command to be run:
usb_modeswitch -W -D  -b 4 -g 58 -v 03f0 -p 9d1d -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=  0x03f0
DefaultProduct= 0x9d1d
Configuration=0x03
System integration mode enabled

Use given bus/device number: 004/058 ...
Look for default devices ...
 bus/device number matched
  found USB ID 03f0:9d1d
   vendor ID matched
   product ID matched
Get the current device configuration ...
   device configuration 2 not matching target
   count device
 Found devices in default mode (1)
Get the current device configuration ...
Current configuration number is 2
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: HP
     Product: HP lt4120 Snapdragon X5 LTE
  Serial No.: 0123456789ABCDEF
-------------------------
Change configuration to 3 ...
 OK, configuration set
Get the current device configuration ...
The configuration was set successfully
ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
 Read attributes ...
 All attributes matched
Mode switching was successful, found 03f0:9d1d (HP: HP lt4120 Snapdragon X5 LTE)
Logger is /usr/bin/logger
Check for AVOID_RESET_QUIRK kernel attribute
 AVOID_RESET_QUIRK activated

All done, exit

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: USB configuration selection for HP lt4120

Post by LOM » 11 Jan 2017, 14:24

03f0:9d1d is pending for being added to the next usb_modeswitch datapackage and with the same config as the currently supported 03f0:9a1d, that is "Configuration=0".

This is a dummy config (not being issued by usb_modeswitch) which will keep the current config unless there are cdc_mbim drivers in the system in which case the config with cdc_mbim will be selected.


Please make a config file and an udev rule and test that it behaves as expected.

aleksander0m
Posts: 8
Joined: 11 Nov 2015, 21:50

Re: USB configuration selection for HP lt4120

Post by aleksander0m » 11 Jan 2017, 14:38

LOM wrote:03f0:9d1d is pending for being added to the next usb_modeswitch datapackage and with the same config as the currently supported 03f0:9a1d, that is "Configuration=0".

This is a dummy config (not being issued by usb_modeswitch) which will keep the current config unless there are cdc_mbim drivers in the system in which case the config with cdc_mbim will be selected.


Please make a config file and an udev rule and test that it behaves as expected.
It does work as expected, but now that I realize, as soon as I setup the usb_modeswitch configuration file for 03f0:9d1d, it will always end up switching to MBIM, regardless of what I have in the configuration file... E.g. if I have "Configuration 2" (to keep ECM mode) or "Configuration 1" (to switch to QMI mode) it still does switch to MBIM in configuration #3 anyway. Is that expected? even an empty file ends up triggering the switch to MBIM.

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: USB configuration selection for HP lt4120

Post by LOM » 11 Jan 2017, 14:52

aleksander0m wrote:
It does work as expected, but now that I realize, as soon as I setup the usb_modeswitch configuration file for 03f0:9d1d, it will always end up switching to MBIM, regardless of what I have in the configuration file... E.g. if I have "Configuration 2" (to keep ECM mode) or "Configuration 1" (to switch to QMI mode) it still does switch to MBIM in configuration #3 anyway. Is that expected? even an empty file ends up triggering the switch to MBIM.
You can disable the automatic switching into the mbim config in the global usb_modeswitch.conf file but automatic switching into the mbim config is on by default and it is so because mbim is the preferred protocol if there are protocol choices.

usb_modeswitch should not select config 1 or 2 as default because different users has different preferences.
There are also lots of modules with either 2 or 3 configs depending on loaded firmware version so selecting a certain config will have different meaning for such modules.
So usb_modeswitch keeps whatever config linux has set as default and changes config only if there is an mbim config and there are mbim drivers in the system.

aleksander0m
Posts: 8
Joined: 11 Nov 2015, 21:50

Re: USB configuration selection for HP lt4120

Post by aleksander0m » 11 Jan 2017, 15:14

LOM wrote: usb_modeswitch should not select config 1 or 2 as default because different users has different preferences.
There are also lots of modules with either 2 or 3 configs depending on loaded firmware version so selecting a certain config will have different meaning for such modules.
So usb_modeswitch keeps whatever config linux has set as default and changes config only if there is an mbim config and there are mbim drivers in the system.
Understood; and I actually agree 100% with the default behavior, now that I know how it goes :)

Any target date to have a new usb modeswitch data release?

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: USB configuration selection for HP lt4120

Post by LOM » 11 Jan 2017, 16:58

aleksander0m wrote:
Any target date to have a new usb modeswitch data release?
Real Soon Now 8)
I will send Josh a list of devices to add within the next few days so a new data package can be available at the same time as he releases the new program package.

silbum
Posts: 1
Joined: 31 May 2019, 18:34

Re: USB configuration selection for HP lt4120

Post by silbum » 31 May 2019, 19:08

I am using arch linux and if I remember correctly this device worked out-of-the-box. I don't know what has changed, but now it is no longer working. I am using usb_modeswitch 2.5.2.

Code: Select all

$ cat /usr/share/usb_modeswitch/03f0\:9d1d 
# HP lt4120
Configuration=0

Code: Select all

$ cat /var/log/usb_modeswitch_1-3 

USB_ModeSwitch log from Fri May 31 18:52:55 CEST 2019

Use global config file: /etc/usb_modeswitch.conf
Raw parameters: --switch-mode 1-3
Use top device dir /sys/bus/usb/devices/1-3
Check class of first interface ...
 Interface 0 class is ff.

----------------
USB values from sysfs:
  manufacturer	HP
  product	HP lt4120 Snapdragon X5 LTE
  serial	0123456789ABCDEF
----------------
bNumConfigurations is 1 - don't check for active configuration
ConfigList: /usr/share/usb_modeswitch/03f0:9d1d
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/03f0:9d1d
! matched. Read config data
Config file contains dummy method, do nothing. Exit

Code: Select all

$ lsusb -v -d 03f0:9d1d

Bus 001 Device 002: ID 03f0:9d1d HP, Inc 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x03f0 HP, Inc
  idProduct          0x9d1d 
  bcdDevice            2.28
  iManufacturer           1 HP
  iProduct                2 HP lt4120 Snapdragon X5 LTE
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x00fa
    bNumInterfaces          6
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              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
      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
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0 
      iInterface              6 CDC Ethernet Control Model (ECM)
      CDC Header:
        bcdCDC               1.10
      CDC Union:
        bMasterInterface        1
        bSlaveInterface         2 
      CDC Ethernet:
        iMacAddress                      8 XXXXXXXXXXXX
        bmEthernetStatistics    0x00000000
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0000
        bNumberPowerFilters              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              7 CDC Ethernet Data
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        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     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        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     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        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     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        5
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x89  EP 9 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        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     0x05  EP 5 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          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
Any ideas? Thanks!

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: USB configuration selection for HP lt4120

Post by Josh » 31 May 2019, 21:46

The "dummy" switching method is used for devices which don't really do a classic mode-switch (returning with a different ID) but for devices which just need a configuration change. That's actually the documented and clean way for a USB device to expose more than one setup.

Now, the HP devices are supposed to provide - among others - an MBIM setup ("configuration") which is the preferred way to use high-speed modems nowadays. usb_modeswitch checks for this and sets the respective configuration.

However, your's doesn't even have more than one configuration so there is indeed nothing to do for usb_modeswitch.

Code: Select all

...
  bNumConfigurations      1
...
If that modem has worked before, then it was certainly not due to usb_modeswitch. If I were you, I'd study the last lines of the output from the "dmesg" command right after connecting the modem. There might be an issue with the MBIM driver. It should bind to the device right away.

Post Reply