Author Message

<  Setup Discussion  ~  Vodafone K3772 and Ubuntu 12.04

PostPosted: Sun Nov 04, 2012 1:00 pm Reply with quote
Posts: 3Joined: Sun Nov 04, 2012 12:33 pm
(I apologise in advance if this has already been asked and answered but the search facility just says "you cannot search at this time". Also I am a Linux mostly newbie so please can you try to answer as if you were speaking to a moron as from what I was able to look at most of what you say is in a foriegn language.)

Ok that said , I have the above 3g modem and I am trying to connect it to Ubuntu 12.04 with gnome shell. What I have been able to accertain with the help of the kind folks at Ubuntuforums is that lsusb gives me:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 12d1:1526 Huawei Technologies Co., Ltd.
Bus 001 Device 003: ID 13d3:5711 IMC Networks

and part of the report from usb-devices shows this:


T: Bus=01 Lev=01 Prnt=01 Port=01 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=1526 Rev=01.02
S: Manufacturer=Vodafone (Huawei)
S: Product=Vodafone Mobile Broadband (Huawei)
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

which apparently says it is not switching and they referred me to you guys. So can you help get it working? Please.

Julian


Offline Profile
PostPosted: Sun Nov 04, 2012 2:52 pm Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
You have come to the right place, so much for a start 8)

The modem that you describe is not in the 'database' yet. I will add it to the next data package release of usb_modeswitch, but it may take a while to arrive at the various Linux distributions.

Fortunately, you can make it work right away by following the guidelines below. I assume you know how to edit a text file, but mind that you have to do it with superuser rights in this case because you will alter some system files (no need to worry though).

1. Create a new file named "12d1:1526" in the folder "/etc/usb_modeswitch.d" and fill it with this content:
Code:
# Vodafone K3772 (Huawei)

TargetVendor=  0x19d2
#TargetProduct= not known yet

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

2. Duplicate one of the existing Huawei lines in "/lib/udev/rules.d/40-usb_modeswitch.rules" and edit the new line to reflect the product ID of your device (... ATTRS{idProduct}=="1526" ...). It's easy, just look at the other lines.

3. Now, plug your modem in and wait at least 10 seconds. After this run the "lsusb" command in a terminal program. There should be a device ID starting with "12d1" but most likely different than "12d1:1526". The changed part of the ID (after the colon) is your new "TargetProduct" value (prepended by "0x").
Edit your config file accordingly, removing the comment sign (hash) at the start of the TargetProduct line.

4. Unplug the modem and plug again. Wait ... (Huawei modems need up to 10 seconds for the mode switch.)
Run "dmesg" in a terminal program and you should see something like "GSM modem (1-port) converter now attached to ttyUSBx". This means that your modem is ready to use.

Important: please tell me the TargetProduct value once you found out. I need it for the data package.
If you want you can give me your name (or any nickname of your choice) via PM or mail, and I'll include you as the contributor of this device in the reference file.


Offline Profile
PostPosted: Wed Nov 07, 2012 10:32 pm Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
Did you have any success with switching the modes?

I need to know that target ID.


Offline Profile
PostPosted: Fri Nov 09, 2012 10:19 pm Reply with quote
Posts: 3Joined: Sun Nov 04, 2012 12:33 pm
Josh wrote:
Did you have any success with switching the modes?

I need to know that target ID.


Sorry Josh, I don't get a chance to work on the (home) computer during monday to thursday. I will try the fix tomorrow - 10th - and report back.

Julian


Offline Profile
PostPosted: Sat Nov 10, 2012 2:32 pm Reply with quote
Posts: 3Joined: Sun Nov 04, 2012 12:33 pm
Hi Josh,

I have followed your instructions and now get the following in dmesg:

[ 2247.413376] usb 1-2: USB disconnect, device number 6
[ 2255.548097] usb 1-2: new high-speed USB device number 7 using ehci_hcd
[ 2255.683270] option 1-2:1.0: GSM modem (1-port) converter detected
[ 2255.683729] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 2255.684628] option 1-2:1.2: GSM modem (1-port) converter detected
[ 2255.685017] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 2255.685352] option 1-2:1.3: GSM modem (1-port) converter detected
[ 2255.685688] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2

which I hope means all is well. (and sure enough in edit network connections vodaphone (huawei) now shows as a device in add mobile broadband)

lsusb now shows:

Bus 001 Device 007: ID 12d1:14cf Huawei Technologies Co., Ltd.

I assume this is the code you wanted.

Thank you very very much for this. As for adding me as a contributor; don't bother about that, I am ancient enough not to need to see my name in lights.

Julian


Offline Profile
PostPosted: Sat Dec 01, 2012 11:19 pm Reply with quote
Posts: 1Joined: Sat Dec 01, 2012 11:13 pm
Hello,

