SuSE Support Database

Title: PPP: adjusting the chat script

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

PPP: adjusting the chat script

This text should be understood as an extension to the handbook, chapter 14.2 Establishing a connection to a PPP server.

Symptom:

The chat script, supplied as an example does not work.

Cause:

The chat script /etc/ppp/ppp.chat must of course be always adjusted. Along with the login name and password often changes the complete login sequence itself. Sometimes one must push return here, sometimes increase the time out there. In some occasions the PPP protocol must be started by a corresponding order, e.g. tia -ppp, while on the remote station. All this cannot be described generally.

The general procedure for adjusting the chat script

The login process is comparable (if no special authentication on PAP, CHAP, etc. is executed) with a normal terminal login, only that this otherwise manual process takes place through the chat script.

And so, one gets down into the thing as follows:

Another couple of explanations for chat.

In the first sequence

	TIMEOUT 5
	ABORT "NO CARRIER"
	ABORT BUSY
	ABORT "NO DIALTONE"
	ABORT ERROR
chat is initialized. The TIMEOUT must be in some ocasions increased, e.g. to 60.

With the ABORT commands is declared, by which modem's return messages the script should be finished.

In the following lines is always proceeded with the following logic: the first parameter (up to the first blank) declares, what should be waited for. If this string is sent by the modem, the rest of the line is sent to the modem.

	"" +++ATZ
Here no string is waited for, so the modem initialises inmediately. This depends on which modem you have and wich profile is saved. Usually profile 0 is loaded with ATZ (as direct after the switching on). Here you must possibly enter something different. Compare this if necessary with your DOS/Windows software.

Now is dialled and the login sequence executed, e.g.:

	OK ATDT
	CONNECT ""
	ogin:--ogin: 
	word: 
Where you of course replace number, login and passwd.

Notice that here in this e.g.: is only looked for word, so it could be sent either Password, password or Jokeword.

The line

	ogin:--ogin: 
should be flexible enough, so here, if the first string (ogin) is not found, a return is sent and afterwards is waited once more for ogin.

You will find further information and examples for it by

	man chat
There you will find the motivating hint too: In actual practice, simple scripts are rare.

Important: The entire chat script cannot contain any empty line, any blanks at the beginning of the line and any comments.

Test now the connection with the command /etc/ppp/ppp-up. The error messages, that are created e.g. by the chat script, are not readable on the screen, but are protocoled in /var/log/messages. Full of sense is to run on a second console a

 
tail -f /var/log/messages /var/log/warn
so one notices inmediately when there are important messages to be noticed.

Tip: Save the working script. To most of the people I know is no fun at all to write such a script, so once more the call: Send us your script with the description of the corresponding provider, Uni, etc., but without password!

Hint: From S.u.S.E. Linux 4.3 on, Roderich Kluemke's alternative (very comfortable!) dialling scripts are located in the directory /usr/doc/inetcfg/ppp2.

---

See also:

---

Keywords: PPP, CHAT, CIS, MODEM, LOGIN IN, LOGIN

---

Feedback welcome: Send Mail to kfr@suse.de (Please give the following subject: SDB-ppp)

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

SDB-ppp, Copyright SuSE GmbH, Nuremberg, Germany - Version:
Impressum - Last generated: 24. Feb 1999 15:18:21 by maddin with sdb_gen 1.00.0