I could really use some help from the experts here, I have been working with a Huawei K5160 (first time using a Huawei modem) with CentOS7. I have been reading through the forums here regarding this modem and I am running into an issue that I haven't seen discussed. Perhaps my expectations are misplaced.
I am trying to put the K5160 into cdc_mbim mode so my software can interact with the modem. When I have the cdc_mbim kernel modules running the mode switch appears to work fine but no interface is created in linux. I am expecting to see a new interface available for use after the mode switch. Is this correct?
When I remove the cdc_mbim module it properly puts the modem into cdc_ether and an interface is created as expected. This setup however won't work for me as I need to speak to the modem in mbim. Below is the dmesg, lsusb, and mode switch info. I would greatly appreciate any help or guidance!
dmesg:
[ 0.914938] usbcore: registered new interface driver usbfs
[ 0.921115] usbcore: registered new interface driver hub
[ 0.927147] usbcore: registered new device driver usb
[ 2.697949] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.705554] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.713640] usb usb1: Product: EHCI Host Controller
[ 2.719103] usb usb1: Manufacturer: Linux 3.19.2-ovn-rev2 ehci_hcd
[ 2.726021] usb usb1: SerialNumber: 0000:00:16.0
[ 2.760326] usbcore: registered new interface driver usbserial
[ 2.766886] usbcore: registered new interface driver usbserial_generic
[ 2.774217] usbserial: USB Serial support registered for generic
[ 3.873245] usbcore: registered new interface driver usbhid
[ 3.879488] usbhid: USB HID core driver
[ 4.040434] usb 1-1: new high-speed USB device number 2 using ehci-pci
[ 4.154772] usb 1-1: New USB device found, idVendor=8087, idProduct=07db
[ 4.162283] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 4.460496] usb 1-1.1: new full-speed USB device number 3 using ehci-pci
[ 4.557788] usb 1-1.1: New USB device found, idVendor=067b, idProduct=2303
[ 4.565510] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4.573722] usb 1-1.1: Product: USB-Serial Controller D
[ 4.579593] usb 1-1.1: Manufacturer: Prolific Technology Inc.
[ 4.659531] usb 1-1.2: new high-speed USB device number 4 using ehci-pci
[ 4.755015] usb 1-1.2: New USB device found, idVendor=12d1, idProduct=1f1e
[ 4.762728] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4.770936] usb 1-1.2: Product: Vodafone (Huawei)
[ 4.776226] usb 1-1.2: Manufacturer: Vodafone (Huawei)
[ 4.782000] usb 1-1.2: SerialNumber: 0123456789ABCDEF
[ 4.872908] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[ 4.880681] scsi host0: usb-storage 1-1.2:1.0
[ 4.919588] usbcore: registered new interface driver usb-storage
[ 10.847566] usbcore: registered new interface driver cdc_wdm
[ 10.950506] usbcore: registered new interface driver cdc_ncm
[ 10.979349] usbcore: registered new interface driver cdc_mbim
[ 11.509968] usbcore: registered new interface driver pl2303
[ 11.510005] usbserial: USB Serial support registered for pl2303
[ 11.528995] usb 1-1.1: pl2303 converter now attached to ttyUSB0
[ 1091.690391] usbcore: registered new interface driver option
[ 1091.691672] usbserial: USB Serial support registered for GSM modem (1-port)
lsusb:
Code: Select all
Bus 001 Device 004: ID 12d1:1f1e Huawei Technologies Co., Ltd.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
idVendor 0x12d1 Huawei Technologies Co., Ltd.
idProduct 0x1f1e
bcdDevice 1.02
iManufacturer 1 Vodafone (Huawei)
iProduct 2 Vodafone (Huawei)
iSerial 3 0123456789ABCDEF
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 4 Mass Storage
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 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 118
bNumInterfaces 3
bConfigurationValue 2
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 2mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 14
bFunctionProtocol 0
iFunction 8 K5160
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 14
bInterfaceProtocol 0
iInterface 5 NCM Network Control Model
CDC Header:
bcdCDC 1.10
CDC MBIM:
bcdMBIMVersion 1.00
wMaxControlMessage 1024
bNumberFilters 32
bMaxFilterSize 128
wMaxSegmentSize 1500
bmNetworkCapabilities 0x20
8-byte ntb input size
UNRECOGNIZED CDC: 08 24 1c 00 01 10 dc 05
CDC Union:
bMasterInterface 0
bSlaveInterface 1
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 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 2
iInterface 6 CDC Network Data
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 2
iInterface 6 CDC Network 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 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 4 Mass Storage
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 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 1
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 22
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000f
Device can operate at Low Speed (1Mbps)
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 1 micro seconds
bU2DevExitLat 500 micro seconds
Device Status: 0x0001
Self Powered
usb_modeswitch -I -W -v 12d1 -p 1f1e -J
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.5.0 (C) Josua Dietze 2017
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x1f1e
HuaweiNewMode=1
Look for default devices ...
found USB ID 12d1:1f1e
vendor ID matched
product ID matched
found USB ID 067b:2303
found USB ID 8087:07db
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 004 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: Vodafone (Huawei)
Product: Vodafone (Huawei)
Serial No.: 0123456789ABCDEF
-------------------------
Using standard Huawei switching message
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!
Thanks!
-Adam