Add an explaination of how to escape things in ppps chat script.
This commit is contained in:
parent
7063492dd6
commit
37d9a91e0f
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=2263
1 changed files with 47 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
<!-- $Id: network.sgml,v 1.3 1997-12-14 22:20:38 alex Exp $ -->
|
||||
<!-- $Id: network.sgml,v 1.4 1997-12-15 23:38:10 brian Exp $ -->
|
||||
<!-- The FreeBSD Documentation Project -->
|
||||
|
||||
<sect>
|
||||
|
@ -522,6 +522,52 @@ default 10.0.0.2 UGSc 0 0 tun0
|
|||
<p>Here, we get our CONNECT, send nothing, then expect a line-feed,
|
||||
forcing <bf/ppp/ to read the whole CONNECT response.
|
||||
|
||||
<sect2>
|
||||
<heading>Ppp ignores the `\' character in my chat script</heading>
|
||||
|
||||
<p>Ppp parses each line in your config files so that it can
|
||||
interpret strings such as <tt/set phone "123 456 789"/ correctly
|
||||
(and realize that the number is actually only <bf/one/ argument.
|
||||
In order to specify a ``"'' character, you must escape it using
|
||||
a backslash (``\'').
|
||||
|
||||
<p>When the chat interpreter parses each argument, it re-interprets
|
||||
the argument in order to find any special escape sequences such
|
||||
as ``\P'' or ``\T'' (see the man page). As a result of this
|
||||
double-parsing, you must remember to use the correct number of
|
||||
escapes.
|
||||
|
||||
<p>If you wish to actually send a ``\'' character to (say) your
|
||||
modem, you'd need something like:
|
||||
|
||||
<verb>
|
||||
set dial "\"\" ATZ OK-ATZ-OK AT\\\\X OK"
|
||||
</verb>
|
||||
|
||||
<p>resulting in the following sequence:
|
||||
|
||||
<verb>
|
||||
ATZ
|
||||
OK
|
||||
AT\X
|
||||
OK
|
||||
</verb>
|
||||
|
||||
<p>or
|
||||
|
||||
<verb>
|
||||
set phone 1234567
|
||||
set dial "\"\" ATZ OK ATDT\\T"
|
||||
</verb>
|
||||
|
||||
<p>resulting in the following sequence:
|
||||
|
||||
<verb>
|
||||
ATZ
|
||||
OK
|
||||
ATDT1234567
|
||||
</verb>
|
||||
|
||||
<sect2>
|
||||
<heading>None of this helps - I'm desperate !</heading>
|
||||
|
||||
|
|
Loading…
Reference in a new issue