I'm trying to go through the same process as the OP, but after creating the file in /etc/usb_modeswitch.d the USB seems to still be identifying as a CD-ROM in dmesg when I connect it. It does look like the device is getting the switched id though. Any guidance would be appreciated.

Code:
evan@walker:~$ more /etc/usb_modeswitch.d/12d1\:1526
# Vodafone K3772 (Huawei)

TargetVendor=  0x19d2
TargetProduct= 0x14cf

MessageContent="55534243123456780000000000000011062000000100000000000000000000"
evan@walker:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 008: ID 12d1:14cf Huawei Technologies Co., Ltd.


And this is what dmesg is saying

Code:
[85381.462379] usb 1-1.2: new high-speed USB device number 8 using ehci_hcd
[85381.558208] scsi12 : usb-storage 1-1.2:1.4
[85382.558880] scsi 12:0:0:0: CD-ROM            Vodafone CD ROM (Huawei)  2.31 PQ: 0 ANSI: 2
[85382.561602] sr1: scsi-1 drive
[85382.561909] sr 12:0:0:0: Attached scsi CD-ROM sr1
[85382.562071] sr 12:0:0:0: Attached scsi generic sg2 type 5


Thanks

Edit: Formatting

Edit2: This stuff

Code:
evan@walker:~$ tail -6 /lib/udev/rules.d/40-usb_modeswitch.rules
# Exiss Mobile E-190 series (made by C-motech)
ATTRS{idVendor}=="8888", ATTRS{idProduct}=="6500", RUN+="usb_modeswitch '%b/%k'"

ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1526", RUN+="usb_modeswitch '%b/%k'"

LABEL="modeswitch_rules_end"


Offline Profile
PostPosted: Sun Dec 02, 2012 1:34 pm Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
Post output from lsusb -v -d 12d1:14cf


Offline Profile
PostPosted: Wed Dec 05, 2012 4:29 pm Reply with quote
Posts: 2Joined: Mon Dec 03, 2012 11:34 pm
I too have been trying to set up a vodafone (huawei) k3772 modem and have got as far as changing from 12d1:1526 to 12d1:14cf by following the clear instructions in this thread. However, like the previous poster it still appears as a storage device. The output from lsusb -v -d 12d1:14cf is very long but the following bit might be relevant.
Code:
 bInterfaceSubClass 2 bInterfaceProtocol 70 iInterface 0 ** UNRECOGNIZED: 05 24 00 10 01 ** UNRECOGNIZED: 06 24 1a 00 01 1f ** UNRECOGNIZED: 0d 24 0f 01 05 00 00 00 ea 05 03 00 01 ** UNRECOGNIZED: 05 24 06 01 01 Endpoint Descriptor: bLength 7 bDescriptorType 5
Any ideas or suggestions would be welcome. Jerry.


Offline Profile
PostPosted: Wed Dec 05, 2012 8:36 pm Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
The "very long" part of the lsusb output is the relevant bit ...

Can you try to post it in full length, retaining the formatting?

You can also capture the output by redirecting it to a text file and then attaching it to a post:
"lsusb -v -d 12d1:14cf >usb_details.txt"


Offline Profile
PostPosted: Wed Dec 05, 2012 10:54 pm Reply with quote
Posts: 2Joined: Mon Dec 03, 2012 11:34 pm
I changed the TargetVendor in the 12d1:1526 file from the value 19d2 as specified in the earlier post to 12d1 and now the device connected to ttyUSB0 is a modem. It is responding to some AT commands.
Now I really need to get back to what I set out at in the first place, that is getting this modem woring with a Vyatta router as a backup broadband connection. If there is any interest I'll post a short message of success or otherwise.
Thanks for this invaluable program.
Jerry.


Offline Profile
PostPosted: Thu Dec 06, 2012 8:23 am Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
So we have here 3 different users struggling with this modem and no one has been able to post a full lsusb output.
Amazing..


Offline Profile
PostPosted: Thu May 23, 2013 3:50 am Reply with quote
Posts: 3Joined: Thu May 23, 2013 3:02 am
I am also having trouble this dongle E3772. I am using Linux debian 3.1.0-1-686-pae (wheezy)
I guess it ends up in storage mode even if it goes into modem mode at some point, but I don't really know


Code:
~$ lsusb

Bus 002 Device 013: ID 12d1:14cf Huawei Technologies Co., Ltd.


Code:
~$ usb-devices

T:  Bus=02 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 13 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=14cf Rev=01.02
S:  Manufacturer=Vodafone (Huawei)
S:  Product=Vodafone Mobile Broadband (Huawei)
C:  #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=31 Driver=option
I:  If#= 1 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=46 Driver=option
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=02 Prot=33 Driver=option
I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=02 Prot=32 Driver=option
I: If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage


