Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



How to use incoming PPP

This document explains the networking setup that allows a phone to receive an incoming IP connection using PPP.

This functionality is primarily intended to enable the phone to be used by the PC as a gateway to the Internet. The expected scenario is as follows:

The following diagram shows the components involved:

Incoming PPP

Incoming PPP

Note that:

The rest of this document describes the:


Phone set up

For incoming PPP, a phone requires configuration in two places:


CommDb configuration

A record must be created in the CommDb database's Dial Out ISP table to handle incoming connections. The settings are as follows:

Enable incoming PPP

The ISP_IF_SERVER_MODE field must be set to true. Functionality to handle incoming PPP is disabled when this field is false.

IP address

In incoming PPP, the phone assigns a static IP address to the client PC. This address should be in the private IP address range (e.g. from the 192.168.0.0 - 192.168.255.255 range). Set the address in the ISP_IP_GATEWAY field. This address will always be given to the client: if the client suggests a different IP address, it is refused with a negative acknowledgement (NAK).

The phone must also specify its own IP address. This can be set statically in the ISP_IP_ADDR field. The ISP_IP_ADDR_FROM_SERVER field must be set to false.

DNS address

For a client to have access to Domain Name Services (DNS), the phone must provide primary and secondary DNS server addresses to the client. These addresses are not normally statically set, but obtained and set dynamically by the Incoming PPP launcher application in the ISP_IP_NAME_SERVER1 and ISP_IP_NAME_SERVER2 fields. The ISP_IP_DNS_ADDR_FROM_SERVER field must always be set to false to enable PPP to use these addresses.

Logon scripts

A logon script can be specified through the ISP_USE_LOGIN_SCRIPT and ISP_LOGIN_SCRIPT fields. However, these scripts are run before PPP starts, and so before any incoming connection is made.


Incoming PPP configuration file

When in server mode, the PPP component reads its configuration parameters from a file called PPPD.INI instead of the normal PPP.INI used in client mode. This allows different, optimized settings to be used for each mode of PPP.

See PPP INI file for details of the settings.

[Top]


Incoming PPP launcher application

Incoming PPP mode is typically started by an application that initiates a PPP instance running in server mode. This launch program may run automatically at system start, or by explicit user action. It must perform the following tasks to provide additional configuration, and to start and monitor a connection:


IP addresses

As described above, the IP addresses for the local PPP endpoint and the address for the remote PPP client are stored in CommDB. In most scenarios they can be static, but if not, the application must store appropriate addresses for PPP to use.


DNS address

If a client requires access to DNS, before starting the PPP server, the launch application must set the DNS addresses to use in CommDB (in the fields described above). The application may need to establish an Internet connection to obtain these addresses.


Start incoming PPP Server

The launch application starts the PPP server with RConnection::Start(), specifying the appropriate CommDb IAP record.

PPP in server mode will close the link once the connection with the client closes. To maintain listening for incoming connections, the application should monitor the connection closing using RConnection. It can then restart the connection using RConnection::Start() again.