Huawei E1762 failed to connect

Yesterday, I bought a Huawei E1762 HSPA USB stick for mobile Internet, but it was not able to connect. I quickly checked with Windows, and after a bunch of installed driver from the USB stick, it worked. So the problem is with my installed Ubuntu version 9.10.

The USB stick under Windows works as follows that it first appears as a CD-ROM device, containing all the necessary drivers for Windows. Having autostart enabled, the drivers are automatically installed and then the device switches its mode to a USB modem. Fortunately both types of devices (storage and modems) are well supported in the Linux kernel, the only thing that needs to be done is to switch the mode from storage to modem.

Mode switching in Linux requires usb-modeswitch, which can be installed on Ubuntu 9.10. However, the Huawei E1762 is not recognized. Quickly checking the device id with lsusb shows that there is no configuration file for the device 12d1:1446 in /etc/usb_modeswitch.conf. Since the latest usb-modeswitch data files contain the configuration files for this device, its only necessary add the missing configuration file to make this device work.

Ubuntu 9.10 uses an ancient version of usb-modeswitch (1.0.2), so using the latest usb-modeswitch data files does not work and the changes have to be applied manually. The following site contains all the necessary steps to change the configuration file, in short its:

sudo apt-get install usb-modeswitch

then in the file /etc/usb_modeswitch.conf change to

########################################################
# Huawei E220 (aka "Vodafone EasyBox II", aka "T-Mobile wnw Box Micro")
# Huawei E230
# Huawei E270
# Huawei E870
# and probably most other Huawei devices (just adapt product ID)
#
# Two options: 1. removal of "usb-storage"  2. the special control
# message found by Miroslav Bobovsky
#
# Contributor: Hans Kurent, Denis Sutter, Vincent Teoh

DefaultVendor=  0x12d1
;DefaultProduct= 0x1003
DefaultProduct= 0x1446

TargetVendor= 0x12d1
;TargetProduct= 0x1003
TargetProduct= 0x1446

# choose one of these:
;DetachStorageOnly=1
;HuaweiMode=1

MessageEndpoint=0x01
MessageContent= "55534243000000000000000000000011060000000000000000000000000000"

then create the file /etc/udev/rules.d/15-huawei-e1762.rules or update usb_modeswitch.rules with

SUBSYSTEM=="usb", SYSFS{idProduct}=="1446", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/usb_modeswitch"

Finally my Huawei E1762 is working with usb-modeswitch (version 1.0.2).