Вы находитесь на странице: 1из 82

Technical STARDOM FCN/FCJ

Information PPP Connection Function User Guide


TI 34P02Q51-01E

TI 34P02Q51-01E
© Copyright Oct. 2006 (YK)
1st Edition Oct. 31, 2006 (YK)
Blank Page
i

Introduction
The PPP (Point to Point Protocol) connection function of FCN/FCJ enables IP
(Internal Protocol) communications between two FCN/FCJs or between an
FCJ/FCJ and a PC or workstation over a public line or an internal line.

This document provides information on the following topics related to the PPP
connection function:
- Description of the PPP connection function
- Configuration of the PPP connection function
- PPP connection function support of the E-mail function
- PPP connection function support of the JEROS emulator

TIP
This document assumes that the reader has basic knowledge of PPP and IP. For more details on PPP
and IP, read RFC1548 and RFC1011 respectively of the RFC (Request for Comments) document set.

All Rights Reserved Copyright © 2006, Yokogawa Electric Corporation TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00
ii

Copyrights and Trademarks


„ Copyrights
The copyrights of this document belong to Yokogawa Electric Corporation.
No part of this document may be transferred, sold, distributed (including delivery via a
commercial PC network or the like), or registered or recorded on videotapes.

„ Trademarks and Licensed Software


- STARDOM is a trademark.
- Company names and product names included in this document are trademarks
or registered trademarks of their respective owners.
- Registered trademarks or trademarks are not denoted with the ‘TM’ or ‘®’ mark in
this document.

All Rights Reserved Copyright © 2006, Yokogawa Electric Corporation TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00
iii

STARDOM FCN/FCJ
PPP Connection Function User Guide
TI 34P02Q51-01E 1st Edition

CONTENTS
Introduction ..............................................................................................i
Copyrights and Trademarks ....................................................................ii
1. Overview ...........................................................................................1
1.1 System Location........................................................................................ 2
1.2 Function Overview .................................................................................... 5
1.2.1 Function Architecture ...................................................................... 5
1.2.2 Overview of Subfunctions ............................................................... 6
1.2.3 Files Used ....................................................................................... 7
1.3 Operating Environment............................................................................. 8
1.4 Communications Environment Configuration ....................................... 9
1.4.1 Communications Environment Planning ....................................... 10
1.4.2 Modem Setup.................................................................................11
1.4.3 Remote Machine Setup ................................................................ 12
2 Function Description .....................................................................13
2.1 Function Organization ............................................................................ 13
2.2 Function Explanation .............................................................................. 15
2.2.1 PPP Client Function and PPP Server Function ............................ 15
2.2.2 Application Requests .................................................................... 17
2.2.3 Other Features .............................................................................. 19
2.3 Class Structure ........................................................................................ 21
2.3.1 PppControl .................................................................................... 22
2.3.2 PppStatistics.................................................................................. 25
2.3.3 PppClient....................................................................................... 28
2.3.4 PppServer ..................................................................................... 33
2.3.5 PppException ................................................................................ 35
3 Creating PPP Client Application ...................................................41
3.1 Precautions about Creating PPP Client Application............................ 41
3.2 Sample Program ...................................................................................... 42
4 FCN/FCJ Setup ...............................................................................43
4.1 PPP Connection Function Startup Setting............................................ 43
4.2 IP Routing Setup...................................................................................... 44
4.3 COM Port Setup ....................................................................................... 46
4.4 PPP Connection Function Setup ........................................................... 47
4.4.1 PPP Connection Function Common Settings ............................... 49
4.4.2 PPP Server Function Related Settings ......................................... 50
4.4.3 PPP Client Function Related Settings .......................................... 55

All Rights Reserved Copyright © 2006, Yokogawa Electric Corporation TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00
iv

4.4.4 Sample PPP Setting File............................................................... 63


Appendix More about PPP Connection Function ..........................69
Appendix 1 PPP Support of E-mail Function................................................ 69
Appendix 2 PPP Support of JEROS Emulator.............................................. 71
Appendix 3 Troubleshooting .......................................................................... 73
Technical Information Revision History...................................................I

All Rights Reserved Copyright © 2006, Yokogawa Electric Corporation TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00
<1. Overview> 1

1. Overview
The PPP (Point to Point Protocol) connection function of FCN/FCJ is one of the
standard functions of the FCN/FCJ basic software, which is included in the
JEROS Basic Part module. Using this function enables IP (Internet Protocol)
communications over a public line or internal line:
- between FCN/FCJs, as well as
- between FCN/FCJs and PC or workstations

SEE ALSO
For more details on PPP-related functions, see Appendix 1, “PPP Support of E-mail Function” and
Appendix 2, “PPP Support of JEROS Emulator.”

Table List of PPP-compatible Modules


Software Module Name Overview of PPP Support
E-mail Function Uses the PPP connection function to send and receive E-mails.
Enables connection to a SMTP server or POP server over a public line
or an internal line.
JEROS Emulator Emulates the PPP connection function in Windows. A part of the class
library that the PPP connection function provides can be used in
Windows.

„ Features and Benefits


The PPP connection function offers the following features and benefits:
- IP connection over various line types
- Support for both PPP client and server functions
- Accessibility to Java Applications
- Ethernet mode of PPP client function
- Communications log and connection processing trace of PPP connections
- Support for various authentication methods
- Automatic termination of PPP connections

„ PPP Client and Server Functions


No Java application needs to be created for using PPP server functions. However, a
Java application needs to be written if there is a need to forcedly terminate a PPP
server connection. Moreover, Java applications also need to be created for using
PPP client functions.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 2

1.1 System Location


This section describes where the PPP connection function is located within the
FCN/FCJ system.

„ System Location of PPP Connection Function


The PPP connection function is included as a function of the JEROS Basic Part
software.
The PPP connection function is accessible from Java applications.

FCN/FCJ

Java application

Control JEROS Java


application Basic Part VM
PPP
connection
function

Public line,
Modem, internal line
COM port communications
adaptor, etc.

Figure System Location of PPP Connection Function

„ Relationship with Other Functions


PPP client functions are accessible only from Java applications.
On the other hand, no Java application is required to access PPP server functions.
The PPP connection function is not accessible from control applications.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 3

„ PPP connection Modes


The figures below show the various modes of PPP connection supported by the PPP
connection function.

z FCN/FCJ connecting as client

Figure FCN/FCJ Connecting as Client

z FCN/FCJ connecting as server

Runs as
PPP server

IP connection

PPP client FCN/FCJ


(e.g. PC)

Public line,
Modem GPRS, etc. Modem

Dial-up connection

Figure FCN/FCJ Connecting as Server

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 4

z Connecting two FCN/FCJs

Runs as Runs as
PPP client PPP server

IP connection

FCN/FCJ FCN/FCJ

Public line,
Modem GPRS, etc. Modem

Dial-up connection

Figure Connecting Two FCN/FCJs

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 5

1.2 Function Overview


1.2.1 Function Architecture
The PPP connection function comprises of four subfunctions, namely, connection
management function, PPP client function, PPP server function and log function.
Except for the log function, all other subfunctions can be accessed using APIs of Java
class libraries.
When the PPP function is started, it reads various setting files, which define its
behavior. These setting files include the JEROS basic setting file, IP routing file,
COMx port setting file and PPP setting file. The PPP function also writes operation
statuses of individual subfunctions to the kernel log file.

PPP connection
establishment requests Application
PPP connection operation PPP Connection
requests and responses Function
Log messages JEROS basic
setting file
File I/O Class libraries
IP routing file
Connection
management function
COMx port
setting file
PPP Server PPP client
PPP function function
setting file

Kernel log file Log function

RS-232-C port
Figure Software Architecture of PPP Connection Function

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 6

1.2.2 Overview of Subfunctions


The PPP connection function is divided into several subfunctions. Its APIs are
provided as part of the JEROS System class, which is included in the FCN/FCJ Java
Application Development Kit.

z Connection management function


The connection management function manages PPP connection statuses of each
COM port. APIs are provided for Java applications to perform the following functions:
- Get assigned IP addresses when a PPP connection is established.
- Get transmission statistics related to a PPP connection.

z PPP client function


The PPP client function enables an FCN/FCJ to act as a PPP client. The PPP client
function initiates establishment of PPP connections in response to API calls from Java
applications. APIs are provided for Java applications to perform the following
functions:
- Establish and terminate a PPP connection.
- Get PPP client connection status information and perform operations.

z PPP server function


The PPP server function receives a request to establish a PPP connection from a
remote machine, and automatically establishes a PPP connection. It can be
configured to start automatically at FCN/FCJ startup in the JEROS basic setting file.
APIs are provided for Java applications to get connection status information or
perform operations.

z Log function
The log function logs the operation of the PPP connection function to the kernel log
(JRLOGCUR.TXT) file. It logs the following events:
- Establishment and termination of PPP connections
- PPP action errors

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 7

1.2.3 Configuration Files


This section describes the files used by the PPP connection function.
The setting files used for configuration are loaded at FCN/FCJ startup.
In addition, the log function of the PPP connection function writes log messages to the
kernel log file.

SEE ALSO
For more details on individual setting files, see Chapter 4, “FCN/FCJ Setup.”

z PPP Setting File: DUOPPP.CNF


The PPP setting file is used to define various operation behavior of the PPP
connection function.

z JEROS Basic Setting File: DUONUS.PRP


To use the PPP connection function, you must enable the PPP function in the JEROS
Basic Setting file. In addition, you must remove any existing default gateway setting
for Ethernet so that the PPP destination machine can be made the default gateway
when establishing a PPP connection.

z IP Routing File: GATEWAYS


In special cases*1, you will need to define the IP routing information for Ethernet in the
IP routing file.
*1: When there is a need to communicate beyond an Ethernet segment with the PPP peer acting as default gateway.

z COM Port Setting File: DUOCOMx.PRP


The COM port setting file is used to define communications parameters of each COM
port to match the communications device connected to the COM port.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 8

1.3 Operating Environment


For the PPP connection function to run, other equipment in addition to the FCN/FCJ is
required. These include communications devices such as modems, communications
line service such as a public line and a remote machine acting as PPP client or PPP
server.

z FCN/FCJ Environment Requirements


The FCN/FCJ must satisfy the following condition:
Hardware requirement: COM port of the FCN/FCJ controller

TIP
COM ports of serial communications modules (NFLR111, NFLR121) cannot be used for PPP
connection.

z Communications Environment Requirements


The FCN/FCJ must satisfy the following communications conditions:

Communications line service Public line or internal line (including PHS, mobile phone and ISDN)
Data communications Modem or communications adaptor satisfying the following conditions:
*1
equipment - is compatible with the communication line service used.
- supports RS-232-C interface connection.
- can be manipulated using AT commands.
Remote machine Machine with PPP client function (running Windows 2000, Windows XP, Linux,
etc.);
Or machine with PPP server function (running Windows 2000, Windows XP,
Linux, etc.);
Or internet service provider supporting PPP connection.

*1: The required data communications equipment depends on the communications line service used: modem for
telephone line, PHS communications adaptor for PHS, mobile phone communications adaptor for mobile phone,
and terminal adaptor for ISDN line, etc. The description in this document assumes a typical setup of telephone
line with modem.

z Java Application Development Environment Requirements


The PPP connection function can be accessed from Java applications running on the
FCN/FCJ. The FCN/FCJ Java Application Development Kit (Model name: NT755FJ)
is required for developing Java applications on a PC.

SEE ALSO
For more details on the function specifications and operating environment of the FCN/FCJ Java
Application Development Kit, see:
"FCN/FCJ Java Application Development Kit" (GS34P02Q76-01E).

TIP
There is no need to create Java applications to use the PPP server function.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 9

1.4 Communications Environment


Configuration
The flowchart below shows a typical workflow for setting up a communications
environment in preparation for PPP connection.

PPP Connection
Preparation

Yes (see Chapter 3,


Using PPP client Create PPP client
“Creating PPP Client
function? application
Application”)
No

