Frequently Asked Questions for FreeBSD 2.X : Networking : I can't make ppp work. What am I doing wrong ? : Ppp ignores the `\' character in my chat script
Previous: Why doesn't ppp log my connection speed?
Next: Ppp gets a seg-fault, but I see no ppp.core file

10.7.18. Ppp ignores the `\' character in my chat script

Ppp parses each line in your config files so that it can interpret strings such as set phone "123 456 789" correctly (and realize that the number is actually only one argument. In order to specify a ``"'' character, you must escape it using a backslash (``\'').

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.

If you wish to actually send a ``\'' character to (say) your modem, you'd need something like:

          set dial "\"\" ATZ OK-ATZ-OK AT\\\\X OK"
        

resulting in the following sequence:

          ATZ
          OK
          AT\X
          OK
        

or

          set phone 1234567
          set dial "\"\" ATZ OK ATDT\\T"
        

resulting in the following sequence:

          ATZ
          OK
          ATDT1234567
        


Frequently Asked Questions for FreeBSD 2.X : Networking : I can't make ppp work. What am I doing wrong ? : Ppp ignores the `\' character in my chat script
Previous: Why doesn't ppp log my connection speed?
Next: Ppp gets a seg-fault, but I see no ppp.core file