Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
deniz
Posts: 2
Joined: 05 Dec 2012, 11:05

usb_modeswitch kernel 3.5.3 problem

Post by deniz » 05 Dec 2012, 11:21

Hi;

After I upgraded from kernel 2.6.18 to 3.5.3 modeswitch started not to work for me. Although lsusb shows my usb modem, usb_modeswitch does not switch it. My system information is like below. I ran lsusb, dmesg, usb-devices and usb_modeswitch their output is like below. usb_modeswitch instead of switching my modem it says "No devices in default mode found. Nothing to do. Bye.". Can you offer a solution?


Kernel: Linux 3.5.3
usb_modeswitch: 1.2.3-1
usb_modeswitch-data: 20120120-1
usbutils: 006-1
libusb: 1.0.8-0.1



root@localhost# lsusb
Bus 002 Device 029: ID 12d1:1446 Huawei Technologies Co., Ltd.



root@localhost# dmesg
[70112.477080] usb 2-1.4: new high-speed USB device number 30 using ehci_hcd
[70112.567757] scsi49 : usb-storage 2-1.4:1.0
[70112.567842] scsi50 : usb-storage 2-1.4:1.1
[70113.571433] scsi 49:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[70113.572304] scsi 50:0:0:0: Direct-Access HUAWEI TF CARD Storage PQ: 0 ANSI: 2
[70113.574169] sr0: scsi-1 drive
[70113.574223] sr 49:0:0:0: Attached scsi CD-ROM sr0
[70113.574250] sr 49:0:0:0: Attached scsi generic sg1 type 5
[70113.574350] sd 50:0:0:0: Attached scsi generic sg2 type 0
[70113.577173] sd 50:0:0:0: [sdb] Attached SCSI removable disk



root@localhost# usb-devices
T: Bus=02 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#= 30 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=12d1 ProdID=1446 Rev=00.00
S: Manufacturer=Huawei Technologies
S: Product=HUAWEI Mobile
C: #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I: If#= 1 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage



root@localhost# cat /etc/usb_modeswitch.d/12d1\:1446
# Huawei, newer modems

TargetVendor= 0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"

MessageContent="55534243123456780000000000000011062000000100000000000000000000"



root@localhost# usb_modeswitch -c /etc/usb_modeswitch.d/12d1:1446 -v 12d1 -p 1446 -W

* 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= 0x1446
TargetVendor= 0x12d1
TargetProduct= not set
TargetClass= not set
TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

InquireDevice enabled (default)
Success check disabled
System integration mode disabled


usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_busses: Skipping non bus directory drivers
usb_os_find_busses: Skipping non bus directory uevent
usb_os_find_busses: Skipping non bus directory drivers_probe
usb_os_find_busses: Skipping non bus directory drivers_autoprobe
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
No devices in default mode found. Nothing to do. Bye.

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

Re: usb_modeswitch kernel 3.5.3 problem

Post by Josh » 05 Dec 2012, 20:32

I can only assume that there is a problem with libusb ...

Can you check if "lsusb" is linked to the same libusb version as usb_modeswitch ?

You can use the "ldd" command for that.

deniz
Posts: 2
Joined: 05 Dec 2012, 11:05

Re: usb_modeswitch kernel 3.5.3 problem

Post by deniz » 11 Dec 2012, 13:41

I doubt that becuase in my Ubuntu machine it works. Its info is like below.
Kernel: 3.2.0-30-generic
usb_modeswitch: 1.2.3
lsusb (usbutils): 005

root@ubuntu# ldd /usr/bin/lsusb
linux-vdso.so.1 => (0x00007fff11fff000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f67dbb31000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f67db91a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f67db55c000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f67db354000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f67db137000)
/lib64/ld-linux-x86-64.so.2 (0x00007f67dbd56000)

root@ubuntu# ldd /usr/sbin/usb_modeswitch
linux-vdso.so.1 => (0x00007fffe20b3000)
libusb-0.1.so.4 => /lib/x86_64-linux-gnu/libusb-0.1.so.4 (0x00007fe4f7c0a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe4f784d000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe4f7e29000

root@ubuntu# ls -l /lib/x86_64-linux-gnu/|grep usb
lrwxrwxrwx 1 root root 19 Sep 14 14:42 libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
-rw-r--r-- 1 root root 30808 Jan 8 2012 libusb-0.1.so.4.4.4
lrwxrwxrwx 1 root root 19 Sep 14 14:42 libusb-1.0.so.0 -> libusb-1.0.so.0.1.0
-rw-r--r-- 1 root root 59776 Apr 19 2012 libusb-1.0.so.0.1.0


CentOS ldd output:

root@localhost# ldd /usr/bin/lsusb
linux-gate.so.1 => (0xb7768000)
libusb-1.0.so.0 => /usr/lib/libusb-1.0.so.0 (0x477c5000)
libz.so.1 => /usr/lib/libz.so.1 (0x004c6000)
libc.so.6 => /lib/libc.so.6 (0x0031e000)
librt.so.1 => /lib/librt.so.1 (0x0053d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00480000)
/lib/ld-linux.so.2 (0x002fa000)

root@localhost# ldd /usr/sbin/usb_modeswitch
linux-gate.so.1 => (0xb77ca000)
libusb-0.1.so.4 => /usr/lib/libusb-0.1.so.4 (0x477c5000)
libc.so.6 => /lib/libc.so.6 (0x0031e000)
/lib/ld-linux.so.2 (0x002fa000)

root@localhost# ls -l /usr/lib/|grep usb
lrwxrwxrwx 1 root root 19 Dec 4 15:52 libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
-rwxr-xr-x 1 root root 32916 Feb 23 2012 libusb-0.1.so.4.4.4
lrwxrwxrwx 1 root root 19 Dec 4 17:17 libusb-1.0.so.0 -> libusb-1.0.so.0.0.0
-rwxr-xr-x 1 root root 50496 Dec 7 2011 libusb-1.0.so.0.0.0
lrwxrwxrwx 1 root root 21 Dec 4 15:52 libusbpp-0.1.so.4 -> libusbpp-0.1.so.4.4.4
-rwxr-xr-x 1 root root 19688 Feb 23 2012 libusbpp-0.1.so.4.4.4


On my Ubuntu it works like a charm and as you see libraries have same versions. On the other hand my CentOS machine having same versions cannot run usb_modeswitch correctly. My udev is a bit old in CentOS machine, do you think that can be a problem?(Its version is 095)

Post Reply