I created /usr/share/usb_modeswitch/12d1:1f11
Code: Select all
# Vodafone Mobile Broadband (Huawei) K3773
DefaultVendor= 0x12d1
DefaultProduct= 0x1f11
TargetVendor= 0x12d1
TargetProduct= 0x14bc
MessageContent="555342437f0000000002000080000a11062000000000000100000000000000"
Code: Select all
# Vodafone Mobile Broadband (Huawei) K3773
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f11", RUN+="usb_modeswitch '%b/%k'"
Some diagnostic data:
Before modeswitch
Code: Select all
bash# lsusb -v -d 12d1:1f11
Bus 002 Device 057: ID 12d1:1f11 Huawei Technologies Co., Ltd.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x12d1 Huawei Technologies Co., Ltd.
idProduct 0x1f11
bcdDevice 1.02
iManufacturer 2 Vodafone (Huawei)
iProduct 1 Vodafone Mobile Broadband (Huawei)
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
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)
Code: Select all
bash# usb_modeswitch -b2 -W -v 12d1 -p 1f11 -n --message-content 555342437f0000000002000080000a11062000000000000100000000000000
Taking all parameters from the command line
* 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= 0x12d1
DefaultProduct= 0x1f11
TargetVendor= not set
TargetProduct= not set
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="555342437f0000000002000080000a11062000000000000100000000000000"
NeedResponse=1
ResponseEndpoint= not set
InquireDevice enabled (default)
Success check disabled
System integration mode disabled
Looking for default devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 08ff:2580
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 03f0:171d
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 12d1:1f11
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 04e8:6640
searching devices, found USB ID 413c:2011
searching devices, found USB ID 413c:1005
searching devices, found USB ID 0461:4d51
searching devices, found USB ID 0424:2412
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 1d6b:0002
Found device in default mode, class or configuration (1)
Accessing device 057 on bus 002 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
SCSI inquiry data (for identification)
-------------------------
Vendor String: Vodafone
Model String: Storage(Huawei)
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: Vodafone (Huawei)
Product: Vodafone Mobile Broadband (Huawei)
Serial No.: not provided
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reading the response to message 1 (CSW) ...
Device seems to have vanished after reading. Good.
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
After successful modeswitch:
Code: Select all
bash$ lsusb -v -d 12d1:14bc
Bus 002 Device 058: ID 12d1:14bc Huawei Technologies Co., Ltd.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x12d1 Huawei Technologies Co., Ltd.
idProduct 0x14bc
bcdDevice 1.02
iManufacturer 2 Vodafone (Huawei)
iProduct 1 Vodafone Mobile Broadband (Huawei)
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 71
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 6 Ethernet Networking
bInterfaceProtocol 0
iInterface 0
CDC Header:
bcdCDC 1.10
CDC Ethernet:
iMacAddress 3 582C80139263
bmEthernetStatistics 0x0000000f
wMaxSegmentSize 2048
wNumberMCFilters 0x0003
bNumberPowerFilters 1
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 6
bInterfaceProtocol 0
iInterface 0
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 32
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 32
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)