|
Automatic Activation, Hotplug and UDEV, Configuration
-
cu1kev
- Posts: 6
- Joined: 06 May 2014, 10:52
Post
by cu1kev » 06 May 2014, 11:19
Good day! I have a problem with the above modem.
The operating system does not see the modem maybe because usb-modeswitch not
automatically switches the device mode the modem.
I think the reason - no udev rules for this modem in /lib/udev/rules.d or
/etc/udev/rules.d.
lsusb:
Code: Select all Bus 001 Device 007: ID 12d1:15e7 Huawei Technologies Co., Ltd.
I have a few on hand Alt Linux 7 distributions and Ubuntu 14.04, there is still a bug report with the same problem here.
Please help to solve the problem situation.
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 06 May 2014, 12:35
Thanks for the heads up and the link to the initial bug report, this is a new usb id not reported here before.
It will be included in the May update of the usbmodeswitch data package.
Can you please paste the output from lsusb -v -d 12d1:15e7 in your next post?
What usb id does it switch to after:
Code: Select all sudo usb_modeswitch -W -I -v 12d1 -p 15e7 -M 55534243123456780000000000000011062000000101000100000000000000
Please also paste an lsusb -v -d for the new id.
-
cu1kev
- Posts: 6
- Joined: 06 May 2014, 10:52
Post
by cu1kev » 06 May 2014, 14:32
You're welcome. Here's output:
Code: Select all lsusb -v -d 12d1:15e7
Bus 003 Device 002: ID 12d1:15e7 Huawei Technologies Co., Ltd.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
idVendor 0x12d1 Huawei Technologies Co., Ltd.
idProduct 0x15e7
bcdDevice 1.02
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 4
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
tr@lp:~$
Code: Select all tr@lp:~$ sudo usb_modeswitch -W -I -v 12d1 -p 15e7 -M 55534243123456780000000000000011062000000101000100000000000000
[sudo] password for tr:
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x15e7
MessageContent="55534243123456780000000000000011062000000101000100000000000000"
NeedResponse=0
InquireDevice=1
Look for default devices ...
found USB ID 2232:1028
found USB ID 0bda:0129
found USB ID 1d6b:0002
found USB ID 046d:c52e
found USB ID 1d6b:0001
found USB ID 1d6b:0003
found USB ID 12d1:15e7
vendor ID matched
product ID matched
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 002 on bus 003
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
Inquire device details; driver will be detached ...
Looking for active driver ...
OK, driver detached
But with the third command did not understand that it is necessary to insert ((
the output is
Code: Select all tr@lp:~$ lsusb -v -d
lsusb: option requires an argument -- 'd'
Usage: lsusb [options]...
List USB devices
-v, --verbose
Increase verbosity (show descriptors)
-s [[bus]:][devnum]
Show only devices with specified device and/or
bus numbers (in decimal)
-d vendor:[product]
Show only devices with the specified vendor and
product ID numbers (in hexadecimal)
-D device
Selects which device lsusb will examine
-t, --tree
Dump the physical USB device hierarchy as a tree
-V, --version
Show version of program
-h, --help
Show usage and help
tr@lp:~$
I'm sorry, I do not know how to hide listings
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 06 May 2014, 15:19
Your usbmodeswitch log is not complete, there should be more info in the end of it.
Something like:
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reset response endpoint 0x81
Reset message endpoint 0x01
Device is gone, skip any further commands
the last line there indicating that the dongle has switched mode and now has a new usb id.
You can see what the new id is by entering the command:
sudo lsusb
and look for a 12d1:xxxx id where xxxx is the new pid.
then
sudo lsusb -v -d 12d1:xxxx
-
cu1kev
- Posts: 6
- Joined: 06 May 2014, 10:52
Post
by cu1kev » 06 May 2014, 15:50
LOM wrote:Your usbmodeswitch log is not complete, there should be more info in the end of it.
yes, corrects
Code: Select all tr@lp:~$ sudo usb_modeswitch -W -I -v 12d1 -p 15e7 -M 55534243123456780000000000000011062000000101000100000000000000
[sudo] password for tr:
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x15e7
MessageContent="55534243123456780000000000000011062000000101000100000000000000"
NeedResponse=0
InquireDevice=1
Look for default devices ...
found USB ID 2232:1028
found USB ID 0bda:0129
found USB ID 1d6b:0002
found USB ID 046d:c52e
found USB ID 1d6b:0001
found USB ID 1d6b:0003
found USB ID 12d1:15e7
vendor ID matched
product ID matched
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 004 on bus 003
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
Inquire device details; driver will be detached ...
Looking for active driver ...
OK, driver detached
SCSI inquiry data (for identification)
-------------------------
Vendor String:
Model String: Mass Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: ......
Product: Mobile Connect
Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!
tr@lp:~$
Code: Select all tr@lp:~$ sudo lsusb
Bus 001 Device 006: ID 2232:1028
Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 046d:c52e Logitech, Inc.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 12d1:15e7 Huawei Technologies Co., Ltd.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
tr@lp:~$
tr@lp:~$ sudo lsusb -v -d 12d1:15e7
Bus 003 Device 004: ID 12d1:15e7 Huawei Technologies Co., Ltd.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
idVendor 0x12d1 Huawei Technologies Co., Ltd.
idProduct 0x15e7
bcdDevice 1.02
iManufacturer 1 ......
iProduct 2 Mobile Connect
iSerial 3 FFFFFFFFFFFFFFFF
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 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
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
tr@lp:~$
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 06 May 2014, 16:02
Hmm.. It didn't switch to modem mode, it should had done so and not be hanging on to 12d1:15e7 which is the windows install mode virtual cdrom.
Any difference if you remove the -I from the usb_modeswitch command line?
What hardware are you using and what type of usb controller? Is it a Raspberry Pi?
-
cu1kev
- Posts: 6
- Joined: 06 May 2014, 10:52
Post
by cu1kev » 06 May 2014, 16:20
LOM wrote:
Any difference if you remove the -I from the usb_modeswitch command line?
this question, I did not understand (
LOM wrote:
What hardware are you using and what type of usb controller? Is it a Raspberry Pi?
samsung laptop 355V5X-S01 ( description only in Russian)
usb 3.0 controller type (he was in it), there are usb 2.0 (can check in usb 2.0)
Last edited by cu1kev on 06 May 2014, 16:33, edited 1 time in total.
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 06 May 2014, 16:33
yes please try on usb 2.0 port.
-
cu1kev
- Posts: 6
- Joined: 06 May 2014, 10:52
Post
by cu1kev » 06 May 2014, 16:47
LOM wrote:yes please try on usb 2.0 port.
seems something happened
Code: Select all tr@lp:~$ lsusb -v -d 12d1:15e7
Bus 001 Device 005: ID 12d1:15e7 Huawei Technologies Co., Ltd.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
idVendor 0x12d1 Huawei Technologies Co., Ltd.
idProduct 0x15e7
bcdDevice 1.02
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 4
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
Code: Select all tr@lp:~$ sudo usb_modeswitch -W -I -v 12d1 -p 15e7 -M 55534243123456780000000000000011062000000101000100000000000000
[sudo] password for tr:
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x15e7
MessageContent="55534243123456780000000000000011062000000101000100000000000000"
NeedResponse=0
InquireDevice=1
Look for default devices ...
found USB ID 2232:1028
found USB ID 0bda:0129
found USB ID 12d1:15e7
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 1d6b:0001
found USB ID 1d6b:0003
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 005 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
Inquire device details; driver will be detached ...
Looking for active driver ...
OK, driver detached
SCSI inquiry data (for identification)
-------------------------
Vendor String:
Model String: Mass Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: ......
Product: Mobile Connect
Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!
[code]
tr@lp:~$ sudo lsusb
Bus 001 Device 004: ID 2232:1028
Bus 001 Device 002: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 006: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
tr@lp:~$ sudo lsusb -v -d 12d1:1506
Bus 001 Device 006: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
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 0x1506 E398 LTE/UMTS/GSM Modem/Networkcard
bcdDevice 1.02
iManufacturer 1 ......
iProduct 2 Mobile Connect
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 225
bNumInterfaces 6
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 97
iInterface 0
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 04 24 02 02
** UNRECOGNIZED: 05 24 01 00 00
** UNRECOGNIZED: 05 24 06 00 00
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 5
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 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 118
iInterface 8 CDC Network Control Model (NCM)
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 06 24 1a 00 01 1f
** UNRECOGNIZED: 0d 24 0f 0a 0f 00 00 00 ea 05 03 00 01
** UNRECOGNIZED: 05 24 06 01 01
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 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 118
iInterface 9 CDC Network Data
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 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 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 99
iInterface 0
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 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 98
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 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
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
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 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 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 5
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 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x07 EP 7 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
tr@lp:~$
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 06 May 2014, 17:21
Yes, now it switched as it should do.
There are problems with the usb 3.0 xhci driver in linux and it is being workd on by linux kernel developers.
You can maybe get the dongle to work on a usb 3.0 port if you edit the file /etc/usb_modeswitch.conf and change the last line in the file from
#SetStorageDelay=4
to
SetStorageDelay=4
you can also increase the delay if needed but more than 6 should not be needed.
To make the mode switching automatic you will have to create a device config file in the /usr/share usb_modeswitch directory with the filename 12d1:15e7 and with the following content:
# Huawei E3531
TargetVendor=0x12d1
TargetProduct=0x1506
MessageContent="55534243123456780000000000000011062000000101000100000000000000"
you also need to create a udev rule for 12d1:15e7 in /lib/udev/rules.d/40-usb_modeswitch.rules so that usb_modeswitch will be called when you plug in the dongle to the usb port:
# Huawei E3531
ATTR{idVendor}=="12d1", ATTR{idProduct}=="15e7", RUN+="usb_modeswitch '%b/%k'"
-
cu1kev
- Posts: 6
- Joined: 06 May 2014, 10:52
Post
by cu1kev » 06 May 2014, 18:26
Thank you, we will wait for support.
...
P.S. So on usb 2.0 will it work? I understand that the update will come in May, and the modem will work out of the box already (no need to do so much manipulation)?
-
universe
- Posts: 9
- Joined: 19 Apr 2016, 15:28
Post
by universe » 19 Apr 2016, 15:41
Hello all,
I have a Huawei E3531i-2 After plugged in a Raspberry pi I got the device Id ID 12d1:1f01, so I went through procedure to switch it to usb 3G,
But after installing the usb_modeswitch the new device id is ID 12d1:14dc I vainly tried both codes I found on this page
55534243123456780000000000000a11062000000000000100000000000000
55534243123456780000000000000011062000000101000100000000000000
here the log for both keys
Code: Select all sudo usb_modeswitch -W -I -v 12d1 -p 14dc -M 55534243123456780000000000000011062000000101000100000000000000
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= 0x14dc
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="55534243123456780000000000000011062000000101000100000000000000"
NeedResponse=0
ResponseEndpoint= not set
InquireDevice disabled
Success check disabled
System integration mode disabled
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_devices: Found 023 on 001
usb_os_find_devices: Found 022 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 021 on 001
skipped 1 class/vendor specific interface descriptors
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 020 on 001
skipped 3 class/vendor specific interface descriptors
usb_os_find_devices: Found 019 on 001
usb_os_find_devices: Found 003 on 001
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
Looking for default devices ...
searching devices, found USB ID 067b:2303
searching devices, found USB ID 093a:2510
searching devices, found USB ID 1c4f:0002
searching devices, found USB ID 12d1:14dc
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 1a40:0101
searching devices, found USB ID 0424:ec00
searching devices, found USB ID 0424:9512
searching devices, found USB ID 1d6b:0002
Found device in default mode, class or configuration (1)
Accessing device 020 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Error: message endpoint not given or found. Aborting.
Could someone give me a hint how to calculate the code based on the device Id,
Thanks a lot
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 19 Apr 2016, 17:57
There is no 'conversion' between the ID and the switching code. You can't 'choose' an ID.
There are three known main variants of switching 'code' for Huawei modems. However, the ID after mode-switching is determined by the stick firmware alone.
Code: Select all 1. MessageContent="55534243123456780600000080000601000000000000000000000000000000"
2. MessageContent="55534243123456780000000000000011062000000100010100000000000000"
3. MessageContent="55534243123456780000000000000011063000000100010000000000000000"
1. is the "Windows" mode
2. is the "Linux" mode, which is not always serial/PPP but also ethernet-like or "qmi".
3. is the "Fallback" mode which provides serial/PPP ports - only on not-so-current models though.
In your case, I imagine you're looking for no. 3 ...
-
universe
- Posts: 9
- Joined: 19 Apr 2016, 15:28
Post
by universe » 19 Apr 2016, 18:29
Thanks for your reply,
The last gives me this output
Code: Select all sudo usb_modeswitch -W -I -v 12d1 -p 14dc -M 55534243123456780000000000000011063000000100010000000000000000
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= 0x14dc
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="55534243123456780000000000000011063000000100010000000000000000"
NeedResponse=0
ResponseEndpoint= not set
InquireDevice disabled
Success check disabled
System integration mode disabled
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_devices: Found 065 on 001
usb_os_find_devices: Found 064 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 063 on 001
skipped 1 class/vendor specific interface descriptors
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 062 on 001
usb_os_find_devices: Found 003 on 001
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
Looking for default devices ...
searching devices, found USB ID 067b:2303
searching devices, found USB ID 093a:2510
searching devices, found USB ID 1c4f:0002
searching devices, found USB ID 1a40:0101
searching devices, found USB ID 0424:ec00
searching devices, found USB ID 0424:9512
searching devices, found USB ID 1d6b:0002
No devices in default mode found. Nothing to do. Bye.
And what I found "strange" is the output of lsusb
Code: Select all sudo lsusb
Bus 001 Device 076: ID 12d1:1f01 Huawei Technologies Co., Ltd.
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 19 Apr 2016, 22:00
You can't mode-switch 12d1:14dc - it is already switched !!
You have to issue the command to the unswitched device, while it has the ID 12d1:1f01.
Mode-switching is only possible one way: you always have to start from the freshly plugged device, appearing as a storage device.
|
|