Huawei E220 (And the Nokia 6220 Classic) on Three with Debian

Introduction

I bought a Huawei E220 3g data dongle on ebay recently, it was £59.95, unlocked to any network. As someone who travels alot I wan't a dongle that would work on any network the world over. Upon its delivery I plugged it into my linux laptop and had a play. Despite many guides online detailing how to set it all up, it didn't work. Eventually I had to hack about with the config, and spend a few minutes talking AT commands using minicom, but eventually I had a working config. Below is my working wvdial.conf. There is no great need for me to explain the full gory details of everything needed to set it up, This is a pretty good guide that got me most of the way, anyone curious can compare configs and see where they differ. I hope this is useful to someone else and you don't have to go through the several hours of hacking and being confused like I did.

Enjoy...

Update...

Since I wrote this page for the above dongle, I have ended up with a Nokia 6220 Classic mobile phone. After a few hours of trying to get the bluetooth in the handset to work with linux so that I could use the phone for network, I gave up and decided to see if I could make it work with the usb cable instead. I plugged it in, and the handset comes up asking which mode to use, I chose "PC Suite". The device then shows up as /dev/ttyACM0 . All that was needed to make it work, was to replace the /dev/ttyUSB0 in the wvdial.conf file below, with /dev/ttyACM0, and the thing just worked, out the box. No problems. Very very simple!

Update 2...

I now have a working config for vodafone.nl. Which can be found at the bottom of the page.

Dealing with slow DNS

Many users of various 3g and gprs services have reported that the DNS provided by your mobile telco is very slow. Personally I run my own DNS servers anyway, so use these in place of the telco ones. However not everyone has access to their own dns servers, so you need to use someone else. Thankfully OpenDNS provide a free DNS to meer mortals. The Ip addresses for the OpenDNS servers are:

  • 208.67.222.222
  • 208.67.220.220

Stick these in your /etc/resolv.conf in place of the telco ones, and away you go. You may find that periodically the telco servers replace your custom ones. To get round this I use a small script to copy my own /etc/resolv.conf settings over the top of the /etc/resolv.conf that is created upon your 3g connection. Implementation of this is left as an excersise for the reader

My wdial.conf for Three UK


[Dialer Defaults]
Init1 = AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = ATH
Init5 = AT+CGDCONT=1,"IP","three.co.uk"
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
Phone = *99#
Username = three
Password = three
Modem = /dev/ttyUSB0
Dial Command = ATDT
Baud = 460800

My wdial.conf for Vodafone.nl

[Dialer Defaults]
Init1 = AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = ATH
Init5 = AT+CGDCONT=1,"IP","live.vodafone.com"
Init6 = AT+CGATT=1
TIMEOUT 30
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
Phone = *99#
Username = vodafone
Password = vodafone
Modem = /dev/ttyACM0
Dial Command = ATDT
Baud = 460800