I added some entries in my udev-rules
(taken from your newest data-set)
/lib/udev/rules.d/40-usb_modeswitch.rules
Code: Select all
# Huawei EC156
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1505", RUN+="usb_modeswitch '%b/%k'" /etc/usb_modeswitch.d/12d1:1505
I added the DefaultVendor and DefaultProdukt. Without, it did not work.
Code: Select all
# Huawei EC156
DefaultVendor= 0x12d1
DefaultProduct= 0x1505
TargetVendor= 0x12d1
TargetProductList="140b,1506,150f"
MessageContent="55534243123456780000000000000011062000000100000000000000000000"The result is:
USB_ModeSwitch log from Thu Apr 12 17:07:48 CEST 2012
raw args from udev: /1-3:1.0
Using global config file: /etc/usb_modeswitch.conf
Bus ID for device not given by udev.
Trying to determine it from kernel name (1-3:1.0) ...
USB dir exists: /sys/bus/usb/devices/1-3
Warning: USB attribute "serial" not found.
----------------
USB values from sysfs:
manufacturer Huawei Technologies
product HUAWEI Mobile
serial
----------------
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/12d1:1505
ConfigGet returns /etc/usb_modeswitch.d/12d1:1505
! matched, now switching
(running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/12d1:1505)
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are expected in the process)
--------------------------------
Reading config file: /etc/usb_modeswitch.d/12d1:1505
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.6 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x1505
TargetVendor= 0x12d1
TargetProduct= not set
TargetClass= not set
TargetProductList="140b,1506,150f"
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00
InquireDevice disabled
Success check disabled
System integration mode enabled
Looking for target devices ...
searching devices, found USB ID 12d1:1505
found matching vendor ID
searching devices, found USB ID 0951:1606
searching devices, found USB ID eb1a:2761
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 12d1:1505
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 0951:1606
searching devices, found USB ID eb1a:2761
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
Found devices in default mode, class or configuration (1)
Accessing device 006 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: Huawei Technologies
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached
Setting up communication with interface 0 ...
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
libusb:error [op_clear_halt] clear_halt failed error -1 errno 71
OK, message successfully sent
Resetting response endpoint 0x81
Error resetting endpoint: -34
Resetting message endpoint 0x01
Error resetting endpoint: -6
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
--------------------------------
(end of usb_modeswitch output)
All done, exiting
The only thing, that is still ugly. the device manager at the kde-gui pops up twice.
Regards,
Thomas