USB modem configuration is always an issue for Ubuntu users. Here I provide an easy solution which worked for my Huawei E1550 USB modem on my Ubuntu 10.04 Lucid Lynx.
Ubuntu has a great feature called rule files, here we only need to create a new configuration file for our USB modem. After creating the corresponding rule file the machine will automatically switch the USB mode of your 3G Modem from USB Storage to USB Modem.
As the first step we need to find out the product id and the vendor id of our 3G USB modem. Connect the Modem, then in the terminal type;
$ lsusb
You will get a list of drivers connected to the USB ports.
In my case, one of the entries I found was.
Bus 002 Device 004: ID 12d1:1446 Huawei Technologies
Here 1446 is the Product id, and 12d1 is the vendor id, of my USB Modem.
Note: In this case, my system has only recognized the USB Modem a USB Storage drive.
Now you need to create a rule file for the Modem.
$ sudo vi /etc/udev/rules.d/15-huawei-155x.rules
Then type the following:
ACTION!="add", GOTO="huawei_zerocd_end"
SUBSYSTEM=="usb", ATTR{bDeviceClass}!="ff" ,ENV{DEVTYPE}=="usb_device", GOTO="huawei_zerocd_disable"
SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", GOTO="huawei_zerocd_disable"
GOTO="huawei_zerocd_end"
LABEL="huawei_zerocd_disable"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"
LABEL="huawei_zerocd_end"
Now, save and exit. Next time when you plug in your USB modem, your system should automatically switch it to USB Modem mode and you’re good to go.
To cross check whether Ubuntu has properly detected the USB modem, type;
$ lsusb
now your output should contain a line like;
Bus 002 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem
Now if you get something like this, then you can be sure that the system has successfully recognized your USB as 3G Modem.
Note there is an “USB Modem ” at the end of the line.
But before you can finally start using your USB modem to connect to the Internet, you still need to configure your network connections. Simply go to “System -> Preferences -> Network Connections” and select the “Mobile Broadband” tab. Then click the “Add” button and the Mobile Broadband Connection wizard should be able to help you configure your Internet connection in no time.
For other USB Modems try the same technique by adding the corresponding product and vendor ids. Wish they will work for you :-)