Communications (see Chapter 1.4.1, “Communications


environment planning Environment Planning”)

FCN/FCJ setup (see Chapter 4, “FCN/FCJ Setup”)

Modem setup (see Section 1.4.2, “Modem Setup”)

Remote machine setup (see Section 1.4.3, “Remote Machine Setup”)

END
Figure Preparation Flowchart for PPP Connection

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 10

1.4.1 Communications Environment Planning


This section describes the main decisions to be made about the
communications specifications and connection specifications of the PPP
connection function during communications environment planning in
preparation for PPP connection.

z Determine target communications range of FCN/FCJ


Identify the machines that will be communicating with FCN/FCJ using IP protocol via
Ethernet and PPP. Set up the FCN/FCJ, remote machines and required relay network
equipment for the target communications range of the FCN/FCJ defined by these
machines.

z Select communications line service


Select the communication line service to be used for PPP client and PPP server, and
standby data communications equipment required for the selected line service. The
description in this document assumes a typical setup of telephone line and modem.

z Determine PPP client/server mode


For each remote PPP destination machine of the FCN/FCJ, determine which will act
as PPP client, and which will act as PPP server.

z Determine PPP authentication method


Select the authentication required for establishing PPP connection. Determine the
PPP accounts (user name and password) to be registered on the PPP server.

z Schedule PPP connection


Schedule PPP client requests for establishing PPP connection to avoid telephone line
busy events.

z Assign IP address
Assign IP addresses to PPP servers and PPP clients expected to use PPP
connections. In general, a PPP server stores its own IP address and the IP addresses
of its PPP clients.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 11

1.4.2 Modem Setup


The basic procedure for modem setup involves entering AT commands on a PC to
change DIP switch settings on the modem. For more details, see the documentaton of
your modem as the detailed procedure varies with modem. In addition, define a
modem initialization string to be sent at the end of PPP connection in the PPP setting
file.

z Setup precautions
If the FCN/FCJ is to act as a PPP server, you must connect a modem to the FCN/FCJ
using an RS-232-C cable, and switch on the modem before starting up the FCN/FCJ.

When configured to run as a PPP server, the FCN/FCJ attempts to initialize the
modem at system startup and termination of PPP connection. If the modem
initialization fails, a critical error will be written to the log.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<1. Overview> 12

1.4.3 Remote Machine Setup


The setup for the remote machine varies depending on whether the remote machine
is a PPP client or a PPP server. Register the IP routing information for the FCN/FCJ
as required. For details, see the manual of the remote machine.

For the PPP connection function to run, other equipment in addition to the FCN/FCJ is
required. These include communications devices such as modems, communications
line service such as a public circuit and a remote machine acting as PPP client or
PPP server.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 13

2 Function Description
This chapter describes the following subfunctions, which are provided by the PPP
connection function:
- Connection management function
- PPP client function
- PPP server function
- Log function

Of the above functions, the connection management function, PPP client function and
PPP server function are provided for Java applications as part of the JEROS system
class. The various classes provided by the PPP connection function are included in
the FCN/FCJ Java Application Development Kit.

2.1 Function Organization


The PPP connection function comprises four subfunctions, which are described
below.

„ Connection Management Function


The connection management function manages PPP connection statuses of each
COM port. APIs are provided for Java applications to perform the following functions:

z Get IP address
Get assigned IP addresses of the FCN/FCJ and its peer when establishing a PPP
connection.

z Get transmission related statistics


Get the transmission volume sent and received via each COM port since system
startup. Transmission volume data is available in number of bytes, number of IP
packets and number of PPP packets.

„ PPP Client Function


The PPP client function enables an FCN/FCJ to act as a PPP client. The PPP client
function setup is defined in the “[Client]” section of the PPP setting file.

z Establishing a PPP client connection


1. A Java application issues a PPP connection API call.
2. If a hostname is specified for the destination, it is converted to the destination
setting name defined in the PPP setting file.
3. The FCN/FCJ dials the destination PPP server. If the line is busy, the FCN/FCJ
redials up to the maximum number of retries specified in the PPP setting file. If
multiple destination telephone numbers are defined in the PPP setting file, the
FCN/FCJ redials each number up to its corresponding retries limit.
4. Issues a request for authentication to the PPP server.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 14
5. Determines the IP address to be used for the PPP connection.
6. Establishes the PPP client connection.

z Terminating a PPP connection


1. A Java application issues a PPP disconnection API call.
2. FCN/FCJ sends a request to terminate PPP connection.
3. Disconnects the dial-up call.

„ PPP Server Function


The PPP server function enables an FCN/FCJ to act as a PPP server. The PPP
server function setup is defined in the “[Server]” section of the PPP setting file.

z Establishing a PPP server connection


1. FCN/FCJ receives a dial-up request from a remote PPP client.
2. Authenticates the PPP client.
3. Determines the IP address to be used for the PPP connection.
4. Establishes the PPP server connection.

z Terminating a PPP server connection


1. FCN/FCJ receives a request to terminate a PPP connection from a PPP client.
2. The telephone call is disconnected by the remote PPP client.

z Forcedly Terminating a PPP server connection


1. Java application makes an API call to forcedly terminate a PPP server
connection.
2. FCN/FCJ sends a request to terminate PPP connection.
3. Disconnects the telephone call.

„ Log Function
The log function writes operation messages of the PPP connection function to the
kernel log (JRLOGCUR.TXT) file. It logs the following events:

z Critical error log messages


- Modem communications error with FCN/FCJ acting as PPP server
- Missing PPP setting file error
- PPP system error
- PPP setting file syntax error

z Information log messages


- PPP client connection is established or terminated.
- Idle timeout occurred for PPP client connection.
- PPP server connection is established or terminated.
- Acceptance of connection requests for PPP server connection is started or
terminated.
- Idle timeout occurred for PPP server connection

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 15

2.2 Function Explanation


2.2.1 PPP Client Function and PPP Server Function
The PPP connection function provides two subfunctions: PPP client function and PPP
server function. The former enables an FCN/FCJ to send a connection request to a
remote machine and runs as a PPP client, while the latter enables an FCN/FCJ to
receive PPP connection requests from remote machines and runs as a PPP server.
The two functions cannot run concurrently on the same port.
The diagram below shows the state transitions for the two functions. The types of
states and the conditions for state transitions are described below.

Figure State Transitions of PPP Connection Function

„ Types of States

z Disconnected state
In Disconnected state, neither the PPP client function nor the PPP server function is
running. The telephone line is disconnected in this state. This is the default state at
system startup.

z PPP Client Connected state


In PPP Client Connected state, the FCJ/FCJ acts as a PPP client, and sends PPP
connection requests to a remote machine, which acts as a PPP server. In this state,
the telephone line is busy so the FCN/FCJ can neither send a PPP connection
request to a different destination nor receive a connection request from a remote PPP
client.

z PPP Server Connected state


In PPP Server Connected state, the FCN/FCJ acts as a PPP server and receives PPP
requests from its peer PPP client. In this state, the telephone line is busy so the
FCN/FCJ can neither send PPP connection requests to nor receive connection
requests from a remote PPP client at a different destination.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 16

„ State Transition Conditions

z Transition 1: Establishment of PPP client connection


Transition is made from Disconnected state to PPP Client Connected state when a
Java application issues a PPP client connection request through an API call.

z Transition 2: Termination of PPP client connection


Transition is made from PPP Client Connected state to Disconnected state when any
of the following conditions is satisfied:
- A Java application issues a request to terminate PPP client connection through
an API call.
- The telephone line is disconnected due to external reasons.
- There is no transmission for a certain duration (idle timeout has occurred).

z Transition 3: Establishment of PPP server connection


Transition is made to PPP Server Connected state when the FCN/FCJ receives a
PPP connection request from a remote PPP client.

z Transition 4: Termination of PPP server connection


Transition is made from PPP Server Connected state to Disconnected state when any
of the following conditions is satisfied:
- A Java application issues a request to terminate PPP server connection
through an API call.
- Telephone line is disconnected due to external factors.
- There is no data flow for a certain duration (idle timeout has occurred).

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 17

2.2.2 Application Requests


This section describes the operation requests which a Java application can issue in
relation to a PPP client connection or PPP server connection. These requests do not
include establishing a PPP server connection, which is automatically performed by the
PPP server function.

„ Forcedly terminate a PPP server connection


Usually, it is the remote PPP client which initiates termination of a PPP connection.
However, an application may also request for forced termination of a PPP server
connection.

„ Establish a PPP client connection


An application may request to establish a PPP client connection.
Multiple applications may even share one PPP client connection to the same
destination. In other words, if a connection request is issued for a destination that is
already connected, the existing connection is used. The PPP client function
increments the internal connection counter by 1, but performs no real connection. See
the figure below.

„ Terminate a PPP client connection


An application may request to terminate a PPP client connection.
If the PPP client connection to be terminated is shared by multiple applications, the
PPP client function decrements the internal connection counter by 1, but performs no
real disconnection. See the figure below.

Figure Sharing of PPP Client Connection

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 18

„ Forcedly establish a PPP client connection


Even if an established PPP client connection or PPP server connection is occupying a
COM port or modem, an application may request to forcedly terminate the connection
to allow a new PPP client connection to be established. This is known as a forced
establishment request.
When the PPP client function receives a forced establishment request from an
application, it forcedly terminates the existing PPP connection without informing any
application currently using the PPP connection.
The behavior of the PPP connection function when it receives a forced establishment
request is described below.

z In PPP Client Connected state:


If the destination of a forced establishment request issued by an application is the
same as the destination currently connected, the connection is shared but not
terminated.

z In PPP Server Connected state:


Whatever the destination of a forced establishment request issued by an application,
the existing PPP server connection is terminated, and a new PPP client connection is
established.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 19

2.2.3 Other Features


z Support for various authentication methods
The PPP client function supports various authentication methods including PAP
(Password Authentication Protocol), CHAP (Challenge Handshake Authentication
Protocol) and Log-in script authentication.
The PPP server function supports PAP and CHAP authentication methods.
For details on PAP and CHAP authentication, see RFC1334.

z Automatic termination of PPP connection


Both the PPP client function and the PPP server function constantly monitors the
communications status of PPP connections, and can be configured to forcedly
terminate a PPP connection and automatically disconnects the telephone line when
no IP packet is transmitted for a specified duration.
The timeout limit is specified as an IdleTimeout setting in the PPP setting file on COM
port basis for the PPP server function, and on destination basis for the PPP client
function.
Setting IdleTimeout to 0 disables monitoring and automatic termination of an idle PPP
connection.

z Ethernet mode of PPP client function


In addition to its usual operation mode using a telephone line, the PPP client function
also provides a special Ethernet mode.
In Ethernet mode, the PPP client function is disabled and actual communications is
carried out using Ethernet. Ethernet mode setup is defined using the PPP setting file.
(For more details, see Section 4.4.3, “PPP Client Function Related Settings”.)
The PPP client function, though disabled in Ethernet mode, behaves as though it is
enabled. Using Ethernet mode allows communications applications using PPP client
function to communicate via Ethernet without code modification. In other words,
Ethernet mode allows communications programs developed for PPP to be run as
Ethernet applications.

In Ethernet mode, the PPP client function behaves as follows:


- The PPP client function skips internal PPP processing.
- The PPP client function class (PppClient) always returns success to any
establishment request, forced termination request or termination request with
respect to a PPP client connection.
- Except for the PppClient class, other classes (PppControl, PppServer,
PppStatistics) cannot be used when in Ethernet mode.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 20

z Trace function
The Trace function outputs a detailed trace of establishment processing and
termination processing of PPP connections by the PPP client function and PPP server
function to the console COM port designated by the "ConsoleComPort" parameter in
the JEROS basic setting file. The Trace function is especially useful for
troubleshooting PPP connection establishment problems.
Besides internal processing trace, the output also includes dialog with the modem and
the internal IP routing table of the FCN/FCJ.
To enable the Trace function, specify “YES for the trace mode setting in the PPP
setting file.
To use the console function, you need to specify a COM port that is not used by the
PPP connection function for the console display COM port setting in the JEROS basic
setting file, and connect a terminal*1 to the COM port. For more details, see the
FCN/FCJ online help documentation.

