December 25, 2010

Can't detect USB Broadband Modem in Linux Ubuntu?

Huawei Broadband Modem
[Tested on Ubuntu 10.04 and 10.10]

Most USB Broadband Modem designed for Windows. They have their own built-in installer ~ which will act as storage when the driver are not installed. It will automatically/assist the user to install the modem driver. These drivers are designed for Windows.

Linux/Ubuntu have lower level of driver initialization. The OS will try to communicate directly to the hardware interface (firmware) - really plug-n-play!

All USB devices can be detected by typing at the terminal (Application > Accessories > Terminal):
lsusb

The result might look like this:
(name)@(name)-desktop:~$ lsusb
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 002: ID 12d1:1446 Huawei Technologies Co., Ltd. E620 USB Modem
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
(name)@(name)-desktop:~$
It will shows every devices connected to the USB port. Identify the USB Broadband modem. Current example, showing Huawei E1552 at this line:
Bus 003 Device 002: ID 12d1:1446 Huawei Technologies Co., Ltd. E620 USB Modem
Now, go to the editor to edit the configuration file, type in:
sudo gedit /etc/udev/rules.d/15-huawei-e1552.rules
on that file, type in:
SUBSYSTEM=="usb",SYSFS(idProduct)=="1446",SYSFS(idVendor)=="12d1",
RUN+="/lib/udev/modem-modeswitch --vendor 0x12d1 --product 0x1446 --type option-zerocd"
Type it in one line. Then, save it.
Restart. Plug in the USB Broadband Modem. If everything is right, it will automatically detect it as a modem. now, you can create the wireless network configuration if you don't have one.

What we've done is: telling Linux, if you found this product by this vendor, please threat it as a modem, not as storage(cd). Those product and vendor ID are written in Hexadecimal codes.

It works with any other USB Broadband Modem too (according to your vendor/product id). Usually, it will auto-detect but, if it doesn't, you may try the steps above.

Cheers!

3 comments:

Anonymous said...

Hi Thanks for your great tutorial. I'll be putting it to work since I am currently facing this problem. When you say "Current example, showing Huawei E1552 at this line".Didn't you mean Huawei E620 which is the example that you have shown in your article. Please clarify because it's made me a little confused.



Mz Iskandar said...

Hi Anonymous,

I'm so sorry. I can't remember anymore. The latest version of Ubuntu should support broadband without tweaking.

Thanks for commenting.

Cheers!

Android Laptop said...

I will try this tutorial now,.. but for ur tips to get my usb modem detect in ubuntu