Subject: Re: poor man's demand-dial
To: None <current-users@NetBSD.ORG>
From: John C. Hayward <johnh@david.wheaton.edu>
List: current-users
Date: 07/06/1995 08:27:47
Roland McGrath <roland@frob.com> wrote back in March 20th:
>>The remaining obstacle to such a thing is that pppd does not cope well
>>with being hung up on. From reading the code in the kernel and pppd,
>>I cannot see why it fails; the loss of carrier detect should produce a
>>SIGHUP sent to pppd, which should die gracefully on receipt of it.
>>But in actuality, when the modem disconnects, pppd hangs there unaware
>>with the line still in PPP line discipline and prevents anything else
>>from using the line.
Michael L. VanLoon replied:
>My pppd always gets sighup'd when the line drops. Of course, I have
>this explicit command in my connect script (the one called by pppd
>-connect blah):
>
> stty crtscts clocal -mdmbuf -parity -ixon -ixany
>
>This is on 1.0....
And other people had other suggestions including turning off proxyarp.
I had a similar problem and after looking at the patches and a bit
of pppd main and some testing I determined that my main problem was
not having the modem option on in pppd. In my casual reading of this
option:
modem Use the modem control lines. On Ultrix, this
option implies hardware flow control, as for the
crtscts option. (This option is not fully imple-
mented.)
I had the impression that if you had crtscts this option was not needed or
may not work. I was wrong.
Before making the connection pppd put the line in local mode (for dialing
and chatting) after the connection is made and if the modem option is
chosen then it turns off local mode (now in uses modem control lines). If
the modem option is not chosen then it leaves it in local mode. A
disconnect only will send a HUP signal to pppd if this modem option is
selected.
In the chat script where you set up pppd on the other side it will need
the modem option as well.
I don't think the 'stty clocal' is required since I am pretty sure that pppd
does this already.
Of course your modem will have to have CD follow the carrier line (AT &C1
on many Hayes compatiable modems). Note some modems have dip switches which
override the Hayes command (eg US Robotics Sportster 14,400 external switch
6) so that needs to be checked as well.
Hope this is helpfull (even if a bit late)
johnh...