Page 1 of 1

Huawei ET302 (vid=12d1 , pid=1d50)

Posted: 21 Sep 2011, 04:42
by zhouqiqiu1982
I have a 3G modem named ET302, when I plug in and use cmd:

#usb_modeswitch -I -d -v 12d1 -p 1d50 -W -u 3 &

I see the /proc/bus/usb/device:
# cat /proc/bus/usb/devices

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 2.06
S: Manufacturer=Linux 2.6.31--LSDK-9.2.0.312 ehci_hcd
S: Product=ATH EHCI
S: SerialNumber=platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 3
P: Vendor=12d1 ProdID=1d50 Rev= 1.00
S: Manufacturer=HUAWEI Mobile
S: Product=HUAWEI Mobile System Solution
S: SerialNumber=000000-00-0000000
C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
C: #Ifs= 6 Cfg#= 2 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=08 Prot=00 Driver=
I: If#= 1 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0a Prot=00 Driver=
I: If#= 2 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 3 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 4 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
C:* #Ifs= 8 Cfg#= 3 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=08 Prot=00 Driver=(none)
I:* If#= 1 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=(none)
I:* If#= 2 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=(none)
I:* If#= 3 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=(none)
I:* If#= 4 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0a Prot=00 Driver=(none)
I:* If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 5 Alt= 2 #EPs= 2 Cls=0a(data ) Sub=00 Prot=ee Driver=(none)
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0a Prot=81 Driver=(none)
I:* If#= 7 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms


It has 3 configurations, and I select the third configuration as the activce one, but when I insmod the cdc_acm.ko, it fails.
is the cdc_acm device driver not support the multiple configuration? my kernel is 2.6.31

Posted: 21 Sep 2011, 08:37
by Josh
Configuration 3 is probably intended to be used with Huawei's proprietary driver.

Try configuration 1, it looks like it will work with cdc_acm.


Posted: 21 Sep 2011, 10:23
by zhouqiqiu1982
Josh wrote:Configuration 3 is probably intended to be used with Huawei's proprietary driver.

Try configuration 1, it looks like it will work with cdc_acm.
OK, I try take configuration 1, as follow:
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 3
P: Vendor=12d1 ProdID=1d50 Rev= 1.00
S: Manufacturer=HUAWEI Mobile
S: Product=HUAWEI Mobile System Solution
S: SerialNumber=000000-00-0000000
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
C: #Ifs= 6 Cfg#= 2 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=08 Prot=00 Driver=
I: If#= 1 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0a Prot=00 Driver=
I: If#= 2 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 3 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 4 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
C: #Ifs= 8 Cfg#= 3 Atr=a0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=08 Prot=00 Driver=
I: If#= 1 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 2 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 3 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 4 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0a Prot=00 Driver=
I: If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=
I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 5 Alt= 2 #EPs= 2 Cls=0a(data ) Sub=00 Prot=ee Driver=
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 6 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0a Prot=81 Driver=
I: If#= 7 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

the Interface of configuration 1 is storage, not comm, so it can not to be attached with the cdc_acm.ko.

Posted: 21 Sep 2011, 21:31
by Josh
Oops, my bad, got the wrong line; it seems that config 2 is the one. It seems to have a cdc_acm port at the first interfaces. No guarantee though.

The cdc_acm module should load automatically; it's not a very good sign if it doesn't. Maybe a newer kernel can help?


Posted: 11 Nov 2011, 12:02
by zhouqiqiu1982
Josh wrote:Oops, my bad, got the wrong line; it seems that config 2 is the one. It seems to have a cdc_acm port at the first interfaces. No guarantee though.

The cdc_acm module should load automatically; it's not a very good sign if it doesn't. Maybe a newer kernel can help?
Hi, I found it use the another sub class of CDC driver:
I: If#= 0 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=08 Prot=00 Driver=
I: If#= 1 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 2 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 3 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=09 Prot=01 Driver=
I: If#= 4 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0a Prot=00 Driver=

and I read the cdc.h:
#define USB_CDC_SUBCLASS_WHCM 0x08
#define USB_CDC_SUBCLASS_DMM 0x09
#define USB_CDC_SUBCLASS_MDLM 0x0a

may be this device use another driver but not cdc_acm.
But I can not find what driver this device use?

Posted: 11 Nov 2011, 15:40
by Josh
CDC may also work with "cdc_ether". Some modems are using this.

I don't know anything about this driver, though. Google may be your friend there.