Chapter 156. Installing and Configuring PPP

156.1. Including PPP in a Configuration

PPP is contained entirely within a single eCos package. So to include PPP in a configuration all you need to do is add that package.

In the GUI configuration tool use the Build->Packages menu item, find the "PPP Support" package in the left-hand pane and use the Add button to add it to the list of packages in use in the right-hand pane.

In the command-line tool ecosconfig, you can use the following command during the configuration phase to add the PPP package:

$ ecosconfig add ppp

In addition to the PPP package you will also need to have the "Network" package and the "Serial Device Drivers" package in the configuration. The dependencies and requirements of the networking package are such that it is strongly recommended that you start with the net template.

See the eCos User Guide for full details on how to configure and build eCos.

156.2. Configuring PPP

The PPP package contains a number of configuration options that may be changed to affect its behaviour.

CYGNUM_PPP_PPPD_THREAD_PRIORITY

The PPP system contains two threads, One is used for receiving data from the link and processing control packets. The other is used to transmit data asynchronously to the link when it cannot be completed synchronously. The receive thread runs at the priority given here, and the transmit thread runs at the next lower priority. The exact priority needed here depends on the importance of the PPP subsystem relative to the rest of the system. The default is to put it in the middle of the priority range to provide reasonable response without impacting genuine high priority threads.

Default value: CYGNUM_KERNEL_SCHED_PRIORITIES/2

CYGPKG_PPP_DEBUG_WARN_ONLY

The runtime debug option enables logging of high level debug messages. Too many of these can interfere with the PPP device and may result in missed messages. This is because these messages are emitted via the diag_printf() mechanism, which disables interrupts while it prints. By default, therefore, we only report errors and warnings, and not all events. Setting this option to zero will enable the logging of all events.

Default value: 1

CYGPKG_PPP_AUTH_DEFAULT_USER

This option gives the default value for the user name used to initialize the user field in the PPP options.

Default value: "eCos"

CYGPKG_PPP_AUTH_DEFAULT_PASSWD

This option gives the default value for the password used to initialize the passwd field in the PPP options.

Default value: "secret"

CYGPKG_PPP_DEFAULT_DIALUP_NUMBER

This option provides a default dialup number for use in chat scripts. This value is not used anywhere in the PPP package, but is provided to complete the information needed, alongside the user name and password, for accessing a typical dialup server.

Default value: "5551234"

CYGPKG_PPP_PAP

This component enables the inclusion of PAP authentication support.

Default value: 1

CYGPKG_PPP_CHAP

This component enables the inclusion of CHAT authentication support.

Default value: 1

CYGPKG_PPP_COMPRESSION

This component provides control over PPP compression features. WARNING: at present there are problems with this option, and and in any case the compression code needs to allocate large amounts of memory. Hence this option is currently disabled and should remain so.

Default value: 0

PPP_BSDCOMP

This option enables inclusion of BSD compression into the PPP protocol.

Default value: 0

PPP_DEFLATE

This option enables inclusion of ZLIB compression into the PPP protocol.

Default value: 0

CYGPKG_PPP_CHAT

This component enables the inclusion of a simple scripting system to bring up PPP connections. It implements a subset of the chat scripting language.

Default value: 1

CYGNUM_PPP_CHAT_ABORTS_MAX

This option defines the maximum number of ABORT strings that the CHAT system will store.

Default value: 10

CYGNUM_PPP_CHAT_ABORTS_SIZE

This option defines the maximum size of each ABORT strings that the chat system will store.

Default value: 20

CYGNUM_PPP_CHAT_STRING_LENGTH

This option defines the maximum size of any expect or reply strings that the chat system will be given.

Default value: 256

CYGPKG_PPP_TEST_DEVICE

This option defines the serial device to be used for PPP test programs.

Default value: "/dev/ser0"

CYGPKG_PPP_TESTS_AUTOMATE

This option enables automated testing features in certain test programs. These programs will interact with a test server at the remote end of the serial link to run a variety of tests in different conditions. Without this option most tests default to running a single test instance and are suitable for being run by hand for debugging purposes.

Default value: 0

CYGDAT_PPP_TEST_BAUD_RATES

This option supplies a list of baud rates at which certain tests will run if the CYGPKG_PPP_TESTS_AUTOMATE option is set.

Default value: "CYGNUM_SERIAL_BAUD_19200, CYGNUM_SERIAL_BAUD_38400, CYGNUM_SERIAL_BAUD_57600, CYGNUM_SERIAL_BAUD_115200"