You are not logged in.

#1 2009-01-19 04:25:41

Thoht
Member
From: Sweden
Registered: 2008-02-02
Posts: 75

Struggling to connect by Huawei E220 3G modem

Hey there!

I got one of those 3G modems that are quite common still where I live. Now I had it up and running perfectly fine in Ubuntu thanks to the sorcery of NetworkManager Applet 0.7.0.

I followed the instructions in the Arch wiki, but as connect I get the following output:

thoht@wind: huawei-e220> sudo wvdial hsdpa
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Mon Jan 19 04:54:31 2009
--> Pid of pppd: 2836
--> Using interface ppp0
--> local  IP address 212.27.2.61
--> remote IP address 10.64.64.64
--> primary   DNS address 80.251.192.244
--> secondary DNS address 80.251.192.245

...but if I try to ping anything or visit a website in my browser, nada.

This is the ifconfig output while "connected":

thoht@wind: ~> ifconfig
eth0      Link encap:Ethernet  HWaddr 00:21:85:55:D1:5B  
          inet addr:192.168.0.103  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::221:85ff:fe55:d15b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23240 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18759 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:33680061 (32.1 Mb)  TX bytes:1350401 (1.2 Mb)
          Interrupt:253 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:88 errors:0 dropped:0 overruns:0 frame:0
          TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5909 (5.7 Kb)  TX bytes:5909 (5.7 Kb)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:79.138.162.21  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:90 (90.0 b)  TX bytes:129 (129.0 b)

This is my /etc/resolv.conf:

thoht@wind: ~> cat /etc/resolv.conf 
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
search serva.net
nameserver 192.168.0.1
# /etc/resolv.conf.tail can replace this line

I tried putting this here instead but without success, however I think it's crucial that I put this somewhere:

search bredband.tre.se
nameserver 80.251.201.177
nameserver 80.251.201.178

In Ubuntu NetworkManager automagically put this stuf in /etc/resolv.conf for me, but it doesn't seem to make a difference here?

Well then there's of course the /etc/wvdial.conf file:

thoht@ratatosk: ~> cat /etc/wvdial.conf
[Dialer hsdpa]
Phone = *99#
Username = foo
Password = blargh
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem

If I leave username and password empty the program gets pissed, but I don't actually have a username, nor PIN (activated).

Any ideas? Thanks in advance.


Credit to KiwiesRuleXD @ DeviantArt for the avatar.

Offline

#2 2009-01-19 10:34:32

Envil
Member
Registered: 2008-11-18
Posts: 52

Re: Struggling to connect by Huawei E220 3G modem

Are you sure about having no username/password? Most/All providers use default passwords for this, you just dont have to enter one in NetworkManager since it contains a list of most providers + their passwords already.
Also you usually need some init string for your provider for example "at+cgdcont=1,"ip","internet.eplus.de"" for mine. Maybe try looking in the NetworkManager config since all that data should be around there somewhere.
As for connecting i used umtsmon for that which worked pretty much fine in the past smile

http://umtsmon.sourceforge.net

Offline

#3 2009-01-19 11:00:05

Envil
Member
Registered: 2008-11-18
Posts: 52

Re: Struggling to connect by Huawei E220 3G modem

Heres a wvdial.conf which i justed tested (and use to post this message =P)
the wvdial output is pretty much the same as yours, it stops after the dns servers but the connection works.
To test it just open another terminal and try to ping your dns server, you may have to manually add it to resolv.conf to actually resolv anything.

[Dialer Defaults]
Modem = /dev/ttyUSB0
ISDN = off
Modem Type = Analog Modem
Baud = 9600
Init = ATZ
Init2 = at+cgdcont=1,"ip","internet.eplus.de"
Init3 =
Init4 =
Init5 =
Init6 =
Init7 =
Init8 =
Init9 =
Phone = *99#
Phone1 =
Phone2 =
Phone3 =
Phone4 =
Dial Prefix =
Dial Attempts = 1
Dial Command = ATM0L0DT
Ask Password = off
Password = gprs
Username = eplus
Auto Reconnect = on
Abort on Busy = off
Carrier Check = off
Check Def Route = off
Abort on No Dialtone = off
Stupid Mode = on
Idle Seconds = 0
Auto DNS = on
;Minimize = on
;Dock = on

Offline

#4 2009-01-19 13:25:58

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Struggling to connect by Huawei E220 3G modem

two things:

1. You need to force the GPRS/WCDMA/HSDPA/(whatever technology) connection in order to avoid timeouts, to be able to get a valid dns through ppp/wvdial.

at+cgatt=1

It took me ages to find this one. I was one of those who used to modify /etc/resolv.conf by demand, by using an external script.

2. You need an APN string identifier. For instance, I'm using movistar on Chile, so the AT's APN string is:

at+cgdcont=1,"IP","web.tmovil.cl","",0,0

Don't ever think on conmutting these commands. Init your modem with wvdial's standard strings and add those ones at the end, *in this very same order*.

Last edited by kjon (2009-01-19 13:28:08)


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#5 2009-01-19 23:58:57

mcover
Member
From: Germany
Registered: 2007-01-25
Posts: 134

Re: Struggling to connect by Huawei E220 3G modem

About your resolv.conf copy/pasting - /etc/ppp/resolv.conf and ip-up:

http://bbs.archlinux.org/viewtopic.php?id=62520
http://bbs.archlinux.org/viewtopic.php?id=62004

I think its time for me to add that to the wiki... if its not already there.

Thou I don't know if it solves your problem in this case, since you said you edited the resolv.conf.

EDIT: Posted too fast again. I just saw this

--> primary   DNS address 80.251.192.244
--> secondary DNS address 80.251.192.245
search bredband.tre.se
nameserver 80.251.201.177
nameserver 80.251.201.178

Same? Purposely put different DNS? /etc/ppp/resolv.conf wink

Last edited by mcover (2009-01-20 00:01:22)

Offline

#6 2009-01-20 01:37:12

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Struggling to connect by Huawei E220 3G modem

Also check your default route... Since your DNS server are/were being set wrong in resolv.conf, it's possible that your default route is also wrong:

route -n

Offline

Board footer

Powered by FluxBB