*1: The connected terminal equipment must be compatible with the COM port of the FCN/FCJ. A good example may
be a PC installed with Windows Hyperterminal or some other terminal emulation software.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 21

2.3 Class Structure


This section describes the class structure of classes provided in the FCN/FCJ Java
Application Development Kit by the PPP connection function.
All PPP function classes are included in the “jeros.ppp” package.

z PppControl
This class provides the connection management function.

z PppStatistics
This class provides methods for getting statistical information for PPP connections.

z PppClient
This class provides the PPP client function.

z PppServer
This class provides methods for accessing the PPP server function. An object of this
class can be obtained by calling the PppControl.getServer() method.

z PppException
This class handles exceptions encountered by the PPP connection function.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 22

2.3.1 PppControl
java.lang.Object
└ jeros.ppp.PppControl

public class PppControl extends java.lang.Object


- Provides the PPP connection management function.

„ Summary
Field Summary
static int BOTH PPP Operation mode: both client function and server function are enabled.
static int CLIENT PPP operation mode: only client function is enabled.
static int NONE PPP operation mode: both client function and server function are disabled.
static int SERVER PPP operation mode: only server function is enabled.

Constructor Summary
PppControl(java.lang.String deviceName) PppControl class constructor

Method Summary
java.lang.String getLocalAddress() Returns IP address assigned to local machine of PPP connection.
Int getPppMode() Returns PppMode setting defined in PPP setting file.
java.lang.String getRemoteAddress() Returns IP address assigned to remote machine of PPP connection.
PppServer getServer() Returns PppServer object.

Methods inherited from class java.lang.Object


Clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

„ Field Detail
z CLIENT
public static final int CLIENT
PPP operation mode: only client function is enabled.
z SERVER
public static final int SERVER
PPP operation mode: only server function is enabled.
z BOTH
public static final int BOTH
PPP operation mode: both client function and server function are enabled.
z NONE
public static final int NONE
PPP operation mode: both client function and server function are disabled.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 23

z Constant field value: jeros.ppp.PppControl


public static final int BOTH 3
public static final int CLIENT 1
public static final int NONE 0
public static final int SERVER 2

„ Constructor Detail
z PppControl
public PppControl(java.lang.String deviceName)
throws PppException

PppControl class constructor


Creates a PppControl object. “ETHER” is not a valid device name so
methods of the PppControl class cannot be applied to Ethernet.

Parameters:
deviceName – communications device name ("COM1", "COM2", ...)

Exceptions:
PppException – Exception indicating one of the following error numbers:
- E_PPP_DEVICENAME: Device name is invalid.
- E_PPP_INTERNAL: PPP function internal error
- E_PPP_NONE: PPP client function is not started.
Check the PppStart item of DUNUS.PRP. Any error at startup would have been
logged in the “JRLOGCUR.txt” file.

„ Method Detail
z getPppMode
public int getPppMode()
Returns PppMode setting defined in the PPP setting file.

Returns:
PppMode setting
- CLIENT: Only client function is enabled.
- SERVER: Only server function is enabled.
- BOTH: Both client function and server function are enabled.
- NONE: Both client function and server function are disabled.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 24

z getLocalAddress
public java.lang.String getLocalAddress()
throws PppException

Returns IP address assigned to local machine of PPP connection.


Generates an exception if not in PPP client connected state.

Returns:
IP address of local machine of PPP connection.

Exceptions:
PppException – Exception indicating one of the following error numbers:
- E_PPP_NO_CONNECTION: Not in PPP connected state.
- E_PPP_INTERNAL: PPP function internal error

z getRemoteAddress
public java.lang.String getRemoteAddress()
throws PppException

Returns IP address assigned to remote machine of PPP connection.


Generates exception if not in PPP client connected state.

Returns:
IP address of remote machine of PPP connection.

Exceptions:
PppException – Exception indicating one of the following error numbers:
- E_PPP_NO_CONNECTION: Not in PPP connected state.
- E_PPP_INTERNAL: PPP function internal error

z getServer
public PppServer getServer()
throws PppException

Returns PppServer object.


Generates an exception if the PppMode for the specified serial device is
specified as “CLIENT” or “NONE” in the PPP setting file.

Returns:
PppServer object

Exceptions:
PppException - Exception indicating one of the following error numbers:
- E_PPP_SERVER_NONE: PPP server function is disabled for the specified
serial device.
Check the PppMode setting in the PPP setting file.
- E_PPP_INTERNAL: PPP function internal error

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 25

2.3.2 PppStatistics
java.lang.Object
└ jeros.ppp.PppStatistics

public class PppStatistics extends java.lang.Object


- This class provides methods for getting statistical information related to a
PPP connection.

„ Summary
Constructor Summary
PppStatistics(java.lang.String deviceName) PppStatistics class constructor

Method Summary
int getRecvBytes() Returns the number of bytes received on a PPP connection.
int getRecvIPs() Returns the number of IP packets received on a PPP connection.
int getRecvPackets() Returns the number of PPP packets received on a PPP connection.
int getSendBytes() Returns the number of bytes sent on a PPP connection.
int getSendIPs() Returns the number of IP packets sent on a PPP connection.
int getSendPackets() Returns the number of PPP packets sent on a PPP connection.

Methods inherited from class java.lang.Object


Clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

„ Constructor Detail
z PppStatistics
public PppStatistics(java.lang.String deviceName)
throws PppException

PppStatistics class constructor


Creates a PppStatistics object.
Methods of the PppStatistics class return values current at the time when the
object was created.

Parameters:
deviceName – communications device name ("COM1", "COM2", ...)
Exceptions:
PppException - Exception indicating one of the following error numbers:
- E_PPP_NONE: PPP client function is not started.
Check the PppStart item of DUNUS.PRP. Any error at startup would have been
logged in the “JRLOGCUR.txt” file.
- E_PPP_DEVICENAME: Device name is invalid.
- E_PPP_NO_CONNECTION: Not in PPP connected state.
Use of this constructor is only allowed in PPP connected state.
- E_PPP_INTERNAL: PPP function internal error

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 26

„ Method Detail
z getRecvBytes
public int getRecvBytes()
Returns the number of bytes received on the PPP connection. The returned
value ranges from 0 to 2147483647, and the count is reset to 0 when it
reaches the upper limit.

Returns:
Number of bytes received
z getRecvPackets
public int getRecvPackets()
Returns the number of PPP packets received on a PPP connection.The
returned value ranges from 0 to 2147483647, and the count is reset to 0 when
it reaches the upper limit.

Returns:
Number of PPP packets received
z getRecvIPs
public int getRecvIPs()
Returns the number of IP packets received on a PPP connection. The
returned value ranges from 0 to 2147483647, and the count is reset to 0 when
it reaches the upper limit.

Returns:
Number of IP packets received
z getSendBytes
public int getSendBytes()
Returns the number of bytes sent on a PPP connection. The returned value
ranges from 0 to 2147483647, and the count is reset to 0 when it reaches the
upper limit.

Returns:
Number of bytes sent
z getSendPackets
public int getSendPackets()
Returns the number of PPP packets sent on a PPP connection. The returned
value ranges from 0 to 2147483647, and the count is reset to 0 when it
reaches the upper limit.

Returns:
Number of PPP packets sent

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 27

z getSendIPs
public int getSendIPs()
Returns the number of IP packets sent on a PPP connection. The returned
value ranges from 0 to 2147483647, and the count is reset to 0 when it
reaches the upper limit.

Returns:
Number of IP packets sent

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 28

2.3.3 PppClient
java.lang.Object
└ jeros.ppp.PppClient

public class PppClient extends java.lang.Object


- Provides the PPP client function.

„ Summary
Field Summary
static int BOTH Force mode: Forcedly terminate and connect even if in client connected state or
server connected state.
static int CLIENT Force mode: Forcedly terminate and connect even if in client connected state.
boolean DEBUG
static int
m_disconnectCount
static int SERVER Force mode: Forcedly terminate and connect even if in server connected state.

Constructor Summary
PppClient(java.lang.String targetName) PppClient class constructor

Method Summary
protected void closer() Terminates the active PPP connection, and immediately disconnects the modem.
void connect() This PPP client connection request method performs PPP connection for the
destination specified in the constructor.
void disconnect() This PPP client disconnection request terminates a PPP connection.
protected void finalize() This is the finalizer method for the class.
void forceConnect Performs a PPP connection using the specified force mode.
(int forceMode)
java.lang.String Returns the device name used by a PPP client.
getDeviceName()
int getIdleTimeout() Returns the IdleTimeout setting defined in the PPP setting file.
boolean getTraceMode() Returns PPP trace mode setting.
boolean isConnected() Returns PPP client connection status.

Methods inherited from class java.lang.Object


Clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

„ Field Detail
z CLIENT
public static final int CLIENT
Force mode: Forcedly terminate and connect even if in client connected
state.
z SERVER
public static final int SERVER
Force mode: Forcedly terminate and connect even if in server connected
state.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 29

z BOTH
public static final int BOTH
Force mode: Forcedly terminate and connect even if in client connected
state or server connected state.
z DEBUG
public final boolean DEBUG
z m_disconnectCount
public static int m_disconnectCount
z Constant field value: jeros.ppp.PppClient
public static final int BOTH 3
public static final int CLIENT 1
public final boolean DEBUG false
public static final int SERVER 2

„ Constructor Detail
z PppClient
public PppClient(java.lang.String targetName)
throws PppException

PppClient class constructor


Creates a PppClient object for the specified hostname or destination setting
name.
Settings for the hostname or destination setting name must be defined in the
PPP setting file. Otherwise, the constructor generates a PppException and
exits.
When this constructor is called, no device is reserved and no connection
processing is performed. To perform a PPP client connection, call either the
connect() or forceConnect() method.

Parameters:
targetName - destination hostname or destination setting name.

Exceptions:
PppException - Exception indicating one of the following error numbers:
- E_PPP_CLIENT_NONE: PPP client function is not enabled.
Check the PppMode coding in the PPP setting file.
- E_PPP_NONE: PPP client function is not started.
Check the PppStart item of DUNUS.PRP. Any error at startup would have been
logged in the “JRLOGCUR.txt” file.
- E_PPP_HOSTNAME: Illegal hostname
Check the ServerHosts setting in the PPP setting file.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 30
- E_PPP_TARGETNAME: Invalid destination setting name.
Check whether a subsection corresponding to the specified destination setting
name is coded in the “[Client]” section of the PPP setting file.
- E_PPP_INTERNAL: PPP function internal error

„ Method Detail
z getTraceMode
public boolean getTraceMode()

Returns the PPP trace mode setting. Always returns FALSE if the device
name is specified as “ETHER”.

Returns:
Trace mode setting
TRUE: tracing is enabled.
FALSE: tracing is disabled.

z connect
public void connect()
throws PppException

This PPP client connection request method performs PPP connection for the
destination specified in the constructor.
When the method exits, either the PPP connection is successfully
established or the PPP connection has failed.
However, the method always exits with success if the device name is
specified as “ETHER”. The PPP connection, once established, will not be
automatically terminated if the original caller thread is aborted during
processing or if the PPP client object is deleted. To terminate a PPP
connection, you need to call the disconnect method or set up a line idle
timeout.

Exceptions:
PppException - Exception indicating one of the following error numbers:
- E_PPP_CLIENT_BUSY: Device is being used by another PPP client.
- E_PPP_SERVER_BUSY: Device is being used by another PPP server.
- E_PPP_MODEM: Failed to communicate with modem.
Check the cable connection with the modem and check whether the modem is
switched on.
- E_PPP_DIAL_BUSY: Failed to establish dial-up connection with PPP server.
The remote machine is busy. If the problem persists despite redialing, check
the telephone number setting.
- E_PPP_CONNECT: Failed to connect to PPP server.
Check the PPP username, password and related settings.
- E_PPP_INTERNAL: PPP function internal error

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 31

