Thursday, October 28, 2010

Huawei E1550 USB 3G Modem on Ubuntu

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

9 comments:

  1. This helped me out massively and probably saved me a lot of stress. Thank you.

    ReplyDelete
  2. thank you very much for this post. i`m completaly new in ubuntu. do you have any adia, how would be the procedure for huawei E5832? it is recognize also only like mass storage.
    milan

    ReplyDelete
  3. Yes, please. I also desperately need help with the procedure for the huawei E5832. I have the same problem as milan... Ubuntu only recognizes it as a mass storage device. I've tried everything, but nothing seems to work. Thanks in advance.
    T

    ReplyDelete
  4. This was helpful. Very helpful. Thanks and keep up the clear guide.

    ReplyDelete
  5. Hi,
    I have the same problem as milan and Anonymous...
    I have E5832 and Linux and it doesn't see it as a modem but as a pendrive.
    It is a third day of trying...
    I'm new in Linux. Can you help me?

    ReplyDelete
  6. Informative post.. Its helpful too.. Thanks for sharing this.. Keep on posting..

    http://www.chennaireliancedatacard.in

    ReplyDelete
  7. Hi Very Nice Blog I Have Read Your Post It Is Very Informative And Useful Thanks For Posting And Sharing With Us And Your Writting Style Is Very Nice
    4G LTE Advance and Wi-Fi Router with a robust design for industrial applications.

    ReplyDelete