*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
PPP: Chat script failed (FreeBSD 8.0)
This is my /etc/ppp/ppp.conf:
Code:
#################################################################
# PPP Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by wself@cdrom.com
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD: src/etc/ppp/ppp.conf,v 1.11.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
#################################################################
default:
set log Phase Chat LCP IPCP CCP tun command +connect
ident user-ppp VERSION (built COMPILATIONDATE)
n24:
# Ensure that "device" references the correct serial port
# for your modem. (cuau0 = COM1, cuau1 = COM2)
#
set device /dev/cuaU0.1
set speed 460800
set phone *99***1\#
set authname me
set authkey "my password"
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" \
AT OK-AT-OK \
AT+CFUN=1 OK-AT-OK \
AT+CSQ OK \
AT+CGDCONT=1,\\\"IP\\\",\\\"internet.mobilcom\\\" OK \
AT+CGACT? OK-AT-OK \
AT+CGATT? OK \
AT+COPS? OK \
ATD*99***1\# CONNECT \
# ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
set timeout 180 # 3 minute idle timer (the default)
enable dns # request DNS info (for resolv.conf)
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
set vj slotcomp off
set crtscts on
add default HISADDR # Add a (sticky) default route
After typing "ppp n24" I get these messages in /var/log/ppp.log:
Code:
Feb 10 12:15:27 ppp[992]: Phase: Using interface: tun0
Feb 10 12:15:27 ppp[992]: Phase: deflink: Created in closed state
Feb 10 12:15:27 ppp[992]: tun0: Command: default: ident user-ppp VERSION (built COMPILATIONDATE)
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set device /dev/cuaU0.0
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set speed 460800
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set phone *99***1#
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set authname surfO2
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set authkey ********
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set dial ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5 "" AT OK-AT-OK AT+CFUN=1 OK-AT-OK AT+CSQ OK AT+CGDCONT=1,\"IP\",\"internet.mobilcom\" OK AT+CGACT? OK-AT-OK AT+CGATT? OK AT+COPS? OK ATD*99***1# CONNECT # ATE1Q0 OK \dATDT\T TIMEOUT 40 CONNECT
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set timeout 180
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: enable dns
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: set crtscts on
Feb 10 12:15:27 ppp[992]: tun0: Command: n24: add default HISADDR
Feb 10 12:15:27 ppp[992]: tun0: Phase: PPP Started (interactive mode).
Feb 10 12:15:31 ppp[992]: tun0: Command: /dev/ttyv2: dial
Feb 10 12:15:31 ppp[992]: tun0: Phase: bundle: Establish
Feb 10 12:15:31 ppp[992]: tun0: Phase: deflink: closed -> opening
Feb 10 12:15:31 ppp[992]: tun0: Phase: deflink: Connected!
Feb 10 12:15:31 ppp[992]: tun0: Phase: deflink: opening -> dial
Feb 10 12:15:31 ppp[992]: tun0: Chat: Phone: *99***1#
Feb 10 12:15:31 ppp[992]: tun0: Chat: deflink: Dial attempt 1 of 1
Feb 10 12:15:31 ppp[992]: tun0: Chat: Send: AT^M
Feb 10 12:15:31 ppp[992]: tun0: Chat: Expect(5): OK
Feb 10 12:15:36 ppp[992]: tun0: Chat: Expect timeout
Feb 10 12:15:36 ppp[992]: tun0: Chat: Send: AT^M
Feb 10 12:15:36 ppp[992]: tun0: Chat: Expect(5): OK
Feb 10 12:15:41 ppp[992]: tun0: Chat: Expect timeout
Feb 10 12:15:41 ppp[992]: tun0: Warning: Chat script failed
Feb 10 12:15:41 ppp[992]: tun0: Phase: deflink: dial -> hangup
Feb 10 12:15:41 ppp[992]: tun0: Phase: deflink: Disconnected!
Feb 10 12:15:41 ppp[992]: tun0: Phase: deflink: Connect time: 10 secs: 0 octets in, 0 octets out
Feb 10 12:15:41 ppp[992]: tun0: Phase: deflink: 0 packets in, 0 packets out
Feb 10 12:15:41 ppp[992]: tun0: Phase: total 0 bytes/sec, peak 0 bytes/sec on Wed Feb 10 12:15:31 2010
Feb 10 12:15:41 ppp[992]: tun0: Phase: deflink: hangup -> closed
Feb 10 12:15:41 ppp[992]: tun0: Phase: bundle: Dead
Feb 10 12:15:53 ppp[992]: tun0: Command: /dev/ttyv2: quit
Feb 10 12:15:53 ppp[992]: tun0: Phase: PPP Terminated (normal).
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally Posted by David1357
Try removing the trailing "\" there or even the entire string "\# CONNECT \".
Removing only the trailing "\" gives an error (as I understand it, the "\" only masks the <CR> at the end of the line). The same happens, when I execute your second suggestion.
Removing "# CONNECT \" (while keeping the trailing "\") lets ppp run but I still get the complaint of "Warning: Chat Script failed".
ATD*99***1\# CONNECT \
# ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
Can anybody explain what goes wrong here?
It looks like you are missing the closing double quote due to the last line of "set dial" being commented out. Try putting the closing double quote at the end the problematic line.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally Posted by David1357
It looks like you receive an unexpected response here.
Indeed. That comes from the blasted stick. When you look at the preceeding output you'll notice that a bunch of those signals(?) came right after starting dialing. Normally ppp simply ignores this (as far as I can tell).
It has the same quirk under linux as well, but there I can at least connect.
Quote:
Originally Posted by David1357
Later, it looks like a "quit" request is sent, but I don't know why.
That was me at the terminal. When nothing happened anymore I quit ppp.
What log would that be? I assumed the same log structure as in FreeBSD (/var/log/ppp.log) but that doesn't exist. What would you need?
You may have to start the PPP daemon with a special switch (my man pages mention a "logfile" option) to get it to send debug output to "/var/log/pppd.log".
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
This gets started by smpppd on SuSE systems. The *BSD ppp.conf where I could switch on logging doesn't exist *grrr*. I'll do further digging and will come back after the easter holidays.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Thanks, the second "german" link was quite usable but indepently I found this: Yesterday in the very late evening I stumbled upon /etc/ppp/options. I activated there "debug" the output of which will be written to /var/log/messages. As soon as I have run a session with a connection I'll post the results here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.