z forceConnect
public void forceConnect(int forceMode)
throws PppException

Performs a PPP connection using the specified force mode.


This method performs a PPP connection even if there is an existing client
connection or server connection, by first forcedly terminating the existing
connection.
It always exits with success without any processing if the device name is
specified as “ETHER”.
An established PPP connection will not be automatically terminated if the
original caller thread is aborted during processing or if the PPP client object
is deleted. To terminate a PPP connection, you need to call the delete()
method or set up a line idle timeout.

Parameters:
forceMode – force mode
CLIENT: Forcedly terminate and connect even if in client connected state.
SERVER: Forcedly terminate and connect even if in server connected state.
BOTH: Forcedly terminate and connect even if in server connected state or client
connected state.

Exceptions:
PppException - Exception indicating one of the following error numbers:
- E_PPP_CLIENT_BUSY: Device is being used by another PPP client.
- E_PPP_SERVER_BUSY: Device is being used by another PPP server.
- E_PPP_MODEM: Failed to communicate with modem.
Check the cable connection with the modem and check whether the modem is
switched on.
- E_PPP_DIAL_BUSY: Failed to establish dial-up connection with PPP server.
The remote machine is busy. If the problem persists despite redialing, check
the telephone number setting.
- E_PPP_CONNECT: Failed to connect to PPP server.
Check the PPP username, password and related settings.
- E_PPP_INTERNAL: PPP function internal error

z disconnect
public void disconnect()

This PPP client disconnection request terminates a PPP connection.


It always exits with success without any processing if the device name is
specified as “ETHER”.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 32

z isConnected
public boolean isConnected()

Returns PPP client connection status.

Returns:
Client connection status
- TRUE: connected
TRUE is always returned if the device name is specified as “ETHER”.
- FALSE: disconnected.

z getIdleTimeout
public int getIdleTimeout()

Returns the IdleTimeout setting defined in the PPP setting file.


Always returns 0 (idle timeout disabled) if the device name is specified as
“ETHER”.

Returns:
IdleTimeout setting
z getDeviceName
public java.lang.String getDeviceName()

Returns the device name used by a PPP client.

Returns:
Device name
z closer
protected void closer()

Terminates the active PPP connection, and immediately disconnects the


modem.
z finalize
protected void finalize()

This is the class finalizer method.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 33

2.3.4 PppServer
java.lang.Object
└ jeros.ppp.PppServer

public class PppServer extends java.lang.Object


- Provides the PPP server function. To get a PppServer class object, call the
PppControl.getServer() method.

„ Summary
Method Summary
void abort() Terminates a PPP server connection.
Terminates the active PPP connection, and immediately
protected void closer()
disconnects the modem.
boolean getAcceptMode() Returns PPP server accept mode setting.
boolean getTraceMode() Returns PPP server trace mode setting.
boolean isConnected() Returns PPP server connection status.
Sets PPP server accept mode to accept or deny all client
void setAcceptMode(boolean mode)
connection requests.
Forcedly sets PPP server accept mode to accept or deny all client
void setAcceptModeForce(Boolean mode)
connection requests.

Methods inherited from class java.lang.Object


Clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

„ Method Detail
z setAcceptMode
public void setAcceptMode(boolean mode)

Sets PPP server accept mode to accept or deny all client connection
requests.
If this method is called more than once, the last setting applies.

Parameters:
mode – accept mode setting
TRUE: accept client connection requests
FALSE: deny client connection requests

z setAcceptModeForce
public void setAcceptModeForce(boolean mode)

Forcedly sets PPP server accept mode to accept or deny all client
connection requests.
This is an internal method intended for special purposes.
Generally, the setAcceptMode method should be used instead.

Parameters:
mode – accept mode setting
TRUE: accept client connection requests
FALSE: deny client connection requests

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 34
z getAcceptMode
public boolean getAcceptMode()

Returns PPP server accept mode setting.

Returns:
Accept mode setting
TRUE: accept client connection requests
FALSE: deny client connection requests

z getTraceMode
public boolean getTraceMode()

Returns PPP server trace mode setting.

Returns:
Trace mode setting
TRUE: tracing is enabled.
FALSE: tracing is disabled.

z abort
public void abort()

Terminates a PPP server connection.


This method can be used to terminate a server connection urgently in the
event of a system failure or for any other reason.
z isConnected
public boolean isConnected()

Returns PPP server connection status.

Returns:
PPP server connection status
TRUE: connected
FALSE: not connected

z closer
protected void closer()

Terminates the active PPP connection, and immediately disconnects the


modem.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 35

2.3.5 PppException
java.lang.Object
└ java.lang.Throwable
└ java.lang.Exception
└ jeros.ppp.PppException

All Implemented Interfaces:


java.io.Serializable

public class PppException extends java.lang.Exception


- This class handles exceptions encountered by the PPP connection function.

z See Also
Class jeros.ppp.PppException extends java.lang.Exception and implements
Serializable.

Serialized Fields:
int m_errorCode

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 36

„ Summary
Field Summary
static int E_PPP_CLIENT_BUSY Error number: PPP client is busy (PPP client startup error)
Cause: In PPP client connected state, a method is called requesting for client
connection but the specified destination setting name is different from the destination
setting name of the existing connection.
static int E_PPP_CLIENT_NONE Error number: PPP client function is not configured.
Cause: PPP client function is not enabled in the PPP setting file.
static int E_PPP_COMM Error number: PPP server communication error
Cause: Error encountered while communicating with PPP server.
static int E_PPP_CONNECT Error number: PPP server connect error
Cause: Failed to connect to PPP server.
static int E_PPP_DEVICENAME Error number: Illegal device name
Cause: Serial device name is invalid.
static int E_PPP_DIAL_BUSY Error number: PPP server dial error
Cause: Failed to establish dial-up connection with PPP server.
static int E_PPP_HOSTNAME Error number: Illegal hostname
Cause: No destination setting name corresponding to the hostname is defined.
static int E_PPP_INTERNAL Error number: PPP function internal error
Cause: Internal error encountered in PPP function.
static int E_PPP_MODEM Error number: Modem error
Failed to communicate with modem.
static int E_PPP_MODEM_BUSY Error number: Modem error
Cause: Modem is busy.
static int E_PPP_NO_CONNECTION Error number: No PPP connection
Cause: getRemoteAddress or getLocalAddress method is called but no PPP
connection is active.
static int E_PPP_NONE Error number: PPP not started (PPP function disabled error)
Cause: PPP function is not started due to a coding error in the setting file or some
other reason.
static int E_PPP_PARAM Error number: illegal parameter
Cause: A specified method argument is out of valid range.
static int E_PPP_SERVER_BUSY Error number: PPP server busy (PPP server startup error)
Cause: PPP server function is not running.
static int E_PPP_SERVER_NONE Error number: PPP server function is not configured.
Cause: PPP server function is not enabled in the PPP connection function setup.
static int E_PPP_TARGETNAME Error number: Illegal target name
Cause: Destination setting name is invalid.

Constructor Summary
PppException(int errorCode) PppException class constructor
PppException(int errno, java.lang.String info) Relays exception generated in NativeMethod

Method Summary
int getErrorCode() Returns error code of PppException
java.lang.String getMessage() Returns error message of PppException

Methods inherited from the “java.lang.Throwable” class


fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace,
printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object


clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 37

„ Field Detail
z E_PPP_MODEM
public static final int E_PPP_MODEM

Error number: Modem error


Cause: Failed to communicate with modem.
Ensure that the modem is connected and switched on.
If the modem is operating normally, check the ModemCommandTimeout
setting in the PPP setting file.
Also ensure that InitialDTRState is set to ON in the serial device setting file
(DUOCOMx.PRP).
z E_PPP_DIAL_BUSY
public static final int E_PPP_DIAL_BUSY

Error number: PPP server dial error


Cause: Failed to establish dial-up connection with PPP server.
If the problem persists despite redialing, check the telephone number
setting.
z E_PPP_CONNECT
public static final int E_PPP_CONNECT

Error number: PPP server connect error


Cause: Failed to connect to PPP server.
Cause: The destination PPP server is not running, or one of its PPP settings
(username, password, etc.) is invalid.
z E_PPP_CLIENT_NONE
public static final int E_PPP_CLIENT_NONE

Error number: PPP client function is not configured.


Cause: PPP client function is not enabled in the PPP setting file.
z E_PPP_CLIENT_BUSY
public static final int E_PPP_CLIENT_BUSY

Error number: PPP client is busy (PPP client startup error)


Cause: In PPP client connected state, a method is called requesting for client
connection but the specified destination setting name is different from the
destination setting name of the existing connection.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 38

z E_PPP_SERVER_NONE
public static final int E_PPP_SERVER_NONE

Error number: PPP server function is not configured.


Cause: PPP server function is not enabled in the PPP connection function
setup.
z E_PPP_SERVER_BUSY
public static final int E_PPP_SERVER_BUSY

Error number: PPP server busy (PPP server startup error)


Cause: An application made an attempt to use the PPP client function when
the PPP server function is running.
z E_PPP_COMM
public static final int E_PPP_COMM

Error number: PPP server communication error


Cause: Error encountered while communicating with PPP server.
z E_PPP_DEVICENAME
public static final int E_PPP_DEVICENAME

Error number: Illegal device name


Cause: Serial device name is invalid.
z E_PPP_TARGETNAME
public static final int E_PPP_TARGETNAME

Error number: Illegal target name


Cause: Destination setting name is invalid.
z E_PPP_HOSTNAME
public static final int E_PPP_HOSTNAME

Error number: Illegal hostname


Cause: No destination setting name corresponding to the hostname is
defined.
z E_PPP_PARAM
public static final int E_PPP_PARAM

Error number: illegal parameter


Cause: A specified method argument is out of valid range.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 39

z E_PPP_NONE
public static final int E_PPP_NONE

Error number: PPP not started


Cause: PPP function is not started due to a coding error in the setting file or
some other reason.
z E_PPP_NO_CONNECTION
public static final int E_PPP_NO_CONNECTION

Error number: No PPP connection


Cause: getRemoteAddress or getLocalAddress method is called but no PPP
connection is active.
z E_PPP_MODEM_BUSY
public static final int E_PPP_MODEM_BUSY

Error number: Modem error


Cause: Modem is busy.
z E_PPP_INTERNAL
public static final int E_PPP_INTERNAL

Error number: PPP function internal error


Cause: Internal error encountered in PPP function.

z Constant field value: jeros.ppp.PppException


public static final int E_PPP_CLIENT_BUSY 5
public static final int E_PPP_CLIENT_NONE 4
public static final int E_PPP_COMM 8
public static final int E_PPP_CONNECT 3
public static final int E_PPP_DEVICENAME 9
public static final int E_PPP_DIAL_BUSY 2
public static final int E_PPP_HOSTNAME 11
public static final int E_PPP_INTERNAL 99
public static final int E_PPP_MODEM 1
public static final int E_PPP_MODEM_BUSY 15
public static final int E_PPP_NO_CONNECTION 14
public static final int E_PPP_NONE 13
public static final int E_PPP_PARAM 12
public static final int E_PPP_SERVER_BUSY 7
public static final int E_PPP_SERVER_NONE 6
public static final int E_PPP_TARGETNAME 10

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<2 Function Description > 40

„ Constructor Detail
z PppException
public PppException(int errorCode)

PppException class constructor


Creates a PppException object.
z PppException
public PppException(int errno, java.lang.String info)

Relays exception generated in NativeMethod

Parameters:
errno – error number
info – error related information

„ Method Detail
z getErrorCode
public int getErrorCode()

Returns error code of PppException

Returns:
Error code
z getMessage
public java.lang.String getMessage()

