Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
ginggs
Posts: 2
Joined: 28 May 2011, 09:44

Vodafone K4605 (Huawei)

Post by ginggs » 28 May 2011, 10:31

I have usb-modeswitch-data package (2011-02-27) but when I insert a Vodafone K4605 (Huawei) device it does not switch from storage to modem mode.

Looking in /lib/udev/rules.d/40-usb_modeswitch.rules I found

Code: Select all

# Vodafone (Huawei) K4605
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14c1", RUN+="usb_modeswitch '%b/%k'"
...but

Code: Select all

$ lsusb | grep Huawei
Bus 001 Device 013: ID 12d1:14c6 Huawei Technologies Co., Ltd.
So I added the following line to /lib/udev/rules.d/40-usb_modeswitch.rules

Code: Select all

# Vodafone (Huawei) K4605 v2
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14c6", RUN+="usb_modeswitch '%b/%k'"
...and now the modem correctly switches modes when inserted.

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

Post by Josh » 28 May 2011, 11:55

Are you sure that "14c6" was not switched already? It's a known target ID.

If in doubt, switch on logging as described on the main doc page, paragraph "Troubleshooting".

ginggs
Posts: 2
Joined: 28 May 2011, 09:44

Post by ginggs » 28 May 2011, 14:58

Josh wrote:Are you sure that "14c6" was not switched already? It's a known target ID.
You are absolutely correct. :oops:

For some reason the option driver did not load and I had to manually run 'modprobe -r usb-storage' followed by 'modprobe option' before being able to use the modem.
I had just upgraded from Ubuntu 10.04 to 10.10 to 11.04, one of the reasons being to get the latest usb-modeswitch-data package in the hopes of making my new K4605 work.

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

Post by Josh » 28 May 2011, 15:59

In some rare cases (and if the device is not known to the "option" driver yet") the "post-install" of the driver by usb_modeswitch will only work after the first plug of the device. So you may have to plug again to see the driver activated.

It's not your fault :)


dchard
Posts: 7
Joined: 24 May 2010, 11:01

K4605

Post by dchard » 05 Jun 2011, 18:07

Just for the record:

K4605 is produced by Huawei and branded for Vodafone. Huawei sells this modem under name E372. The two device are firmware compatible (shares the very same hardware).

Capabilities:

Chipset: MDM 8220
DL: Dual Carrier HSPA+ 42Mbit/s (28mbit/s with 16QAM+MIMO, 21Mbit/s with 64QAM)
UL: HSUPA 5.76Mbit/s (HSUPA 11Mbit/s will be available through later firmware upgrade)
USB 2.0
microSD slot
Reciever diversity (class 3)
External antenna connector (for MIMO only!)
http://www.huaweidevice.com/worldwide/p ... treeId=462

Dchard

system32
Posts: 1
Joined: 08 Jun 2011, 20:17

Re: K4605

Post by system32 » 08 Jun 2011, 21:05

Just to add, I also experienced the same problem - I'm using OpenWrt Backfire 10.03.1-rc4.
The /etc/usb_modeswitch.d/12d1:14c1 for Vodafone E4605/E372 contains:
DefaultVendor= 0x12d1
DefaultProduct=0x14c1

TargetVendor= 0x12d1
TargetProduct= 0x146c

When switching, the TargetProduct is not found:

Start with a poweroff/on:

Code: Select all

root@OpenWrt:~# 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.32.25 ehci_hcd
S:  Product=Atheros AR91xx built-in EHCI controller
S:  SerialNumber=ar71xx-ehci
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=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=14c1 Rev= 0.00
S:  Manufacturer=Vodafone Group (Huawei)
S:  Product=Vodafone Mobile Broadband (Huawei)
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
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) 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=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

root@OpenWrt:~# usb_modeswitch -c /etc/usb_modeswitch.d/12d1:14c1

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found devices in default mode or class (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: Vodafone
   Model String: CD ROM (Huawei)
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: Vodafone Group (Huawei)
     Product: Vodafone Mobile Broadband (Huawei)
  Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01

Checking for mode switch (max. 20 times, once per second) ...
 Waiting for original device to vanish ...
 Original device can't be accessed anymore. Good.
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 No new devices in target mode or class found

Mode switch has failed. Bye.
usb_modeswitch gives an error, but the device is switched.
usb_modeswitch is looking for "TargetProduct=0x14c6"

Changing /etc/usb_modeswitch.d/12d1:14c1 to:
TargetVendor= 0x12d1
TargetProduct= 0x14ac
#TargetProduct= 0x14c6
fixes the problem.

After a poweroff/on:

Code: Select all

root@OpenWrt:~# usb_modeswitch -c /etc/usb_modeswitch.d/12d1:14c1

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found devices in default mode or class (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: Vodafone
   Model String: CD ROM (Huawei)
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: Vodafone Group (Huawei)
     Product: Vodafone Mobile Broadband (Huawei)
  Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01

Checking for mode switch (max. 20 times, once per second) ...
 Waiting for original device to vanish ...
 Original device can't be accessed anymore. Good.
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Found correct target device

Mode switch succeeded. Bye.

root@OpenWrt:~# 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.32.25 ehci_hcd
S:  Product=Atheros AR91xx built-in EHCI controller
S:  SerialNumber=ar71xx-ehci
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#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=14ac Rev= 0.00
S:  Manufacturer=Vodafone Group (Huawei)
S:  Product=Vodafone Mobile Broadband (Huawei)
C:* #Ifs= 6 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbserial_generic
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbserial_generic
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Hope this helps.

Post Reply