Huawei e169 on linux. It can be done!

Written by David Banham

::EDIT:: As mentioned in some comments below, these devices are now supported out of the box on newer versions of Ubuntu.

After much buggering about, I finally got this &amp;#$# Huawei e169 working. This method requires no mucking around in the kernel, just the usb_modeswitch utility and wvdial. For reference, this was a unit supplied from Optus in Australia for their Optus Wireless Broadband service. It's set up on an old laptop running Ubuntu 8.04, Hardy Heron. There's no good guide out there for the e169 at the time of writing.First, grab usb_modeswitch from http://www.draisberghof.de/usb_modeswitch/There's nothing to install, you just need the compiled executable. There's a config file, but I found it far simpler to just use command line arguments. The commands for the e169 need to be executed in order, and they're as follows:> ./usb_modeswitch -v 0x12d1 -p 0x1001 -d 1./usb_modeswitch -v 0x12d1 -p 0x1001 -H 1Once that's done, the device should be recognised and /dev/ttyUSB0 should be created. Yay!Now, you need to spend a second setting up /etc/wvdial.conf The below should be pretty universal:> [Dialer Defaults]Phone = 99#Username = Password = New PPPD = yes<strike>wvdial looks for a device at /dev/modem, but ours is at /dev/ttyUSB0. My somewhat hacky solution was</strike>> <strike>sudo ln /dev/ttyUSB0 /dev/modem</strike>Jerome in the comments has suggested adding this section to the conf file instead of creating a link as above. It's untested by me, but looks like it should work fine. It's a much cleaner solution than the crossed out one above, too. Add it right at the beginning of the file.[Modem0]Modem = /dev/ttyUSB0If you use this solution (which you should) remove the "sudo ln…" lines from connect.sh.Now, just executing wvdial in a terminal should get you connected. It takes a little while, about 30 seconds I guess, but the important thing is that it works, and it's pretty simple.Since this connection is on a laptop intended for my grandfather, who is a fairly new computer user, I wanted to make the connection automatic in order to simplify things. I put this script in /etc/init.d/ which worked a treat. http://dbe.cc/pub/connect.shDon't forget to run sudo update-rc.d connect.sh defaultsThe script will need to be tweaked to include the location of the usb_modeswitch executable on your system. Unless your username happens to be brian and it's in a directory called .huawei under your home folder. That'd be a pretty crazy coincidence though. If people are actually finding this post and using the script I'll update it to be more user friendly. Naturally, if you don't want it executing on boot, you can just save the script as an executable and run it (as root) when you please.Also:Because this connection doesn't run through network-manager, it confuses firefox a little. All it means is that firefox starts itself in offline mode. You can just untick "Work offline" in the File menu. I solved it more permanently with instructions from here: http://ubuntuforums.org/showthread.php?t=767045It's late, so if there's anything I've missed or anything that's unclear, please let me know in the comments. I'll do my best to help out.