Returns error message of PppException

Returns:
Error message

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<3 Creating PPP Client Application> 41

3 Creating PPP Client Application


3.1 Precautions about Creating PPP Client
Application
z Using PPP client connection
Always issue a request to establish a PPP client connection from a PPP client before
transmission, and issue a disconnection request at the end of transmission. A PPP
client communication application must issue a request to establish a PPP client
connection before communications begin at the TCP/IP layer. Moreover, the
application must also issue a request to terminate the PPP client connection after
communication at the TCP/IP layer ends and the socket is closed.

z Using automatic termination feature of PPP connectionq


Due to program bug, an application running on the FCN/FCJ or a remote machine
may fail to terminate a PPP connection so that the telephone line stays connected
even after communication at the TCP/IP layer has ended. To handle such situations,
we recommend using the idle timeout feature to perform automatic termination. By
setting an appropriate idle timeout duration for PPP client connection or PPP server
connection, residual PPP connections performing no communications can be
removed. The timeout value should be larger than the longest duration that an
application is expected to transmit no data.

z Avoiding endless wait to receive data


In the event that a telephone line is inadvertently disconnected due to bad
communications conditions, the automatic termination feature, if enabled, would
automatically terminate the PPP connection without notifying any application. An
application which is waiting to receive data from the PPP connection would
unfortunately then continue in this state forever. To avoid having an application wait
endlessly to receive data when a PPP connection is terminated unexpectedly, call the
setTimeout() method of the java.net.Socket class with an appropriate receive timeout
duration.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<3 Creating PPP Client Application> 42

3.2 Sample Program


This section shows a sample PPP client communications application program. The
program performs a PPP connection to an FTP server, using the following procedure:
1. Connect to PPP server using hostname “ftpserver”.
2. Connect to FTP server having hostname “ftpserver”, and get a file named
“JRLOGCUR.TXT”.
3. Terminates connection with FTP server.
4. Terminates connection with PPP server.

package duonus.sample.jeros;
import jeros.ppp.*;
import jeros.ftp.*;
//
// GetFile.Java – Gets a file from FTP server using PPP connection.
//
public class GetFile {
// Hostname of FTP server
static final String FTP_SERVER = "ftpserver";
// FTP username
static final String FTP_USER = "ftpuser";
// FTP password
static final String FTP_PASS = "ftppass";
// Name of file to get
static final String FTP_FILE = "/JEROS/WWW/LOG/JRLOGCUR.TXT";
public static void main() {
PppClient ppp = null;
// Connect to PPP server
try {
// Create PppClient object.
ppp = new PppClient(FTP_SERVER);
// Establish PPP connection.
ppp.connect();
}catch(PppException e) {
// Displays details of exception.
System.out.println("getLog: " + e );
}
FtpClient ftp = null;
try {
// Connect to FTP server.
ftp = new FtpClient(FTP_SERVER, FTP_USER, FTP_PASS);
// Get file in binary mode.
ftp.get(FTP_FILE, false);
// Terminate connection with FTP server.
ftp.close();
}catch(FtpException e) {
// Displays details of exception.
System.out.println("getLog: " + e );
}
// Terminate connection with PPP server.
ppp.disconnect();
}
}

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 43

4 FCN/FCJ Setup
Before using the PPP connection function, you need to perform the following
setup on the FCN/FCJ:
- PPP connection function startup setting
- IP routing setup
- COM port setup
- PPP connection function setup

4.1 PPP Connection Function Startup Setting


By default, the PPP connection function is not started at FCN/FCJ system startup. To
start PPP connection function at FCN/FCJ system startup, insert the following line in
the JEROS basic setting file:
PppStart=YES
This setting file is loaded only at system startup.

SEE ALSO
For more details on the JEROS basic setting file, see the FCN/FCJ online help documentation.

Table PPP Connection Function Startup Setting


Keyword Default Value Valid Values
PppStart NO YES, NO

„ Setup Precautions
Even if you specify to start the PPP connection function at FCN/FCJ system startup, it
may fail to start for any of the following reasons:
- The PPP setting file does not exist.
- The PPP setting file exists but it contains syntax errors.
- Modem initialization failed.

In the event of an error, a critical error message will be written to the kernel log file.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 44

4.2 IP Routing Setup


The PPP client function automatically manipulates the default gateway setting of the
FCN/FCJ to perform routing control. Therefore, when using the PPP client function,
no default gateway should be defined for Ethernet.
IP routing information must be defined in the IP routing file when both the following
conditions are satisfied:
- PPP client function will be used.
- IP connection will be made to a machine on the Ethernet, crossing a router.

The routing file is loaded only at system startup.

Disable the use of the default gateway in the Ethernet IP routing setup so that the
PPP connection function can automatically set the PPP destination as the default
gateway when it establishes a PPP client connection. When the PPP client
connection is terminated subsequently, this default gateway setting is automatically
deleted.

SEE ALSO
For more details on the JEROS basic setting file and IP routing file, see the FCN/FCJ online help
documentation.

„ Setup Precautions
If a default gateway in specified for Ethernet, the system cannot set up a default route
for PPP when establishing a PPP client connection.

In other words, if a GatewayAddress setting is specified in the JEROS basic setting


file or a default gateway is specified for Ethernet in the IP routing file, a default
gateway cannot be redefined for PPP. As a result, IP connection with the PPP
destination fails.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 45

„ Setup Example
The figure below shows a sample network structure. The JEROS basic setting file and
IP routing file shown below the figure allow the FCN/FCJ to perform IP connection to
machines 1 to 9 in the sample network structure.

Figure Sample Network Structure

z JEROS Basic Setting File


IpAddress=192.168.1.1
SubnetMask=255.255.255.0
#Comment out GatewayAddress
#GatewayAddress=192.168.1.254

z IP Routing File: GATEWAYS file


net 192.168.2.0 gateway 192.168.1.254
net 192.168.3.0 gateway 192.168.1.254

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 46

4.3 COM Port Setup


The COM port for connecting a modem using an RS-232-C cable must be configured
using the COMx port setting file.
This setting file is loaded only at system startup. To use the PPP connection function,
you need to define the settings given below.

SEE ALSO
For more details on the COMx port setting file, see the FCN/FCJ online help documentation.

- Specify RTS/CTS hardware flow control


SendFlowControlMode=CTS
ReceiveFlowControlMode=RTS
- Specify 8-bit character
DataBitLength=8
- Specify 1 stop bit
StopBitLength=1
- No parity bit
Parity=NONE
- Turn on DTR at startup
InitialDTRState=ON
- Enable use of NS16550 chip FIFO buffer
FifoMode=YES
- Specify appropriate baud rate for transmission between FCN/FCJ and modem.
(115200 is a sample value)
Baudrate=115200
- Do not notify API of communication errors
Error Notice=NO

„ Setup Precautions

z COM port settings


COM port settings may be modified by software applications. Where required,
immediately before using the PPP connection function, check to ensure that COM
port settings have not been modified to inappropriate values by another application.

z Baud rate
To increase transfer efficiency, set the baud rate for transmission between the
FCN/FCJ and modem to a larger value than the line baud rate (baud rate between
modems).

z Setup check at PPP startup


A warning will be output at PPP function startup if any of the following conditions is
true:
- InitialDTRState is not set to ON
- SendFlowControlMode is not set to CTS
- ReceiveFlowControlMode is not set to RTS

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 47

4.4 PPP Connection Function Setup


PPP connection function setup involves coding definitions in the PPP setting file. This
setting file is loaded only at system startup. This section describes general coding
rules of the PPP setting file, followed by details of each setting which can be coded in
the file.

„ General Coding Rules of PPP Setting File


The PPP setting file is a text file, which can be edited using Notepad or any other text
editor.
- The space character and the tab character are considered blank characters.
- Leading blank characters on a line are ignored.
- All characters following the ‘#’ character on a line are considered comments.
Comment coded after a setting on the same line must be preceded by one or
more blank characters and a ‘#’ character.
- The following escape sequence can be used in character strings enclosed
within double quote characters (“):
\" : double-quote character (")
\\ : Backslash character (\)
\n : line feed or newline character (LF, 0x0a)
\r : carriage return character (CR, 0x0d)

The basic syntax of a line is as follows:

<setting name>=<setting value>

with an equal (=) character coded between a setting name and a setting value. Blank
characters preceding and following the equal character are optional and if present,
are ignored.

The following syntax is used to code multiple setting values for a setting name:
<setting name>={
<setting value 1>
<setting value 2>
<setting value 3>

・・・
}

In the above syntax, each of the setting value is coded on a separate line.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 48

„ Structure of PPP Setting File


The PPP setting file is divided into three sections.

z Common section – for PPP connection function common settings


These settings configure the overall operation of the PPP connection function, and
are specified on COM port basis.
This section is optional.

z Server section – for PPP server function related settings


These settings configure the PPP server function when the FCN/FCJ is running as
PPP server, and are specified on COM port basis. If the PPP server function is
disabled, this section is not required.

z Client section – for PPP client function related settings


These settings apply when the FCN/FCJ is running as a PPP client, and are specified
on destination basis. If the PPP client function is disabled, this section is not required.

„ Setup Precautions

z Operation mode setting


The operation mode setting (PppMode#) is used to enable or disable subfunctions of
the PPP connection function.
- If set to CLIENT or NONE, the PPP server function is disabled.
- If set to SERVER or NONE, the PPP client function is disabled.
- If the PPP client function is enabled, the system checks the Client section of
the PPP setting file for validity at system startup.
- If the PPP server function is enabled, the system checks the Server section of
the PPP setting file for validity at system startup.

z Defining authentication information for PPP server function


- Authentication information (user names and passwords) to be used by the PPP
server function for authentication is defined on FCN/FCJ basis but not on COM
port basis.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 49

4.4.1 PPP Connection Function Common Settings


PPP connection function common settings are coded in the Common section of the
PPP setting file. The Common section begins with a line coded with the string
"[Common]" and ends with file end or immediately before the next section. PPP
connection function common settings are coded on COM port basis. In the following
description, the ‘#’ symbol denotes the COM port number (‘1’ for COM1 port and '2' for
COM2 port, etc.)

Table List of Common Section Setting Items


Keyword Default Value Valid Values
PppMode# NONE NONE, SERVER, CLIENT, BOTH

„ PppMode# (Operation mode)


The operation mode (PppMode#) setting specifies which PPP subfunctions are to be
enabled or disabled. The connection management function and log function are
always enabled. The PppMode1 setting is used for configuring the COM1 port, while
the PppMode2 setting is used for configuring the COM2 port.

CLIENT : Only the PPP client function is enabled.


SERVER : Only the PPP server function is enabled.
BOTH : Both the PPP server function and PPP client function
are enabled.
NONE : Both the PPP server function and PPP client function
are disabled.

Examples:
PppMode1 = SERVER
PppMode2 = NONE

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 50

4.4.2 PPP Server Function Related Settings


PPP server function related settings are be categorized into required settings and
optional settings. An optional setting may be omitted, and if omitted, its default value
will be used.
PPP server function related settings are coded in the Server section. The Server
section begins with a line coded with the string "[Server]" and ends immediately
before the next section.
PPP server function related settings are coded on COM port basis. In the following
description, the ‘#’ symbol denotes the COM port number (‘1’ for COM1 port and '2' for
COM2 port, etc.)

Table List of Required Settings in Server Section


Keyword Remarks Valid Value Range
ModemAcceptStr# 64 characters max.
ModemDenyStr# 64 characters max.
LocalAddress# n.n.n.n (n: 0 to 255)
RemoteAddress# n.n.n.n (n: 0 to 255)
SubnetMask# n.n.n.n (n: 0 to 255)
IdleTimeout# 0 to 2147483647
UserDef May be omitted if Number of users: unlimited (limited only by
authentication is not used. memory capacity)
User name: 32 characters max.
Password: 32 characters max.

Table List of Optional Settings in Server Section


