0

I just need to send/receive a messages through a unix-socket with PPP. But at first I want to launch the pppd with an usual serial port to make sure I know how it works. As I see, if I bind a pppd to a serial, all the packets that has come there will be unwrapped from PPP/IP/..., and redirected to some port with my application. As I understand this could be only done by creating a new network interface by the pppd. So I am need to give an IP to pppd. After reading a manuals, and getting some problems I figure out an options that seems to be right, but I still can't get it working:

$ pppd local -detach 10.5.57.198: /dev/ttyS4
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS4
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup

Before the title LCP: timeout sending Config-Requests appears I have some time, and I launched in this time ifconfig -- alas, here is no new network interface appeared.

Also I was seeked for a tutorials, but all that I found is doesn't seem to be useful, mostly because these deprecated: these often mention a configs, or soft, or sites that is not present right now. And partially because these mention many actions which doesn't seem to carry a sense for me.

So, do anybody knows, what is the options I am missing?

16
  • What do you have running on the other end of your serial connection? Jun 20, 2014 at 14:18
  • @MichaelHampton nothing yet.
    – Hi-Angel
    Jun 20, 2014 at 14:21
  • PPP stands for "point-to-point protocol". You need 2 points.
    – user193597
    Jun 20, 2014 at 14:24
  • Of course! If nothing is there, nothing can respond! Jun 20, 2014 at 14:25
  • @MichaelHampton but I am not try yet ping a connection. The problem is that the pppd doesn't even try to create a network interface -- what should I ping?
    – Hi-Angel
    Jun 20, 2014 at 14:27

1 Answer 1

0

PPP in general, and pppd specifically, were mostly used for dialup connections, so all of the defaults assume that the pppd process will be started as part of a manually-initiated sequence. The preceding step in the sequence is supposed to be establishing a serial connection (i.e. the modem indicates completion of its handshake with the remote modem by saying CONNECT)

You want to reverse the order of things, starting pppd first and making it wait for the physical connection to appear. The persist option does that.

The documentation for persist says

The maxfail option still has an effect on persistent connections.

so you might also need maxfail 0 to override that. Other related options I can see from a quick look at the man page are demand, idle, and holdoff, all of which will help you control how the in, terface behaves when the peer is not present.

And another useful one: the connect option, which is used in the dialup case to specify a program that dials the modem, might be useful to you. You could specify a connect script that just watches the serial port status and exits when a connection is present.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .