BLAHU.COM@2009 .
Web Validation
Valid XHTML 1.0 Strict Valid CSS!

Huawei E220 on Xubuntu

Primo, I love my girl who is very sexy and has a lot of patience.
Secundo, I just wanted to get connectivity so expect a few dirty tricks and just command line.
Tercio, The Dongle Huawei E220 didn't work out of the box and configuring NetworkManager seems a lot of pain to me.

Must-haves

PPP Scripts

Although the package provides the chat and ppp scripts I have created my own ones, especially for the PIN code input part.
All settings here are for O2 Ireland. Some links follow when you can look for other settings for other providers. Also in PROVIDERS file in the Oozie's package.

Execute in the console

As a root, make sure that the usbserial devices are fired up!. It may take a while since you plugged the dongle. You should see only 2 of them!. USB3 means that the udev script failed or you have more usbserial devices connected. :)
# ls -l /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 2008-03-11 23:03 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 2008-03-11 23:03 /dev/ttyUSB1

# pppd call gprs
now you should have a basic connectivity. For me the supplied DNS servers 10.11.12.13 and 10.11.12.14 didn't work. So I have created my own /etc/resolv.conf and put O2 dns servers:
# cat /etc/resolv.gprs
nameserver 62.40.32.33
nameserver 62.40.32.34
# cp /etc/resolv.gprs /etc/resolv.conf
This should get you going with DNS. Works for me.
Remember that everytime you disconnect (^C) you should unplug and plug back the device.
Here is the session from my laptop. Just for your reference:
# pppd call gprs
pppd options in effect:
debug           # (from /etc/ppp/peers/gprs)
nodetach                # (from /etc/ppp/peers/gprs)
persist         # (from /etc/ppp/peers/gprs)
dump            # (from /etc/ppp/peers/gprs)
noauth          # (from /etc/ppp/peers/gprs)
user gprs               # (from /etc/ppp/peers/gprs)
/dev/ttyUSB0            # (from /etc/ppp/peers/gprs)
460800          # (from /etc/ppp/peers/gprs)
lock            # (from /etc/ppp/options)
connect /usr/sbin/chat -vf /etc/chatscripts/gprs                # (from /etc/ppp/peers/gprs)
crtscts         # (from /etc/ppp/options)
modem           # (from /etc/ppp/options)
asyncmap 0              # (from /etc/ppp/options)
lcp-echo-failure 4              # (from /etc/ppp/options)
lcp-echo-interval 30            # (from /etc/ppp/options)
hide-password           # (from /etc/ppp/options)
novj            # (from /etc/ppp/peers/gprs)
noipdefault             # (from /etc/ppp/peers/gprs)
defaultroute            # (from /etc/ppp/peers/gprs)
usepeerdns              # (from /etc/ppp/peers/gprs)
noipx           # (from /etc/ppp/options)
Serial connection established.
using channel 21
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x819f12d6> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x5289b218> <pcomp> <accomp>]
sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x5289b218> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x819f12d6> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0x819f12d6]
rcvd [LCP DiscReq id=0x1 magic=0x5289b218]
rcvd [CHAP Challenge id=0x1 <6ef56526721cd4ef60fb974eee83f8db>, name = "UMTS_CHAP_SRVR"]
sent [CHAP Response id=0x1 <154bfe26e630839f85d8ec95de046a2c>, name = "gprs"]
rcvd [LCP EchoRep id=0x0 magic=0x5289b218 81 9f 12 d6]
rcvd [CHAP Success id=0x1 ""]
CHAP authentication succeeded
CHAP authentication succeeded
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
rcvd [IPCP ConfNak id=0x2 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
rcvd [IPCP ConfNak id=0x3 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
rcvd [IPCP ConfNak id=0x4 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x5 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
rcvd [IPCP ConfNak id=0x5 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x6 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x6 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x7 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x7 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x8 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x8 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x9 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x9 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xa <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xa <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xb <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xb <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xc <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xc <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xd <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xd <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xe <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xe <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xf <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xf <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x10 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x10 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x11 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x11 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x12 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x12 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x13 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x13 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x14 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x14 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x15 <addr 0.0.0.0>]
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x15 <addr 10.37.117.28>]
sent [IPCP ConfReq id=0x16]
rcvd [IPCP ConfNak id=0x16 <addr 10.37.117.28>]
sent [IPCP ConfReq id=0x17 <addr 10.37.117.28>]
rcvd [IPCP ConfAck id=0x17 <addr 10.37.117.28>]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
Could not determine remote IP address: defaulting to 10.64.64.64
local  IP address 10.37.117.28
remote IP address 10.64.64.64
primary   DNS address 10.11.12.13
secondary DNS address 10.11.12.14
Script /etc/ppp/ip-up started (pid 9888)
Script /etc/ppp/ip-up finished (pid 9888), status = 0x0
Terminating on signal 2
Connect time 2.4 minutes.
Sent 140374 bytes, received 113372 bytes.
Script /etc/ppp/ip-down started (pid 9906)
sent [LCP TermReq id=0x2 "User request"]
rcvd [LCP TermAck id=0x2]
Connection terminated.
Script /etc/ppp/ip-down finished (pid 9906), status = 0x0

Useful links