Page 1 of 1

HUAWEI K3771 and setup of modeswitch

Posted: 05 Aug 2011, 09:35
by romain
Hey,

I have currently Ubuntu 11.04 and a 3G dongle HUAWEI K3771.

I am sure you will find my question naive but anyway :

I downloaded usb-modeswitch-1.1.8.tar.bz2, then unpack it. I go into the directory and then I type sudo make install :
romain@blabla:~/usb-modeswitch-1.1.8$ sudo make install
install -D -s --mode=755 usb_modeswitch /usr/sbin/usb_modeswitch
install -D --mode=755 usb_modeswitch.tcl /usr/sbin/usb_modeswitch_dispatcher
install -D --mode=755 usb_modeswitch.sh /lib/udev/usb_modeswitch
install -D --mode=644 usb_modeswitch.conf /etc/usb_modeswitch.conf
install -D --mode=644 usb_modeswitch.1 /usr/share/man/man1/usb_modeswitch.1
install -d /var/lib/usb_modeswitch
romain@labla:~/usb-modeswitch-1.1.8$
I have got just these lines but I don't think that anything has been installed. And I go in Synaptic, I see that there is the version 1.1.7-1 installed on my computer.

Can you tell me what is the problem here?


Thank you for your answers!
Romain

Posted: 05 Aug 2011, 13:46
by Josh
If you install any program from source, the package manager will not know about it. But the files are updated anyway. Run "sudo usb_modeswitch -h" and you should see version 1.1.8. I believe there are no conflicts as long as you don't update with Synaptics to an older version than what is really running.

I just recommend checking the folder "/lib/udev/rules.d". There should be only one
"<..>-usb_modeswitch.rules" file. If there are two, rename "40-usb_modeswitch.rules" to the other name, overwriting that file.

Note that the device info is contained in the data package, so you want to update that too.


Posted: 06 Aug 2011, 18:14
by romain
Thank you for answer Josh.

I checked the folder "/lib/udev/rules.d" and there is only one "<..>-usb_modeswitch.rules" file, which is actually "40-usb_modeswitch.rules".

But the modem is still recognized as a CD.

Posted: 06 Aug 2011, 21:36
by Josh
So, did you update the data package?

Posted: 07 Aug 2011, 02:46
by romain
Yes I did :

romain@blabla:~/usb-modeswitch-data-20110714$ sudo make install
install -d /usr/share/usb_modeswitch
install -d /etc/usb_modeswitch.d
install -D --mode=644 40-usb_modeswitch.rules /lib/udev/rules.d/40-usb_modeswitch.rules
install --mode=644 -t /usr/share/usb_modeswitch ./usb_modeswitch.d/*
if [ -f /etc/issue ]; then \
UDEVADM=`which udevadm 2>/dev/null`; \
if [ "x$UDEVADM" != "x" ]; then \
UDEVADM_VER=`$UDEVADM -V 2>/dev/null`; \
if [ -z $UDEVADM_VER ]; then \
UDEVADM_VER=`$UDEVADM --version 2>/dev/null`; \
fi; \
if [ $UDEVADM_VER -gt 127 ]; then \
$UDEVADM control --reload-rules; \
else \
$UDEVADM control --reload_rules; \
fi \
elif [ `which udevcontrol 2>/dev/null` ]; then \
`which udevcontrol` reload_rules; \
fi \
fi
romain@blabla:~/usb-modeswitch-data-20110714$

Posted: 07 Aug 2011, 07:06
by Josh
O.K., so you plug your stick and nothing appears to happens.

Did you check with "lsusb" and "dmesg"? It's not unusual for Huwaei devices to expose the install "CD" again after switching. Then you end up with several serial ports, a micro SD card slot plus the original pseudo CD-ROM.


Posted: 07 Aug 2011, 17:19
by romain
Yes, I plug the stick and nothing happens.

However, the result of "lsusb" seems to indicate that the switch was done.


romain@romain-Studio-XPS-1640:~$ lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 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 004 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 002 Device 004: ID 12d1:14ca Huawei Technologies Co., Ltd.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0c45:63fa Microdia
Bus 001 Device 002: ID 2040:1801 Hauppauge Okemo B
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
romain@romain-Studio-XPS-1640:~$

<edited for brevity by mod>

[ 31.008790] EXT4-fs (sda6): re-mounted. Opts: commit=0
[ 47.388120] usb 2-2: new high speed USB device using ehci_hcd and address 3
[ 47.897048] scsi7 : usb-storage 2-2:1.0
[ 48.802156] usb 2-2: USB disconnect, address 3
[ 56.516052] usb 2-2: new high speed USB device using ehci_hcd and address 4
[ 57.029455] option 2-2:1.0: GSM modem (1-port) converter detected
[ 57.029545] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 57.029655] option 2-2:1.1: GSM modem (1-port) converter detected
[ 57.029735] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 57.029808] option 2-2:1.2: GSM modem (1-port) converter detected
[ 57.029869] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB2
[ 57.029961] option 2-2:1.3: GSM modem (1-port) converter detected
[ 57.030021] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB3
[ 57.031095] scsi8 : usb-storage 2-2:1.4
[ 58.029324] scsi 8:0:0:0: CD-ROM Vodafone CD ROM (Huawei) 2.31 PQ: 0 ANSI: 2
[ 58.032262] sr1: scsi-1 drive
[ 58.032392] sr 8:0:0:0: Attached scsi CD-ROM sr1
[ 58.033515] sr 8:0:0:0: Attached scsi generic sg2 type 5
romain@romain-Studio-XPS-1640:~$


Posted: 07 Aug 2011, 17:33
by Josh
Your assumption is correct: the switching worked, the driver is bound and the serial ports are ready.

Posted: 08 Aug 2011, 16:04
by romain
So what i have to do make it work?

Because it doesn't work with VMC and neither with Network Manager.

Posted: 08 Aug 2011, 16:19
by Josh
Well, I recommend asking the developers of these programs, probably filing bug reports. I know that people from Network Manager are interested in such reports.

See the main doc page of usb_modeswitch (link above), paragraph "How to use", about possible replacements for NM.


Posted: 21 Aug 2011, 12:08
by romain
It works with Sakis3G. :D

Thanks for you answers!