LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-16-2004, 05:28 AM   #1
Pashmina
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Rep: Reputation: 0
To start ppp daemon from Linux


I need to write a Java program to start ppp daemon from my Linux box. M program is not executing properly, it just waits at the prompt and after some time i get "java.net.ConnectException: Connection timed out". Is there any way of knowing actually whether ppp daemon has started?
Has anyone written code for this?

Through wvdial, sometimes ppp daemon dies, with various exit codes of 16, 10, 1 etc.

Any solution for this?
 
Old 07-16-2004, 10:00 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,892

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
"Through wvdial, sometimes ppp daemon dies, with various exit codes of 16, 10, 1 etc."

You can try puting this line in /etc/wvdial.conf
Stupid Mode = 1
Stupid Mode tells pppd to ignore minor errors in the connect protocol and continue on anyway.

"I need to write a Java program to start ppp daemon from my Linux box. M program is not executing properly, it just waits at the prompt and after some time i get "java.net.ConnectException: Connection timed out". Is there any way of knowing actually whether ppp daemon has started?"

If stupid mode works with wvdial then you can try passing the stupid mode parameter from your java program to pppd. I don't know how to specify this. You may have to set up stupid mode in one of the pppd files instead of passing it from java.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 07-23-2004, 03:47 AM   #3
Pashmina
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Starting pppd (from linux) through Java, but connection timing out

Hi,
I am starting ppp daemon from Linux, through java. Am using the following:
Process p = r.exec("sudo /usr/sbin/pppd /dev/ttyG0_00 dump debug crtscts nolock 3.112.8.176:195.0.0.2");
After that i want to fire a URL and retrieve that data. But i get a "java.net.ConnectException: Connection timed out" when i try to read from the stream after opening a url connection.

In var/log/messages, I am getting the following:
Jul 23 03:10:41 patrvlxcps01 pppd[10182]: pppd options in effect:
Jul 23 03:10:41 patrvlxcps01 pppd[10182]: debug^I^I# (from command line)
Jul 23 03:10:41 patrvlxcps01 pppd[10182]: dump^I^I# (from command line)
Jul 23 03:10:41 patrvlxcps01 pppd[10182]: noauth^I^I# (from /etc/ppp/options)
Jul 23 03:10:41 patrvlxcps01 pppd[10182]: /dev/ttyG0_00^I^I# (from command line)
Jul 23 03:10:41 patrvlxcps01 pppd[10182]: nolock^I^I# (from command line)
Jul 23 03:10:41 patrvlxcps01 pppd[10182]: crtscts^I^I# (from command line)
Jul 23 03:10:41 patrvlxcps01 pppd[10182]: 3.112.8.176:195.0.0.2^I^I# (from command line)
Jul 23 03:10:41 patrvlxcps01 pppd[10183]: pppd 2.4.1 started by root, uid 0
Jul 23 03:10:41 patrvlxcps01 pppd[10183]: Using interface ppp0
Jul 23 03:10:41 patrvlxcps01 pppd[10183]: Connect: ppp0 <--> /dev/ttyG0_00
Jul 23 03:11:13 patrvlxcps01 pppd[10183]: Hangup (SIGHUP)
Jul 23 03:11:13 patrvlxcps01 pppd[10183]: Modem hangup
Jul 23 03:11:13 patrvlxcps01 pppd[10183]: Connection terminated.
Jul 23 03:11:13 patrvlxcps01 kernel: dgdm: dgdm_tty_hangup(0_00_0): tty->count wierdness 2
Jul 23 03:11:14 patrvlxcps01 pppd[10183]: Exit.

By the above log, the ppp daemon is dying out and thus am not able to retrieve data from the stream.
Any idea why this could be happening. Do i need to change some settings?

Thanks,
Pashmina
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to start PPP daemon (from linux) through Java Pashmina Programming 1 07-29-2004 04:57 PM
ppp daemon die cts999 Linux - Newbie 4 08-08-2003 05:57 PM
PPP daemon died unexpectedly mandrake_linux Linux - Networking 2 04-21-2001 05:36 PM
PPP Daemon died unexpectedly mandrake_linux Linux - Newbie 0 04-07-2001 11:28 AM
PPP Daemon died unexpectedly mandrake_linux Linux - Networking 1 04-04-2001 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration