Maximum PC

For All Tips and Tricks for Windows

Saturday, April 16, 2011

How to install USB Modem in Ubuntu

Posted by Shamim Imtiaz Khan

USB modem configuration is always an issue for Ubuntu users. Here I provide an easy solution which worked for my Huawei E1550 (GrameenPhone) USB modem on my Ubuntu 10.10 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 Grameenphone Huawei 3G USB modem. Connect the Modem, then go to TERMINAL and  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"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"

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 :-)


Anonymous said...

how to save and exit?? their is save content only ???

Trevor said...

Would this work for the Banglalion USB dongle that is available in Bangladesh? Or the QuBee? Thanks.

Shamim said...

Trevor, I am not really sure about Banglalink Modem, But I can only tell u that it works for Any Huawei Modem, So If banglalink modem is Huawei thaen it will work. By the way its not for Qubee

Post a Comment