Keyword Default Value Valid Value Range
TraceMode# NO YES, NO
AcceptMode# YES YES, NO
ModemCommandTimeout# 5 0 to 2147483647
ConnectTimeout# 60 0 to 2147483647
AuthType# PAP NONE, PAP, CHAP

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 51

„ ModemAcceptStr# (modem initialization string for accepting


incoming calls)
Define the string for initializing the modem to accept incoming calls.
The specified string must tally with the modem and telephone line used.
To use the PPP connection function, you need to define the following settings:

- Disables command echo (E0 for general AT modems)


- Enables return of result code (Q0 for general AT modems)
- Selects result code in word format (V1 for general AT modems)
- CD signal goes ON on CONNECT (&C1 for general AT modems)
- Performs hardware flow control (RTS/CTS) (&K3 for general AT modems)
- Accepts incoming calls (S0=1 for general AT modems)

For more details on modem settings, read the manual for your modem.

Example:
ModemAcceptStr1 = ATQ0E0V1&C1&K3S0=1

„ ModemDenyStr# (modem initialization string for rejecting incoming


calls)
Define the string for initializing the modem to reject incoming calls.
The specified string must tally with the modem and telephone line used.
To use the PPP connection function, you need to define the following settings:

- Disables command echo (E0 for general AT modems)


- Enables return of result code (Q0 for general AT modems)
- Selects result code in word format (V1 for general AT modems)
- CD signal goes ON on CONNECT (&C1 for general AT modems)
- Performs hardware flow control (RTS/CTS) (&K3 for general AT modems)
- Rejects incoming calls (S0=1 for general AT modems)

For more details on modem settings, read the manual for your modem.
When using Ethernet, use a different network address from Ethernet.

Example:
ModemDenyStr1 = ATE0Q0V1&K3&C1S0=0

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 52

„ LocalAddress# (local IP address)


Specify the IP address to be assigned to the local machine when it runs as a PPP
server. For convenience of IP routing, specify an IP address having a different
network address as the IPAddress setting in the JEROS basic setting file but the
same network address as the RemoteAddress setting. If this specified setting has the
same network address as the IpAddress setting, a warning will be logged at FCN/FCJ
startup. Specify a private IP address if nothing is specified by the destination.

Example:
LocalAddress1 = 10.20.30.41

TIP
- Private IP addresses (RFC1918)
Private IP addresses are IP addresses which can be freely used in an environment not connected
to the Internet.
If nothing is specified by the destination, select any address from the private address range for
the PPP LocalAddress and RemoteAddress settings.

Table List of Private IP Addresses


Class Private IP Addresses
Class A 0.0.0.0 to 10.255.255.255
Class B 172.16.0.0 to 172.31.255.255
Class C 192.168.0.0 to 192.168.255.255

For more details on private addresses, see RFC1918 (Address Allocation for Private Internets).

„ RemoteAddress# (remote IP address)


Specify the IP address to be assigned to the remote machine (machine requesting for
PPP connection) when the FCN/FCJ runs as a PPP server. For convenience of IP
routing, specify an IP address having a different network address as the IPAddress
setting in the JEROS basic setting file but the same network address as the
LocalAddress setting. If this specified setting has the same network address as the
IpAddress setting, a warning will be logged at FCN/FCJ startup. Specify a private IP
address if nothing is specified by the destination.

Example:
RemoteAddress1 = 10.20.30.40

„ SubnetMask# (subnet mask)


Specify the subnet mask to be used when the FCN/FCJ is running as PPP server.

Example:
SubnetMask1 = 255.255.255.0

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 53

„ IdleTimeout# (PPP server idle timeout)


Specify the timeout duration in seconds when the FCN/FCJ is running as PPP server.
The PPP server function automatically terminates a connection if no IP packet is
transmitted for the duration specified here.
Specify a zero value to disable the idle timeout feature.
When the local FCN/FCJ is running as PPP server, communications processing is
largely on the PPP client side. Therefore, when specifying this setting, it is important
to carefully consider the communications status of PPP clients, as well as consider
how to handle PPP client failures at the server end.
In general, the specified idle timeout duration on the server end should be longer than
the client end.

Example:
IdleTimeout1 = 600

„ UserDef (user definition)


Define username and password for one or more users to be given permission for
requesting PPP connection when the FCN/FCJ is running as PPP server.
Enclose each username string and password string within double quote (“) characters.
Code each username with its corresponding password, delimited by one or more
blank characters (tab or space characters), on a separate line.
Defining a username without a password is not allowed.
A password cannot begin the '@' character.
The UserDef setting is optional when not using the PPP server function, or when not
using PAP and CHAP authentication in PPP server mode.

Example:
UserDef = {
"username" "password"
"PPPuser" "secret"
"user01" "name\"01"
}

„ TraceMode# (trace mode)


Specify whether to output PPP server function operation messages to the console.

YES : Enable output of detailed information to console.


NO : Disable output of detailed information to console.

Examples:
TraceMode1 = YES
TraceMode2 = NO

„ AcceptMode# (PPP server accept mode)


Specify whether the PPP server function should accept PPP connection requests from
clients when the telephone line is free. Specify YES to accept incoming calls from
PPP clients; specify NO to reject incoming calls.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 54
This setting may be modified by API calls.

YES : PPP server function accepts connection.


NO : PPP server function rejects connection.

Example:
AcceptMode1 = YES

„ ModemCommandTimeout# (modem command timeout)


Specify the timeout duration in seconds to be used when waiting for a result to be
returned by a modem after sending an AT command to the modem.
The specified value must tally with the modem used.

Example:
ModemCommandTimeout1 = 10

„ ConnectTimeout# (PPP server connection timeout)


Specify the timeout duration in seconds to be used when waiting for a connection to
be established by PPP after accepting an incoming call from a PPP client at the
beginning of PPP server mode.
The telephone call is disconnected if PPP fails to establish the connection within the
specified timeout duration.

Example:
ConnectTimeout1 = 120

„ AuthType# (PPP server authentication method)


Specify the authentication method to be used in PPP server mode.

PAP : Authenticate using PAP


CHAP : Authenticate using CHAP
NONE : No authentication

Example:
AuthType1 = PAP

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 55

4.4.3 PPP Client Function Related Settings


PPP client function related settings can be categorized into required settings and
optional settings. An optional setting may be omitted, and if omitted, its default value
will be used.
PPP client function related settings are coded in the Client section.
The Client section begins with the line coded with the “[Client]” string and ends at file
end.
The Client section comprises of one default subsection and zero or more destination
subsections.
The default subsection begins with a line coded with the "[Client]" string and ends
immediately before the next subsection.
Each destination subsection begins with a label of the form “@<destination setting
name>:” and ends immediately before the next label or at file end.
A destination setting name identifies a destination subsection, and can be used to
specify a destination in a PPP client connection request.
A destination setting name must begin with a ‘@’ character, and may comprise letters
(A-Z, a-z), digits (0-9) and the hyphen (-) character.
Settings common to all destinations are coded in the default subsection. Destination-
specific settings are coded in individual destination subsections. Settings coded in the
default subsection may be overridden by settings coded in individual destination
subsections.

Structure of Client section:


[Client]
Default subsection
@sakura:
Subsection coded with settings for destination setting name
"sakura".
@momo:
Subsection coded with settings for destination setting name
"momo".
・・・
(end of file)

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 56

Table List of Required Settings in Client Section


Keyword Remarks Valid Value Range
ServerHosts Optional if no hostname is used when calling Number of settings: unlimited (limited only by
the Pppclient class constructor method. In memory capacity)
other words, destination setting names are Hostname: 128 characters max.
always used. Destination setting name: 32 characters max.
DeviceName ETHER, COM1, COM2
ModemInitStr 64 characters max.
ModemDialStr 64 characters max.
IdleTimeout 0 to 2147483647
Phone Number of destinations: 4 max.
Telephone number: 16 characters max.
SubnetMask Optional if LocalAddress is omitted or 0.0.0.0 n.n.n.n (n: 0 to 255)
is specified.
UserName Optional if authentication is not used or 32 characters max.
SCRIPT is specified.
PassWord Optional if authentication is not used or 32 characters max.
SCRIPT is specified.
ChatScript Optional if authentication is not used or CHAP Number of commands: 8 max.
is specified. wait argument: 32 characters max.
send argument: 32 characters max.
Sleep argument: 0 to 2147483647

Table List of Optional Settings in Client Section


Keyword Default Value Valid Value Range
TraceMode NO YES, NO
ModemCommandTimeout 5 0 to 2147483647
ModemConnectTimeout 60 0 to 2147483647
RedialInterval 60 0 to 2147483647
RedialMax 3 0 to 2147483647
ConnectTimeout 60 0 to 2147483647
LocalAddress 0.0.0.0 n.n.n.n (n: 0 to 255)
AuthType PAP NONE, PAP, CHAP, PAP_CHAP, SCRIPT
ChatTimeout 3 0 to 2147483647

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 57

„ ServerHosts (destination hosts setting)


When issuing a PPP client connection request, an application may directly specify a
destination setting name prefixed with a '@' character, or specify a destination
hostname. The ServerHosts setting defines the mapping between host names and
destination setting names.

The ServerHosts setting must be coded in the default


subsection.

If a ServerHosts setting is coded in a destination subsection, a setting file error will be


reported. This setting is optional if no hostname is used when calling the Pppclient
class constructor method. In other words, destination setting names are always used.

ServerHosts = {
<hostname> <destination setting name>
<hostname> <destination setting name>
・・・・・
}

Code each hostname with its corresponding destination setting name, delimited by
blank characters (tab or space characters), on a separate line. If a hostname is
duplicated, the last destination setting name is used.

Example:
ServerHosts = {
sakura @sakura
momo @momo
www @sakura
mail @momo
}

„ DeviceName (device name)


Specify the device name to be used for connection.

COM# : use COM port ('#' denotes the COM port number (1, 2, …)
ETHER: Use Ethernet (PPP cannot be used)

Example:
DeviceName = COM1

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 58

„ ModemInitStr (modem initialization string)


Define the string for initializing the modem when establishing a PPP client connection.
The specified string must tally with the modem and telephone line used.
To use PPP connection function, you need to define the following settings:

- Disables command echo (E0 for general AT modems)


- Enables return of result code (Q0 for general AT modems)
- Selects result code in word format (V1 for general AT modems)
- CD signal goes ON on CONNECT (&C1 for general AT modems)
- Performs hardware flow control (RTS/CTS) (&K3 for general AT modems)

For more details on modem settings, read the manual for your modem.

Example:
ModemInitStr = ATQ0E0V1&C1&K3

„ ModemDialStr (modem dial string)


Defines the string to be used for dialing when the FCN/FCJ is running as a client. The
specified string must tally with the modem and telephone line used.

Example:
ModemDialStr = ATDT

„ IdleTimeout (idle timeout)


Specify the idle timeout duration in seconds to be used when the FCN/FCJ is running
as PPP client. The PPP client function automatically terminates a connection if no IP
packet is transmitted for the duration specified here.
Specify a zero value to disable the idle timeout feature. When running as PPP client,
the PPP client function generally waits for the application that previously issued the
PPP client connection request to issue a PPP client disconnection request.
The idle timeout feature is used to disconnect the telephone line in the event that the
application fails to issue a PPP client disconnect request for whatever reason.

Example:
IdleTimeout = 300

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 59

„ Phone (Destination telephone number)


Define one or more destination telephone numbers.

Phone = {
"<telephone number>"
"<telephone number>"
・・・・
}

Specify one or more telephone numbers for dialing, one on each line, with each
telephone number enclosed within double quote (“) characters. The PPP client
function dials each number in turn, starting from the first telephone number, until a call
is successful *1.

Each telephone number is sent to the modem without modification, and may include
comma (,), hyphen (-) or other special characters required by the modem. For more
details, see the manual of your modem.

Example:
Phone = {
"9,11-1111"
"9,11-1112"
"9,11-1113"
}

