Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

i want to establish a ppp link to a GSM provider with my cell phone modem. The modem gets recognized and I can send AT commands just fine but I can not get the connection established. My chat script looks like:

#######################################
SAY 'Setting the abort string\n'
SAY '\n'
# Abort String ------------------------------
ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT 'NO CARRIER' ABORT DELAYED

#######################################
SAY 'Initializing modem\n'
# Modem Initialization
'' AT
OK ATZ

#######################################
SAY '\n'
SAY     'Setting APN\n'
# Access Point Name (APN)
# Incorrect APN or CGDCONT can often cause errors in connection.
# Below are a bunch of different popular APNs

#REG:\s1 AT+cgdcont=1,"IP","proxy"
#OK     'AT+CGDCONT=0,"IP","proxy"'
#OK     'AT+CGDCONT=1,"IP","proxy"'
#OK     'AT+CGDCONT=2,"IP","proxy"'
OK     'AT+CGDCONT=1,"IP","m2mstatic.apn"'
#OK     'AT+CGDCONT=1,"IP","ISP.TELUS.COM"'
#OK     'AT+CGDCONT=1,"IP","INTERNET.COM"'
#OK     'AT+CGDCONT=1,"IP","ISP.CINGULAR"'
#OK     'AT+CGDCONT=2,"IP","ISP.CINGULAR"'
   ""

and in /var/log/messages I get the following messages:

Jan 11 04:08:49 ariag25 pppd[2518]: pppd 2.4.5 started by root, uid 0
Jan 11 04:08:50 ariag25 chat[2520]: abort on (NO DIAL TONE)
Jan 11 04:08:50 ariag25 chat[2520]: abort on (NO ANSWER)
Jan 11 04:08:50 ariag25 chat[2520]: abort on (NO CARRIER)
Jan 11 04:08:50 ariag25 chat[2520]: abort on (DELAYED)
Jan 11 04:08:50 ariag25 chat[2520]: send (AT^M)
Jan 11 04:08:50 ariag25 chat[2520]: expect (OK)
Jan 11 04:08:50 ariag25 chat[2520]: AT^M^M
Jan 11 04:08:50 ariag25 chat[2520]: OK
Jan 11 04:08:50 ariag25 chat[2520]:  -- got it
Jan 11 04:08:50 ariag25 chat[2520]: send (ATZ^M)
Jan 11 04:08:51 ariag25 chat[2520]: expect (OK)
Jan 11 04:08:51 ariag25 chat[2520]: ^M
Jan 11 04:08:51 ariag25 chat[2520]: ATZ^M^M
Jan 11 04:08:51 ariag25 chat[2520]: OK
Jan 11 04:08:51 ariag25 chat[2520]:  -- got it
Jan 11 04:08:51 ariag25 chat[2520]: send (AT+CGDCONT=1,"IP","m2mstatic.apn"^M)
Jan 11 04:08:51 ariag25 chat[2520]: expect (OK)
Jan 11 04:08:51 ariag25 chat[2520]: ^M
Jan 11 04:08:51 ariag25 chat[2520]: AT+CGDCONT=1,"IP","m2mstatic.apn"^M^M
Jan 11 04:08:51 ariag25 chat[2520]: OK
Jan 11 04:08:51 ariag25 chat[2520]:  -- got it
Jan 11 04:08:51 ariag25 chat[2520]: send (ATDT*99#^M)
Jan 11 04:08:51 ariag25 chat[2520]: expect (CONNECT)
Jan 11 04:08:51 ariag25 chat[2520]: ^M
Jan 11 04:08:51 ariag25 chat[2520]: ATDT*99#^M^M
Jan 11 04:08:51 ariag25 chat[2520]: CONNECT
Jan 11 04:08:51 ariag25 chat[2520]:  -- got it
Jan 11 04:08:51 ariag25 chat[2520]: send (^M)
Jan 11 04:08:51 ariag25 pppd[2518]: Serial connection established.

edit

I don't think things are wrong with my chat script but my modem instead. notice that on the bottom of the messages, the context switched from chat to pppd - why is that? May my power supply be too weak? That's what I suspect now.. any ideas?

Also, if I do a killall pppd after this and try to connect with screen screen /dev/modem 9600 the modem doesn't reply anymore until I power cycle it...

However, I'm surprised! I hooked it up to a 2.1A USB power supply...

edit2

My /etc/ppp/options looks like:

debug
/dev/ttyUSB1
9600
modem
crtscts
lock
connect /etc/ppp/net-connect
asyncmap 0
defaultroute

and /etc/ppp/peers/provider like this:

connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T *99***1#"

# Serial device to which the modem is connected.
/dev/modem

# Speed of the serial line.
9600

# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
defaultroute

# Makes pppd "dial again" when the connection is lost.
persist

# Do not ask the remote to authenticate.
noauth
share|improve this question
    
Stuck with the same kind of problem. In my case, pppd doesn't establish the network interface. Try dhclient ppp0. –  M Noit Jan 7 at 7:48
1  
What is your pppd configuration? –  yegorich Jan 7 at 8:25
    
I don't think that's an issue with pppd showing up in your logs. Rather chat has done its job and is handing off control to pppd to get an IP address. I'd look to your pppd setup. It's probably getting hung up, and needs to be configured so that it can get an IP and set up your network connection properly. –  slm Jan 7 at 9:25
    
This guide might be of some help in working through your pppd issues: linuxjournal.com/article/2109 –  slm Jan 7 at 9:39
    
@yegorich please see my ppp config above under edit2 –  cerr Jan 8 at 6:20

1 Answer 1

Something is misconfigured with your pppd setup. If things are working correctly you should see messages from pppd in your logs similar to this:

Oct  5 12:37:35 localhost pppd[1289]: Serial connection established.
Oct  5 12:37:35 localhost pppd[1289]: Using interface ppp0
Oct  5 12:37:35 localhost pppd[1289]: Connect: ppp0 <--> /dev/ttyS1
Oct  5 12:37:36 localhost pppd[1289]: Remote message: Welcome!
Oct  5 12:37:36 localhost pppd[1289]: PAP authentication succeeded
Oct  5 12:37:40 localhost pppd[1289]: local  IP address 109.112.53.134
Oct  5 12:37:40 localhost pppd[1289]: remote IP address 109.112.235.129
Oct  5 12:37:40 localhost pppd[1289]: primary   DNS address 83.224.66.134
Oct  5 12:37:40 localhost pppd[1289]: secondary DNS address 83.224.65.134

References

share|improve this answer
    
Well, I don't, see edit 2 for my ppp config above –  cerr Jan 10 at 4:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.