Huawei E173s-1 can not switch on embeded linux
Posted: 01 Sep 2012, 13:41
hello guys.
I was trying to make a Huawei E173s-1 modem work on embeded linux these days.
I have tested it on windows 7 and fedora 16, it works well.
my kernel version: 2.6.34
the usb_modeswitch version:
the command "lsusb" is not configured with the busybox I used, so I print the file /proc/bus/usb/devices.
plug in the modem first time , the print is :
the file /proc/bus/usb/devices:
the data file I use is from "usb-modeswitch-data-20120531".
the content is:
print after input usb_modeswitch:
it seemed the switch not finished, and the modem was recognized once more, and the idProduct changed from 0x1c0b to 0x1c05.
And now the content of file /proc/bus/usb/devices is:
I tried to add one line in "linux-kernel/drivers/usb/stoarge/unusual_devs.h",
and add the corresponding lines in "linux-kernel/drivers/usr/serial/option.c", it did not work either.
Can any body help me ? thanks in advance.
I was trying to make a Huawei E173s-1 modem work on embeded linux these days.
I have tested it on windows 7 and fedora 16, it works well.
my kernel version: 2.6.34
Code: Select all
#uname -a
Linux 2.6.34 #3 SMP Sat Sep 1 14:41:51 CST 2012 armv7l GNU/Linux
Code: Select all
#usb_modeswitch --version
* 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 !plug in the modem first time , the print is :
Code: Select all
usb 2-1: new high speed USB device using usb-ip9028 and address 2
usb 2-1: New USB device found, idVendor=12d1, idProduct=1c0b
usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 2-1: Product: HUAWEI Mobile
usb 2-1: Manufacturer: HUAWEI
scsi2 : usb-storage 2-1:1.0
scsi3 : usb-storage 2-1:1.1
scsi 2:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 3:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
scsi 2:0:0:0: Attached scsi generic sg0 type 5
sd 3:0:0:0: Attached scsi generic sg1 type 0
sd 3:0:0:0: [sda] Attached SCSI removable disk
Code: Select all
#cat /proc/bus/usb/devices
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=12d1 ProdID=1c0b Rev= 1.02
S: Manufacturer=HUAWEI
S: Product=HUAWEI Mobile
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8f(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=0e(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0msthe content is:
Code: Select all
# Huawei E173s
TargetVendor= 0x12d1
TargetProductList="1c05,1c07,1c08"
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
Code: Select all
usb_modeswitch -v12d1 -p1c0b -c /etc/usb_modeswitch.d/12d1_1c0
b -s --verbos
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 002 on bus 002 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x0f (out) and 0x8f (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" detached
SCSI inquiry data (for identification)
-------------------------
Vendor Strusb 2-1: usbfs: process 822 (usb_modeswitch) did not claim interface 0 before use
ing: HUAWEI
Model String: Mass Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
------------------------usb 2-1: USB disconnect, address 2
-
Manufacturer: HUAWEI
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Setting up communication with interface 0
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
OK, message successfully sent
Resetting response endpoint 0x8f
Could not reset endpoint (probably harmless): -6
Resetting message endpoint 0x0f
Could not reset endpoint (probably harmless): -6
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
[root@H006.root]#usb 2-1: new high speed USB device using usb-ip9028 and address 3
usb 2-1: New USB device found, idVendor=12d1, idProduct=1c05
usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 2-1: Product: HUAWEI Mobile
usb 2-1: Manufacturer: HUAWEI
scsi4 : usb-storage 2-1:1.3
scsi5 : usb-storage 2-1:1.4
scsi 4:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 5:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
scsi 4:0:0:0: Attached scsi generic sg0 type 5
sd 5:0:0:0: Attached scsi generic sg1 type 0
sd 5:0:0:0: [sda] Attached SCSI removable disk
And now the content of file /proc/bus/usb/devices is:
Code: Select all
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=12d1 ProdID=1c05 Rev= 1.02
S: Manufacturer=HUAWEI
S: Product=HUAWEI Mobile
C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=8f(I) Atr=03(Int.) MxPS= 64 Ivl=2ms
E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=0e(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=0d(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Code: Select all
UNUSUAL_DEV( 0x12d1, 0x1c0b, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),
Can any body help me ? thanks in advance.