The Huawei E220 / E270 is a USB HSDPA modem. It is sold in NZ by Vodafone as a Vodem.
It generally presents a couple of /dev/ttyUSB? devices. If you have a 2.6.20+ kernel, it will present 2 /dev/ttyUSB devices, and you should be able to get it working with wvdial or pppd by accessing /dev/ttyUSB0. If you have an earlier kernel, it'll show three devices, one of which is actually a USB mass storage device, and you'll need to make some changes to your configuration to make it work.
If you have a recent distro such as Ubuntu 9.04 (Intrepid Ibix) or higher, it should "just work". A network-manager wizard will popup asking you to configure it, and it will make some attempt at autodetecting your country/provider.
I've copied configs from different sites below to prevent against page disappearance, and have attributed work where appropriate.
It "should" "just work". :)
For Vodafone New Zealand the recommended APN is www.vodafone.net.nz. DNS addresses are automatically obtained from the server.
In Ubuntu 9.04 (Jaunty), incorrect DNS servers are given in the default settings for Vodafone New Zealand. This needs to be fixed for the connection to work:
Open up the 'Edit connections' dialogue and bring up your Vodafone connection for editing. Choose the tab 'IPv4 Settings'; the tab shows "Method: Automatic (PPP) addresses only" and two (incorrect) DNS servers are listed.
Change the dropdown box to "Method: Automatic (PPP)", the two DNS servers should disappear... otherwise delete them.
Vodafone gives the correct DNS servers automatically during PPP negotiation. The previous setting prevents PPP setting the DNS servers.
The following configs are taken from http://juanjosec.blogspot.com/2008/09/making-3g-huawei-220-usb-modem-work-in.html and adjusted for Vodafone NZ.
Add the following files to your system:
# /etc/ppp/peers/3g # pppd call 3g nodetach # (using Huawei e220 USB modem) /dev/ttyUSB0 #3600000 #irrelevant noipdefault defaultroute user gprs password gprs #persist lock noauth nodetach usepeerdns nodeflate nobsdcomp nopcomp noaccomp novj novjccomp nomagic #asyncmap 0 #lcp-echo-failure 10000 #lcp-echo-interval 1000 lcp-echo-failure 10 lcp-echo-interval 30 connect '/usr/sbin/chat -v -f /etc/ppp/peers/3g.chat' debug idle 180 holdoff 10
# /etc/ppp/peers/3g.chat TIMEOUT 3 ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED "" ATZ OK ATQ0V1E1S0=0&C1&D2 OK AT+CGDCONT=1,"IP","internet","0.0.0.0",0,0 OK ATDT*99# CONNECT ""
You can now use "pon 3g" to start your connection.
This page has some wvdial configs. I've not tested them.
If you use these configs, remember to change the dial number ot *99# (for Vodafone NZ). You may also need care with the Init2 and Init3 lines - compare them to the first 2 lines after ' "" ATZ ' in the 3g.chat script mentioned in the pppd section above.
The methods described for > 2.6.20 kernels will work, but first of all the pseudo cdrom drive needs to be disabled.
Not having a machine with an earlier kernel than 2.6.20, the following notes are not tested.
The following config was taken from http://juanjosec.blogspot.com/2008/09/making-3g-huawei-220-usb-modem-work-in.html. I have not tested it, but I gather the original author did.
## /etc/udev/rules.d/99-huawei.rules ## ## to enable it, run: udevcontrol reload_rules ## # # udev rule for HUAWEI E220 3G HSDPA Modem # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # (c)opyleft OOZIE < oozie@poczta.fm > # # This file prevents the pseudo scsi cdrom device from enabling, # thus providing a workaround for kernel versions < 2.6.20 # # Minor edition by JuanJo Ciarlante ## SUBSYSTEM=="block", \ ACTION=="add", \ SYSFS{idVendor}=="12d1", \ SYSFS{idProduct}=="1003", \ RUN="/sbin/modprobe usbserial vendor=0x12d1 product=0x1003", \ OPTIONS="ignore_device"
This page has more information on this, and was the original author for the above udev config I believe.
This page discusses using a program called usb_modeswitch to work around the USB pseudo device.
2 pages link to HuaweiE220: