Re: Help to start PPP daemon (from linux) through Java

Kanagesh <[email protected]> Tue, 20 Jul 2004 18:07:33 +0530
Newsgroups gmane.linux.redhat.ppp
Message-ID <[email protected]>
Pashmina Mukhi wrote:

>Hi,
>
>Our application requirement is to start PPP daemon (from linux) through =
java
>code, using Runtime.exec() (or any other method) and fire an HTTP URL to
>some devices (called controllers) and get the required data.
>We are facing a =93java.net.ConnectException: Connection timed out=94, w=
hile
>executing the program. This error is coming at the line where we are get=
ting
>an input stream from the URL Connection.
>
>I Want to know the exact mechanism of starting ppp daemon (parameters to
>form the string). I am using
>Process p =3D r.exec("/usr/sbin/pppd " +portName + " 57600");
>Where portName are the ports (ttyG0_00 to ttyG0_04) that I can access.
>
>There is no problem connecting to the controller, via the modems, since
>previously we were using wvdial to dial to the controllers and retrieve =
the
>data. Presently have to do the same through Java code.
>
Hi,

if the peer you are trying to connect to requires authentication (like in
all ISP servers) then you would have to take care of populating the
/etc/ppp/pap-secrets or /etc/ppp/chap-secrets which would have the
username and password required for authenticating into the peer. If the
peer doesn't provide the ip adress for either ends, that would also have =
to
be added to your list of options.

Tried reading this? I found it very extremely helful!!

http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/PPP=
-HOWTO.html