Connecting to the Internet with a 3G USB Modem

0

I am trying to establish a connection to the Internet with wvdial. Everything is alright but the problem is I can't ping for example google.ca or its IP address.

Here is the output of the wvdial command:

WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.com,wapuser1,wap"
AT+CGDCONT=1,"IP","internet.com,wapuser1,wap"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT 21096000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Sat Jan  1 05:11:06 2000
--> Pid of pppd: 3297
--> Using interface ppp0
--> pppd: ([07][08]@[07][08][08][07][08]
--> pppd: ([07][08]@[07][08][08][07][08]
--> pppd: ([07][08]@[07][08][08][07][08]
--> pppd: ([07][08]@[07][08][08][07][08]
--> local  IP address 172.19.154.90
--> pppd: ([07][08]@[07][08][08][07][08]
--> remote IP address 10.0.0.1
--> pppd: ([07][08]@[07][08][08][07][08]
--> primary   DNS address 64.71.255.198
--> pppd: ([07][08]@[07][08][08][07][08]
--> secondary DNS address 64.71.255.253
--> pppd: ([07][08]@[07][08][08][07][08]

As you can see, I can clearly get an IP, and typing ifconfig ppp0 displays this:

ppp0      Link encap:Point-to-Point Protocol
          inet addr:172.19.27.135  P-t-P:10.0.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:74 (74.0 B)  TX bytes:107 (107.0 B)

But can't ping anything.

So I know it's not a matter of /etc/resolv.conf.

Here is the contents of my wvdial.conf:

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","internet.com,wapuser1,wap"
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyACM0
Username = wapuser1
Password = wap
Baud = 460800
Stupid Mode = 1

How can I get this setup to work?

ip addr show:

9: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
link/ppp inet 172.16.29.33 peer 10.0.0.1/32 scope global ppp0

ip route show:

default dev ppp0 scope link 10.0.0.1 dev ppp0 proto kernel scope link src 172.16.61.19

gimpycpu

Posted 2011-12-06T21:52:36.040

Reputation: 181

1You will probably also need to include the output of ip addr show and ip route show. If ping(1) doesn't work, how about non-ICMP packet types? UDP or TCP? – sarnold – 2011-12-06T21:59:53.630

`9: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast st ate UNKNOWN qlen 3 link/ppp inet 172.16.29.33 peer 10.0.0.1/32 scope global ppp0

and

ip route show default dev ppp0 scope link 10.0.0.1 dev ppp0 proto kernel scope link src 172.16.61.19` – gimpycpu – 2011-12-07T15:51:44.423

Answers

1

I was facing the same problem yesterday. Got it to work today. Check the answer to this question.

https://raspberrypi.stackexchange.com/questions/62417/connected-to-internet-on-ppp0-in-raspberry-pi-3-but-commands-like-ping-curl-not

You need to check if you're able to connect to internet through the ppp0 interface. Enter the following command and check the output ping -I ppp0 google.com. If you're able to ping, then your device is connected to the internet.

Then, you can run the command sudo route add default dev ppp0 to gain internet access.

Rahul Parida

Posted 2011-12-06T21:52:36.040

Reputation: 11