With the example settings above, the PPP client function dials a ‘9’ for an external
line, and then dial 111-111 to connect to the PPP server. If the line is busy, it proceeds
to dial “11-1112” and “9,11-1113” in turn.

*1: A call may be unsuccessful because the two modems fail to communicate, the destination is busy or the
destination is not switched on. A call would still be considered successful even if the PPP authentication
subsequently fails.

„ SubnetMask (subnet mask)


Specify the subnet mask used by the destination network. This setting is optional if the
LocalAddress setting is omitted or set to “0.0.0.0”.

Example:
SubnetMask = 255.255.255.0

„ UserName (PPP username)


Specify the username for connecting to the destination PPP server as a string
enclosed within double quote (“) characters. This setting is used if the authentication
method is specified as PAP, CHAP or PAP_CHAP.

Example:
UserName = "ppppass"

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 60

„ PassWord (PPP password)


Specify the password for connecting to the destination PPP server as a string
enclosed within double quote (“) characters. This setting is used if the authentication
method is specified as PAP, CHAP or PAP_CHAP.

Example:
PassWord = "ppppass"

„ ChatScript (chat script)


Code the authentication procedure to be used when SCRIPT authentication method
(UNIX login authentication) is used. Code the login name and password for UNIX
login within the chat script.

ChatScript = {
<command>
<command>
・・・
}

The commands which can be used within a chat script are described below.
wait “string”
Wait until the specified string is received. If it is not received within the duration
designated by ChatTimeout, terminates script execution, and generates a
connection error.
send “string”
Sends the specified string. If the specified string cannot be sent successfully
within the duration designated by ChatTimeout, terminates script execution, and
generates a connection error.
sleep <integer value : 0 to 2147483647>
Suspends processing for the specified number of seconds.

Each command is to be coded on a separate line.

Example:
ChatScript = {
wait "login:"
send "pppuser\n"
wait "Password:"
send "himitsu\n"
wait "Login OK"
}

The above sample chat script performs the following actions:

1. Waits for “login:” string.


2. Sends “pppuser” as login name, appended with a linefeed (LF) character.
3. Waits for “Password” string.
4. Sends “himitsu” as password, appended with a linefeed (LF) character.
5. Waits for “Login OK” string.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 61

„ TraceMode (trace mode)


Specify whether to output PPP client function operation messages to the console.

YES : Enable output of detailed information to console.


NO : Disable output of detailed information to console.

Example:
TraceMode = YES

„ ModemCommandTimeout (modem command timeout)


Specify the timeout duration in seconds to be used when waiting for a result to be
returned by a modem after sending an AT command to the modem. The specified
duration should tally with the modem used.

Example:
ModemCommandTimeout = 10

„ ModemCommandTimeout (modem command timeout)


Specify the timeout duration in seconds to be used when waiting for a successful
connection with a remote modem after sending a dial command string to the modem.
The specified duration should tally with the modem and telephone line used.

Example:
ModemConnectTimeout = 120

„ RedialInterval (redial interval)


Specify the number of seconds to wait before redialing.

Example:
RedialInterval = 5

„ RedialMax (Maximum number of redials)


Specify the maximum number of redials allowed per telephone number.
If more than one destination telephone number is coded, each telephone number is
redialed the number of times specified for this setting before the next telephone
number is attempted. If the call is still unsuccessful after the last telephone number is
attempted, an exception is raised to the application.

Example:
RedialMax = 10

„ ConnectTimeout (connection timeout)


Specify the maximum duration in seconds allowed before a timeout is generated
when waiting for PPP operation to begin after a call is successfully made to a
destination. The specified value should be adjusted to accommodate the time
required for PPP to run at the destination PPP server.

Example:
ConnectTimeout = 30

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 62

„ LocalAddress (local IP address)


Specify the IP address to be assigned to the local machine when it runs as a PPP
client. If this setting is omitted or set to "0.0.0.0", the IP address assigned by the
remote PPP server is used.
This setting should normally be set to “0.0.0.0”.

Example:
LocalAddress = 10.20.30.50

„ AuthType (authentication method)


Specify the authentication method used by the destination PPP server.

PAP : Authenticate using PAP


CHAP : Authenticate using CHAP
PAP_CHAP : Authenticate using PAP or CHAP
(depending on the authentication method of the
remote PPP server)
SCRIPT : Use a login script
NONE : No authentication

If specified to use a login script, the script must be coded separately.

Example:
AuthType = PAP

„ ChatTimeout (chat timeout)


Specify the timeout duration in seconds when sending or receiving a string coded in a
ChatScript. If a chatscript string is not sent or received within the specified timeout
duration, a server connection error is generated. This setting is used only if the
authentication method is set to SCRIPT.

Example:
ChatTimeout = 10

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 63

4.4.4 Sample PPP Setting File


A sample PPP setting file is shown below. This sample makes the following
assumptions about the environment conditions:

- Only the COM1 port is used for PPP communications.


- 3Com SPORTSTAR SUPER 56K modem is used.
- Both PPP server and PPP client functions are used.
- There are two external PPP servers, of which one performs PAP authentication
while the other performs authentication using login script.
- When the local FCN/FCJ runs as a PPP client, the remote PPP server uses
the following connection conditions:
telephone number of destination PPP server: 234-5678
authentication method: PAP
username: pppuser
password: ppppass
IP address will be assigned by the PPP server.
- For authentication by login script, the telephone number, username and
password for the PPP server are "123-4567", "pppuser" and "ppppass"
respectively. Moreover, the IP address is to be assigned by the external PPP
server.

„ Sample PPP Setting File


########################################################################
#
# PPP Setting File : DUOPPP.CNF
#
# 1999/03/04 (c) Copyright Yokogawa Electric Corporation
#
########################################################################
#
# DUOPPP.CNF Setting Items in PPP
#
########################################################################
#
# [Common] Section
#
# KEY =Default # Description
#
# PppMode1 =NONE # PPP Mode(COM1)
# PppMode2 =NONE # PPP Mode(COM2)
#
########################################################################

[Common] # General setting for PPP connection

PppMode1 = BOTH # CLIENT,SERVER,BOTH,NONE


PppMode2 = NONE # CLIENT,SERVER,BOTH,NONE

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 64

########################################################################
#
# [Server] Section
#
# KEY =Default # Description
# The character # in the name represents 1
# for COM1 or 2 for COM2
# ModemAcceptStr# =(*) # Modem command string for Answering
# ModemDenyStr# =(*) # Modem command string for Denying
# LocalAddress# =(*) # Local IP Address
# SubnetMask# =(*) # Subnet Mask
# IdleTimeout# =(*) # PPP Server Idle Timeout (seconds)
#
# UserDef =--- # User Account
#
# RemoteAddress# =--- # Remote IP Address
# TraceMode# =NO # Trace Mode
# AcceptMode# =YES # PPP Server Accept
# ModemCommandTimeout# =5 # Modem Command Timeout (seconds)
# ConnectTimeout# =60 # PPP Connect Timeout (seconds)
# AuthType# =PAP # Authentication Type (NONE,PAP,CHAP)
# DefaultGateway# =NO # Default Gateway
#
# (*) Can not be omitted.
########################################################################

[Server]

# COM1

#ModemAcceptStr1 = ATE0Q0V1S0=1
#ModemAcceptStr1 = ATE0Q0V1&K3&C1S0=1 # DoCoMo 96F2
#ModemAcceptStr1 = ATE0Q0V1&C1S0=1 # DoCoMo MobileArk
#ModemAcceptStr1 = ATE0Q0V1&K0&C1S0=1 # SUNTAC DS96IB
#ModemAcceptStr1 = AT&D2E0Q0V1S0=1 # AIWA MD144XT10V
ModemAcceptStr1 = AT&F1E0Q0V1S32=96S0=1 # 3Com SPORTSTAR SUPER 56K

#ModemDenyStr1 = ATE0Q0V1S0=0
#ModemDenyStr1 = ATE0Q0V1&K3&C1S0=0 # DoCoMo 96F2
#ModemDenyStr1 = ATE0Q0V1&C1S0=0 # DoCoMo MobileArk
#ModemDenyStr1 = ATE0Q0V1&K0&C1S0=0 # SUNTAC DS96IB
#ModemDenyStr1 = AT&D2E0Q0V1S0=0 # AIWA MD144XT10V
ModemDenyStr1 = AT&F1E0Q0V1S32=96S0=0 # 3Com SPORTSTAR SUPER 56K

LocalAddress1 = 192.168.200.101
SubnetMask1 = 255.255.255.0
IdleTimeout1 = 300

RemoteAddress1 = 192.168.200.201
TraceMode1 = NO
AcceptMode1 = YES
ModemCommandTimeout1 = 5
ConnectTimeout1 = 60
AuthType1 = PAP
DefaultGateway1 = NO

# Common Definition

UserDef ={
"pppuser" "ppp9999"
}

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 65

########################################################################
#
# [Client] Section
#
# KEY =Default # Description
#
# ModemInitStr =(*) # Modem Initialization Command String
# ModemDialStr =(*) # Modem Dial Command String
# DeviceName =(*) # Device Name (ETHER,COM1,COM2)
# Phone =(*) # Destination Telephone Number
# IdleTimeout =(*) # Idle Timeout (seconds)
#
# SubnetMask =--- # Subnet Mask
# UserName =--- # User Name
# PassWord =--- # Password
# ChatScrpt =--- # Chat Script
# ServerHosts =--- # Hostname
#
# TraceMode =NO # Trace Mode (YES, NO)
# ModemCommandTimeout =5 # Modem Command Timeout (seconds)
# ModemConnectTimeout =60 # Modem Connect Timeout (seconds)
# RedialMax =3 # Redial Interval
# ConnectTimeout =60 # PPP Connection Timeout (seconds)
# LocalAddress =0.0.0.0 # Local IP Address
# AuthType =PAP # Authentication Type
# (NONE,PAP,CHAP,PAP_CHAP,SCRIPT)
# ChatTimeout =3 # Chat Timeout (seconds)
#
# (*) Can not be omitted.
########################################################################
#
# Default Subsection
#
########################################################################

[Client]

ServerHosts = {
smtpsvr @pap
unixsvr @script
}

#ModemInitStr = ATE0Q0V1S0=0
#ModemInitStr = ATE0Q0V1&K3&C1S0=0 # DoCoMo 96F2
#ModemInitStr = ATE0Q0V1&C1S0=0 # DoCoMo MobileArk
#ModemInitStr = ATE0Q0V1&K0&C1S0=0 # SUNTAC DS96IB
#ModemInitStr = AT&D2E0Q0V1S0=0 # AIWA MD144XT10V
ModemInitStr = AT&F1E0Q0V1S32=96S0=0 # 3Com SPORTSTAR SUPER 56K

ModemDialStr = ATDT # Tone dialing


# ModemDialStr = ATDP # Pulse dialing
# ModemDialStr = ATD # Cellular phone

IdleTimeout = 300
TraceMode = NO
DeviceName = COM1
ModemCommandTimeout = 5
ModemConnectTimeout = 60

RedialMax =3
ConnectTimeout = 60
LocalAddress = 0.0.0.0
##SubnetMask =

AuthType = PAP
UserName = "pppuser"
PassWord = "ppppass"

ChatTimeout =3

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 66
Phone ={
"000-111-2222"
"000-333-4444"
}

########################################################################
# Subsection
# Exsample : Use PAP
########################################################################

@pap:

AuthType = PAP
UserName = "pppuser"
PassWord = " ppppass"
Phone ={
"234-5678"
}

########################################################################
# Subsection
# Exsample : Use SCRIPT
########################################################################

@script:

AuthType = SCRIPT
ChatScript = {
wait "login:" # Wait for "login:" string
send " pppuser \n" # Send your user name with LF character
wait "Password:" # Wait for "Pasword:" string
send " ppppass \n" # Send your password with LF character
wait "Last Login" # Wait for "Last Login" string
}

Phone ={
"123-4567"
}

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<4 FCN/FCJ Setup> 67