Code:
~$ dmesg

[30369.017487] usb 2-5: new high speed USB device number 13 using ehci_hcd
[30369.148950] usb 2-5: New USB device found, idVendor=12d1, idProduct=14cf
[30369.148955] usb 2-5: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[30369.148958] usb 2-5: Product: Vodafone Mobile Broadband (Huawei)
[30369.148961] usb 2-5: Manufacturer: Vodafone (Huawei)
[30369.150397] option 2-5:1.0: GSM modem (1-port) converter detected
[30369.150501] usb 2-5: GSM modem (1-port) converter now attached to ttyUSB0
[30369.150601] option 2-5:1.1: GSM modem (1-port) converter detected
[30369.150682] usb 2-5: GSM modem (1-port) converter now attached to ttyUSB1
[30369.150758] option 2-5:1.2: GSM modem (1-port) converter detected
[30369.150824] usb 2-5: GSM modem (1-port) converter now attached to ttyUSB2
[30369.150912] option 2-5:1.3: GSM modem (1-port) converter detected
[30369.150981] usb 2-5: GSM modem (1-port) converter now attached to ttyUSB3
[30369.154367] scsi16 : usb-storage 2-5:1.4
[30370.152970] scsi 16:0:0:0: CD-ROM            Vodafone CD ROM (Huawei)  2.31 PQ: 0 ANSI: 2
[30370.155205] sr1: scsi-1 drive
[30370.155446] sr 16:0:0:0: Attached scsi CD-ROM sr1
[30370.155617] sr 16:0:0:0: Attached scsi generic sg3 type 5


Code:
~$ lsusb -v  -d 12d1:14cf


is available at http://paste.debian.net/5897/

I don't know where to go from here and I'd appreciate any suggestions


Offline Profile
PostPosted: Sun May 26, 2013 9:18 am Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
Thanks for the "lsusb" output ...

I don't think these are serial interfaces, so the "option" driver does not help here.
usb_modeswitch only binds it if there is no other driver stepping forward.

You might need a newer kernel or some fresh backports ...


Offline Profile
PostPosted: Sun May 26, 2013 10:13 am Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
Josh wrote:

I don't think these are serial interfaces, so the "option" driver does not help here.
usb_modeswitch only binds it if there is no other driver stepping forward.


If#0 serial ppp modem
If#1 cdc_ncm direct ethernet
If#2 serial diag
If#3 serial pcui (at cmd)

This is Huawei's new assignment of interface attributes, (I'll pm you a complete attribute list) so
the option driver is correct for 3 out of 4 interfaces.
If#1 is not whitelisted in a modern option driver but will be grabbed by option when
using on-the-fly device support via the new_id function or maybe when using an older option driver.


Offline Profile
PostPosted: Sun May 26, 2013 3:57 pm Reply with quote
Posts: 165Location: Oslo, NorwayJoined: Thu Mar 15, 2012 10:47 pm
LOM wrote:
Josh wrote:

I don't think these are serial interfaces, so the "option" driver does not help here.
usb_modeswitch only binds it if there is no other driver stepping forward.


If#0 serial ppp modem
If#1 cdc_ncm direct ethernet
If#2 serial diag
If#3 serial pcui (at cmd)

This is Huawei's new assignment of interface attributes, (I'll pm you a complete attribute list) so
the option driver is correct for 3 out of 4 interfaces.
If#1 is not whitelisted in a modern option driver but will be grabbed by option when
using on-the-fly device support via the new_id function or maybe when using an older option driver.


This should not be necessary for this device. Both the option driver and the cdc_ncm driver do vendor + class based matching for Huawei devices. This should work even if the actual device ID is unknown.

The option driver will match the 3 serial interfaces (protocol 31, 32, and 33)
Code:
bjorn@nemi:~$ modinfo option | grep 'v12D1p\*d\*dc\*dsc\*dp\*icFFisc02ip3'
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip3Fin*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip3Ein*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip3Din*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip3Bin*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip3Ain*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip36in*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip35in*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip34in*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip33in*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip32in*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip31in*


And the cdc_ncm driver will match if#1 (protocol 46):
Code:
bjorn@nemi:~$ modinfo cdc_ncm | grep 'v12D1p\*d\*dc\*dsc\*dp\*icFFisc02'
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip76in*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip46in*
alias:          usb:v12D1p*d*dc*dsc*dp*icFFisc02ip16in*


I don't understand why the option driver binds to if#1. It should not.


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 2
21 posts
Go to page 1, 2  Next
Users browsing this forum: No registered users and 1 guest
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum