# ppp exiting



## balanga (Feb 20, 2018)

When running `ppp -ddial internet`

ppp keeps redialing every 30 secs. How do I make it exit if it does not connect?


----------



## PacketMan (Feb 20, 2018)

Check your ppp configuration, review the various options, etc, and try to figure it out.  ppp is dial technology and if (a) the other end does not answer, or is busy, and (b) the end-to-end ppp handshaking stuff is not right, then it will not connect successfully. Thus, if (c) your ppp configuration is set to redial then well, at least your (c) part is working right.   And don;'t ask me to help you troubleshoot it any further.  PPP is almost as old as I am, and I have moved on.  lol


----------



## balanga (Feb 20, 2018)

I had ppp working on OS/2 25 years ago, and haven't really bothered with it since, but I need to get it working to be able to use my Huawei E3372 4G dongle...

The log does not give much away

```
Feb 20 11:08:51 FreeBSD newsyslog[609]: logfile first created
Feb 20 11:09:58 FreeBSD ppp[852]: Phase: Using interface: tun0
Feb 20 11:09:58 FreeBSD ppp[852]: Phase: deflink: Created in closed state
Feb 20 11:09:58 FreeBSD ppp[854]: Phase: PPP Started (ddial mode).
Feb 20 11:09:58 FreeBSD ppp[854]: Phase: bundle: Establish
Feb 20 11:09:58 FreeBSD ppp[854]: Phase: deflink: closed -> opening
Feb 20 11:09:58 FreeBSD ppp[854]: Warning: deflink: /dev/cuaU0.0: Bad file descriptor
Feb 20 11:09:58 FreeBSD ppp[854]: Phase: deflink: Enter pause (30) for redialing.
Feb 20 11:10:28 FreeBSD ppp[854]: Warning: deflink: /dev/cuaU0.0: Bad file descriptor
Feb 20 11:10:28 FreeBSD ppp[854]: Phase: deflink: Enter pause (30) for redialing.
Feb 20 11:10:58 FreeBSD ppp[854]: Warning: deflink: /dev/cuaU0.0: Bad file descriptor
Feb 20 11:10:58 FreeBSD ppp[854]: Phase: deflink: Enter pause (30) for redialing.
```
And the same  continues every 30secs.
I expected a much more verbose log.


/etc/ppp/ppp.conf:-

```
default:
# set log local Phase Chat Connect LCP IPC CCP CBCP tun command
 set log local Phase Chat Connect LCP IPCP CCP CBCP tun command
# set log  all
 ident user-ppp VERSION

 # Ensure that "device" references the correct serial port
 # for your modem. (cuau0 = COM1, cuau1 = COM2)
 #

internet:
        enable echo
        set device /dev/cuaU0.0
        set timeout 0
        set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
        \"\" \
        AT OK-AT-OK \
        AT+CPIN="" OK-AT-OK \
        ATH OK-AT-OK \
        ATE1 OK-AT-OK \
        AT+CGDCONT=1,\\\"IP\\\",\\\"3\\\" OK \
        \\dATDT*99\# TIMEOUT 40 CONNECT"
        set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
#        add default HISADDR
```


----------