„ Remote Machine (PPP client) Setup


We describe here the required setup for a remote machine, which uses Windows dial-
up network to connect to a FCN/FCJ configured with the above sample PPP setting
file. The setup procedure is similar to the usual setup procedure for connecting to an
Internet service provider. The required Windows setup is described below but note
that details of the procedure may vary somewhat depending on the Windows version.

- Specify the telephone number and modem as appropriate.


- Select [PPP:] for type of dial-up server.
- Under advanced settings for security, turn off the checkbox for encrypted
password.
- For network protocols, turn on only the checkbox for TCP/IP.
- For TCP/IP properties, select the option to have IP address assigned by the
server.
- For the username and password, use the username and password defined by
the UserDef setting in the PPP setting file on the FCN/FCJ (username
"pppuser" and password "ppp9999" in above sample PPP setting file).

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


Blank Page
<Appendix 1 PPP Support of E-mail Function > 69

Appendix More about PPP Connection


Function
Appendix 1 PPP Support of E-mail Function
The E-mail function enables data exchange with a remote SMTP server or remote
POP server over a public or internal circuit. It allows E-mails to be sent and received
periodically using the PPP connection function.

„ Send Mail Function


The Send Spool function, which periodically sends E-mails accumulated in the send
spool, support the PPP connection function. Without requiring an application to
explicitly establish and terminate a PPP connection, the Send Spool function can
automatically establish a PPP client connection and send spooled mails to an SMTP
server either periodically or upon request by an application calling the flushSpool()
method.
On the other hand, the Send Immediately function does not support the PPP
connection function so even if an application issues a Send Immediately request, PPP
client connection is not automatically established. To use the Send Immediately
function, an application needs to explicitly establish and terminate a PPP client
connection before and respectively after executing the Send Immediately command.

„ Receive Mail Function


The Receive Mail function supports the PPP connection function. Without requiring an
application to explicitly establish and terminate a PPP connection, the Receive Mail
function can automatically establish a PPP client connection and receive spooled E-
mails from a POP server either periodically or upon request by an application calling
the forceReceive() method.

„ Additional Setting
We describe here the additional setting required for using PPP in the E-mail function.

z UsePpp (PPP usage)


Specify whether to use PPP for the Send Spool and Receive Mail function.
If omitted, the setting defaults to NO.

SEND : Use PPP for Send Spool function; use Ethernet for
Receive Mail function.
Select this option if the SMTP server is on PPP but the
POP server is on Ethernet.
RECV : Use PPP for Receive Mail function; use Ethernet for
Send Spool function.
Select this option if the POP server is on PPP but the
SMTP server is on Ethernet.
BOTH : Use PPP for both Send Spool function and Receive Mail
function.
NONE : Do not use PPP. Use Ethernet for both Send Spool
function and Receive Mail function.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<Appendix 1 PPP Support of E-mail Function > 70

„ How to Perform Setup

z Setup procedure
1. Configure the PPP connection function. Register the hostnames of the SMTP
server and POP server using the destination host (ServerHosts) setting in the
[Client] section of the PPP setting file.
2. Specify whether to use PPP for the Send Spool and Receive Spool function using
the UsePpp setting.
3. Specify the interval for sending spooled E-mails and the interval for receiving
E-mails using the SendCycle and RecvCycle settings respectively.

z Setup precautions
- The send (or receive) interval refers to the waiting time starting from the end of a
PPP connection to the beginning of the next connection, and does not include the
time taken for sending (or receiving).
- If both E-mail sending and receiving have the same PPP destination and the
same interval, PPP connection is established once only. Otherwise, separate
PPP connections are established for sending and receiving.

„ JEROS System Class


The JEROS system class is not extended by PPP support. However, a getUsePpp()
method is added to class jeros.ade.DevMail. For more details, see the online help
documentation.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<Appendix 2 PPP Support of JEROS Emulator> 71

Appendix 2 PPP Support of JEROS Emulator


The JEROS emulator can be used to emulate the PPP connection function on
Windows.

„ Basic Specifications
The PPP connection function of the JEROS emulator performs dummy processing,
without actually establishing and terminating PPP connections.
The emulator’s PPP client function manages PPP client connection statuses
internally. The emulator’s PPP server function treats the PPP server connection as
always disconnected. The emulator’s connection management function responds to
application requests based on settings read from the PPP setting file and an internal
control table maintained by the emulator. Finally, the emulator’s log function outputs
log messages to standard output.
The JEROS emulator does not support the idle timeout feature, which automatically
terminates a connection when there is no transmission for certain duration.

„ Application Compatibility
The JEROS emulator enables communications with remote PPP peers over Ethernet
using communications applications originally written for use with the PPP connection
function, without requiring program modification.

TIP
In Ethernet mode of PPP client function, the PPP client function is disabled and actual
communications is carried out using Ethernet. Ethernet mode setup is defined using the PPP setting
file. (For more details, see Section 4.4.3, “PPP Client Function Related Settings”.)
The PPP client function, though disabled in Ethernet mode, behaves as though it is enabled. Using
Ethernet mode allows communications applications using PPP client function to communicate via
Ethernet without code modification.

„ PPP Setting File


The PPP setting file on the FCN/FCJ can be used without modification. After the
JEROS emulator is started by a driver, it reads the PPP setting file from the \JEROS
subfolder of the driver folder, and performs syntax check and integrity check of the file
content.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<Appendix 2 PPP Support of JEROS Emulator> 72

„ JEROS System Class


The table below lists the functional differences between the JEROS emulator and the
JEROS system class. The following notations are used:

9 : Supported
U: Supported with restrictions
¯: Dummy function

Table Implementation of PPP Connection Function


Function Implementation Remarks
PPP connection Gets PppMode setting. 9 Returns PppMode setting in the PPP setting file.
function Gets local IP address. U For PPP client connection:
(PppControl class, the local IP address setting in the PPP setting file is
PppStatistics class) returned. If the local IP address is specified as
"0.0.0.0", the Windows Ethernet IP address is
returned.
For PPP server connection:
an EPPP_NO_CONNECTION exception is generated.
Gets remote address. U For PPP client connection:
“127.0.0.1” is always returned.
For PPP server connection:
an EPPP_NO_CONNECTION exception is generated.
Gets send/receive statistics. ¯ Always returns zero.
PPP client function Gets trace mode setting. 9 Returns the TraceMode setting in the PPP setting file
(PppClient class) Requests to establish a PPP client ¯ Updates the internal control table.
connection.
Requests to forcedly establish a PPP ¯ Updates the internal control table.
client connection.
Requests to terminate a PPP client ¯ Updates the internal control table.
connection.
Gets PPP client connection status. 9 Returns the value in the internal control table.
Gets idle timeout setting. 9 Returns the setting in the PPP setting file.
Gets COM port name. 9 Returns the setting in the PPP setting file.
PPP server function Sets PPP server accept mode setting ¯ Updates the internal control table.
(PppServer class) Gets PPP server accept mode setting ¯ Returns the value in the internal control table.
Gets trace mode setting. 9 Returns the setting in the PPP setting file.
Requests to forcedly terminate a PPP ¯ Always exits with success.
server connection.
Gets PPP server connection status. ¯ Always returns with disconnected status.

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<Appendix 3 Troubleshooting> 73

Appendix 3 Troubleshooting
This appendix describes how to troubleshoot problems related to PPP connection
failures.

When a PPP connection cannot be successfully established, perform the following


checks.

1. Check specifications of FCN/FCJ.


Check whether the PPP connection function is configured to run on FCN/FCJ.

■ Checklist for FCN/FCJ specifications


□ Is the “Use JAVA program” checkbox turned on in Resource Configurator?

2. Check message log.


Check whether any PPP connection function related message has been logged in the
kernel log file (JRLOGCUR.TXT).
To view the kernel log file, access the “STARDOM FCx Maintenance Page” using a
generic Web browser.
For information on the type of log messages and their meanings, see the online help
documentation.

■ Checklist for message log


□ Has any message been output to the kernel log?

3. Try connecting from a PC.


(useful only in situations where the FCN/FCJ is acting as PPP client)

If the FCN/FCJ fails to connect successfully as a PPP client to a remote PPP server,
try connecting to the remote PPP server from a PC instead and see if connection is
successful.
1. Connect the modem used by the FCN/FCJ to a PC.
2. From the PC, connect to the same remote PPP server machine
using a dial-up network or other means.

This way, you can check whether:


- The telephone number specified for PPP connection is correct.
- The modem, cable and telephone line used are working.

If connection is unsuccessful, consider the following possible causes:


- One or more parameters (authentication type, username,
password, etc.) specified for connecting to the PPP server
are incorrect.
- There is a problem with the destination PPP server.
- There is a problem with the modem, cable or telephone line
used.

■ Checklist for test connection using PC


□ Can PPP connection be successfully established from a PC?

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<Appendix 3 Troubleshooting> 74
4. Check modem or communications adaptor.
Check the cable connection and setup of the modem or communications adaptor
used.

■ Checklist for modem or communications adaptor


□ Is the correct type of RS-232-C cable (straight cable for use with modem) used?
If you are not sure, you can check the modem and cable by performing a test
connection using a PC in place of the FCN/FCJ.

Procedure for checking modem using a PC:


1. Connect the cable and modem used by the FCN/FCJ to a PC.
2. On the PC, run Windows HyperTerminal or some other terminal
software.
3. Send an appropriate command (e.g. "AT" command) to the
modem, and check whether a successful response (e.g. "OK")
is returned.
If no response or garbage is returned, check for invalid
initialization when the modem is switched on.

□ Is the RS-232-C cable attached securely?

5. Check PPP Settings.


Check the content of the PPP setting file.
A checklist for common errors is given below.
For details on valid settings, see Section 4.4, “PPP Connection Function Setup.”

■ Checklist for PPP Setting File


Check [Common] section:
□ Is PppMode correctly specified?
When using client function, specify as CLIENT or BOTH
When using server function, specify as SERVER or BOTH.
Check [Server] section (applicable when using server function):
□ Do the ModemAcceptStr and ModemDenyStr settings match the modem used?
□ Is the required user information specified in UserDef?
□ Are the LocalAddress and RemoteAddress settings correctly specified?
Does the specified address have a different network address as the IpAddress
specified in the JEROS basic setting file?
Check [Client] section (applicable when using server function):
□ Is the required host information specified in ServerHosts?
Is the IP address of the host specified in ServerHosts defined in the host
definition file (HOSTS file)?
□ Does the ModemInitStr setting match the modem used?

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


<Appendix 3 Troubleshooting> 75

6. Check basic setup of FCN/FCJ.


Check the related settings for the serial port in the JEROS basic setting file.

■ Checklist for JEROS basic setting file


□ Is PppStart = YES specified?
□ Is COMxSioDriver = DUONUS_SIO specified?
□ Are port(s) used by the PPP connection function different from the
ConsoleComPort setting?

7. Check Comx port setup.


Check whether the settings in the COMx port setting file are correct.

■ Checklist for COMx port setting file


□ Is the BaudRate setting appropriate?
For baud rates allowed by the modem or communications adaptor used, see the
documentation for the modem or communications adaptor.
□ Is DataBitLength = 8?
□ Is StopBitLength = 1?
□ Is Parity = NONE?
□ Is InithialDRTState = ON?
□ Is SendFlowContorlMode = CTS?
□ Is ReceiveFlowControlMode = RTS?

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00


I

Technical Information Revision History


Document name : STARDOM FCN/FCJ PPP Connection Function User Guide
Document No. : TI 34P02Q51-01E

Oct. 2006/First Edition


New publication

Written by Open Systems Dept.


Industrial Automation Systems Business Div.
Yokogawa Electric Corporation
Published by Yokogawa Electric Corporation
2-9-32 Nakacho, Musashino-shi, Tokyo 180-8750, Japan

TI 34P02Q51-01E 1st Edition Oct. 31, 2006-00

Вам также может понравиться