In Ubuntu 7.10 and higher (E220 is supported natively by Linux Kernel 2.6.20-rc2 or higher). Kernel 2.6.20-rc2 includes these patchs:

  • usb-storage: Ignore the virtual cd-drive of the Huawei E220 USB Modem

  • usb-gsm-driver: Added VendorId and ProductId for Huawei E220 USB Modem

You can use GnomePpp instead (it is the Wvdial graphical frontend). See https://help.ubuntu.com/community/DialupModemHowto/Huawei/E220/GnomePpp

Manual Installation

Detection

If Ubuntu doesn’t detect the USB device as a modem (/dev/ttyUSB0), wvdial doesn’t do you any good.

scanModem fails to detect USB modems (it employs lsusb). Use instead:

sudo wvdialconf  /etc/wvdial.conf

This are the screen results:

Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyS1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S2   S3   
WvModem<*1>: Cannot get information for serial port.
ttyUSB0<*1>: ATQ0 V1 E1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- +CME ERROR: SIM PIN required
ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: huawei
ttyUSB0<*1>: Speed 4800: AT -- OK
ttyUSB0<*1>: Speed 9600: AT -- OK
ttyUSB0<*1>: Speed 19200: AT -- OK
ttyUSB0<*1>: Speed 38400: AT -- OK
ttyUSB0<*1>: Speed 57600: AT -- OK
ttyUSB0<*1>: Speed 115200: AT -- OK
ttyUSB0<*1>: Speed 230400: AT -- OK
ttyUSB0<*1>: Speed 460800: AT -- OK
ttyUSB0<*1>: Max speed is 460800; that should be safe.
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
WvModem<*1>: Cannot get information for serial port.
ttyUSB1<*1>: ATQ0 V1 E1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- +CME ERROR: SIM PIN required
ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: huawei
ttyUSB1<*1>: Speed 4800: AT -- OK
ttyUSB1<*1>: Speed 9600: AT -- OK
ttyUSB1<*1>: Speed 19200: AT -- OK
ttyUSB1<*1>: Speed 38400: AT -- OK
ttyUSB1<*1>: Speed 57600: AT -- OK
ttyUSB1<*1>: Speed 115200: AT -- OK
ttyUSB1<*1>: Speed 230400: AT -- OK
ttyUSB1<*1>: Speed 460800: AT -- OK
ttyUSB1<*1>: Max speed is 460800; that should be safe.
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK

Found a modem on /dev/ttyUSB0.
Modem configuration written to /etc/wvdial.conf.
ttyUSB0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2"
ttyUSB1<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2"

PIN

Huawei E220 uses a standard 6 PIN SIM card interface.

If you enter wrong PIN codes three times consecutively, your USIM/SIM card is blocked. In this case, use the PIN Unblocking Key (PUK) code to unblock it. If you enter wrong PUK codes ten times consecutively, your USIM/SIM card is disabled. In this case, contact your service provider.

To avoid this, remove the PIN code verification from the SIM card. Place it on a cellphone and disable it.

You can also use in your initialization script:

AT+CPIN="0000"

On some modems, this can only be sent once per power-on, so you might need to send it using minicom rather than in wvdial's init script

/etc/wvdial.conf

You cannot modify and save wvdial.conf if you are using the Ubuntu Live CD, but it can be modified by the

You can see the content of the wvdial.conf file using:

sudo  gedit  /etc/wvdial.conf

or clicking in the file icon and selecting "display" (i.e. in Nautilus file manager).

For avanced users: you can see more details about the wvdial.conf file for Huawei E220 here

Example 1

This example was obtained using Ubuntu Live CD and "wvdialconf /etc/wvdial.conf".

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Modem Type = Analog Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
; Phone = <Target Phone Number>
; Password = <Your Password>
; Username = <Your Login Name>

Delete the ";" and fill the phone, password and usename as necessary.

GPRS / HDSPA numbers will always include * or # (star or hash) signs, such as "*99***1#".

Example 2

Examples 2 and 3 was obtained from the Internet.

[Dialer hsdpa]
Phone = *99***1#
Username = vodafone
Password = vodafone
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 = AT+CGDCONT=1,"IP","ac.vodafone.es";

Example 3

# wvdial for Vodacom Data. Created by Tazz_tux
# Version 1.0

# Change Log:
#
# Added support for HSDPA.
# Added Headers and version control.

[Dialer Defaults]
Phone = *99***1#
Username = username
Password = password
Stupid Mode = 1
Dial Command = ATDT

[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem

Dialing to connect

In a terminal, enter

 wvdial hsdpa

in example 1

and

 wvdial hsdpa

in examples 2 and 3.

You should be happily connected.

Upon connection, it will spit out some information about your connection (local IP, remote IP, DNS address, etc.).

Do not close the terminal where wvdial is running. Leave it alone until you want the connection to be terminated, and hit CTRL+C on that terminal once you want to end the connection.

More in wvdial.

See also


CategoryUsb CategoryNetworking

DialupModemHowto/Huawei/E220 (last edited 2008-11-25 09:29:40 by salutis)