There’s many way to make USB modem Vodafone Huawei E220 work on openSUSE 11, this modem work in Ubuntu 9.04 also, so i think this will work on different (latest) version of openSUSE or Ubuntu. USB modem Huawei E220 is run out of the box in OpenSUSE 11 and Ubuntu 9, it’s completelly detected.

I’m going to show how to configure Vodafone Huawei E220 in NetworkManager, wvdial, UMTSmon, and Vodafone Mobile Connect.

Issues in Point-to-Point Protocol (PPP) on Linux
Before we got into that, there’s a problem when using ppp on Linux. Sometimes after we make a successfull connection using one of the program, it set the wrong DNS on /etc/resolv.conf usually to 10.11.12.13 and 10.11.12.14, so we still not connect to the internet. This is not always happen, some other time it set correct DNS. But in my case it’s almost always set bogus DNS, so usually after the connection is establish I open /etc/resolv.conf with text editor (Vi, Kwrite, Gedit, etc) then set the correct DNS.

Where do i get the correct DNS ? well i just run this modem in Windows, see the DNS and then get back to Linux to set the correct DNS. Off course if you only use one GSM card, you only need to do this once. To make thing simple on changing the DNS, I make another file (eg, “/etc/resolv-true.conf“) with the correct DNS, after the connection is establish in the console I type “CP /etc/resolv-true.conf/etc/resolv.conf“, it will replace /etc/resolv.conf that had wrong DNS with my file. I almost always to do this every time 😦 .

Issues using Firefox
If we make a connection besides using NetworkManager, it’s likely that you wont be able to use Mozilla Firefox, we can’t browse anything. The reason is I got it from here. it said “even if a connection is made, software like Gaim and Firefox will refuse to connect because according to them there is no connection. Apparently they use libnm to ask NetworkManager if the system is on-line or not”.

But we still can use Opera or Konqueror, even this is annoying since Firefox is one of the best browser.

Updated 11-01-2010:
Ok, what we need to is just untick Work Offline menu (File –> Work Offline). Apparently firefox just make the browser to work offline if NetworkManager is not in use 🙂 . This is firefox bug by the way.

Detecting Device
After we plug the modem to PC/Laptop use, we can use the command like “dmesg | grep modem” or “dmesg | grep HUAWEI” to see if our modem is detected.
if you get output something like above picture, then you got your modem detected.

NetworkManager
The simplest and reliable way to make ppp connection using Huawei E220 modem is NetworkManager (KNetworkManager in KDE). Here is the step:

1. Klik on KNetworkManager Icon then New connection … –> ttyUSB0

2. Insert Username, Password, Number, and APN from your operator/provider. In my case I only insert those field. Click Next.

3. Just click Next

4. Set Baud rate to 9600. Click Next.

5. Just click Next

6. Set the Connection Name, you can use any name. I’m just using my operator name. You can click “Connect & Save” to start connecting or just click “Save” to save the configuration.

7. To connect, click on KNetworkManager Icon then the name of the connection. After succesfull connection, you’ll see the KNetworkManager icon is changed.

WvDialWvDial is a Point-to-Point Protocol dialer, it’s console based. Wvdial is used as a connection by Vodafone Mobile Connect, smpppd, KInternet. WvDial save and loads its configuration from /etc/wvdial.conf. To get a best practice using wvdial we can start by delete default /etc/wvdial.conf (e.g “rm /etc/wvdial.conf” in openSuse as root, or “sudo rm /etc/wvdial.conf” in Ubuntu).

Open a console and now let’s see how wvdial detect our modem. To configure wvdial we need to do it as root. Here is the step:

1. Type “wvdialconf /etc/wvdial.conf“, then ENTER. The output is like picture below.

Just like using NetworkManager we need to provide Username, Password, Phone Number, and APN. APN is set in Init3 parameter using AT+CGDCONT command, replace it with APN from your provider only if your connection need APN, otherwise we can remove Init3 string. Note on modem, change it if your device mapping is not set to /dev/ttyUSB0.

3. To establish a connection type “wvdial” in the console, the output will likely like this:

Output above is on Ubuntu, it resolve correct DNS, so you can begin browsing. Output below is when it set wrong DNS on openSuse, need to edit /etc/resolv.conf manually.

note: For the screenshoot i’m using Ubuntu 9.04, still in the same machine. Somehow my openSuse 11 always set the wrong DNS after wvdial command. Maybe you wont find this problem. So just remove the sudo command in openSuse.