Getting the Huawei E160 to work with Linux

Tuesday, 9. September 2008 13:03 - daniel - Computer - 8 Comments


Last week I singed a mobile internet contract and received a Huawei E160 USB modem with it. This is pretty much just a Huawei E220 without the cable and an additional card reader. Getting it to work with Linux is pretty simple.

If you connect it at boot up, it will be in the correct mode right away.

If you connect it while the OS is running, it won't be in the right mode. You have to run usb_modeswitch to use it. The E160 shares the settings with the E220.

I tried to use udev to do this automatically, but this doesn't work yet. Maybe I'll find a solution for this.



Comments

steve - Wednesday, 17. September 2008 8:01

Hi Dani don't know if you can help me but I have a Aspire One running Linux and have bought a E160 dongle, however I cant get it to work can you help me please?

Thanks Steve

Daniel - Saturday, 20. September 2008 11:21

I don't really know why it doesn't work for you without a more detailed error description.

Basically, what you need is to download usb_modeswitch, compile it, change the /etc/usb_modeswitch.conf and run usb_modeswitch.

To set up usb_modeswitch open a terminal and type this: wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-0.9.4.tar.bz2 tar -xjf usb_modeswitch-0.9.4.tar.bz2 cd usb_modeswitch-0.9.4 ./compile.sh

If you get errors here, you probably need to install libusb-dev or libusb-devel (not sure how the package is called on your Linux distribution) and run compile.sh again. If gcc is missing, install gcc and run compile.sh again.

Now, copy usb_modeswitch to /usr/local/bin and usb_modeswitch.conf to /etc (Must be done as root): cp usb_modeswitch /usr/local/bin/ cp usb_modeswitch.conf /etc/

Open /etc/usb_modeswitch.conf with your favorite editor and search for the E220 entry. Remove the ; DefaultVendor, DefaultProduct and HuaweiMode lines. The entry should now look like this:

######################################################## # Huawei E220 (aka "Vodafone EasyBox II", aka "T-Mobile wnw Box Micro") # Huawei E270 # Huawei E870 # # Two options: 1. removal of "usb-storage" 2. the special control # message found by Miroslav Bobovsky # # Contributor: Hans Kurent, Denis Sutter

DefaultVendor= 0x12d1; DefaultProduct= 0x1003

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

Now plug in your E160, wait until the storage medium is found and run usb_modeswitch as root.

Now you should be able to create a new UMTS/GPRS/3G connection. Not sure how to do this on an Apsire One.

jb - Wednesday, 3. December 2008 15:36

Huawei e160 & linux

Jose - Friday, 7. August 2009 19:00

Hi, I'm from Paraguay, and I have a HUAWEI E160 USB stick. But I really don't know how to make it work with linux. Especificly with ubuntu 9.04 desktop edition. Please help!

claudio - Monday, 7. September 2009 21:22

donde puedo encotrar driver HUAWEI E160 para ubuntu-8.04.2-desktop-i386

Daniel - Monday, 7. September 2009 22:31

donde puedo encotrar driver HUAWEI E160 para ubuntu-8.04.2-desktop-i386

Google translates this as

where he will find HUAWEI E160 driver for ubuntu-8.04.2-desktop-i386

Ubuntu 8.04. should support the E160 out of the box. No additional divers or anything needed. At least not on my Ubuntu box.

Jose - Mexico - Friday, 23. October 2009 3:17

I have a system made witih linux, I can concect with the E160 But it don't transmite or recieve (remais busy), I can't get a PING also. Someone tells me that may be the DNS. Can you help me?

Daniel - Friday, 23. October 2009 16:12

The DNS settings are in /etc/resolv.conf. For examle

nameserver 1.2.3.4
nameserver 2.3.4.5

If this file is empty, then there are no nameserver configured. Add your own nameservers there. Also check man resolv.conf for more infos.

If there are nameservers there, try to ping them and see if you can reach them.