Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Modem not responding after lost connection
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
friction
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2002
Posts: 109

PostPosted: Sun Nov 17, 2002 4:34 am    Post subject: Modem not responding after lost connection Reply with quote

The problem is that when I do a /etc/init.d/net.ppp0 start, it dials, connects, no probs. But when I get kicked off for whatever reason (like modem phone cable being unplugged and put back in), it <eventually> realises that it's been disconnect, and attempts to reconnect. But it fails 100% of the time, and then the script is no longer running.

If i manually call /etc/init.d/net.ppp0 again it says that its running, so I zap it, run it again, but it just turns on the RS and TR lights on on the modem, and does not dial. The scripts are running (pppd and chat), but nothing happens. If I kill the scripts, the RS and TR lights are still on (CS and MR are on also, but they are meant to be), and they only turn off when I reboot, or unplug the modem from the computer.

I put all the variables into /etc/init.d/net.ppp0, as follows:

PEER="OzEmail"
DEBUG="no"
PERSIST="yes"
ONDEMAND="no"
MODEMPORT="/dev/ttyS1"
LINESPEED="115200"
INITSTRING=""
DEFROUTE="yes"
HARDFLOWCTL="yes"
ESCAPECHARS="yes"
PPPOPTIONS=""
USERNAME="username"
PASSWORD="password" (actual username/password altered)
NUMBER="90101444"
REMIP=""
NETMASK=""
IPADDR=""
MRU="768"
MTU="768"
RETRYTIMEOUT="45"
IDLETIMEOUT="600"
PEERDNS="no" (running Bind)
AUTOCFGFILES="yes"
TEMPLATEDIR=/etc/ppp

The contents of /etc/ppp/chat-OzEmail is:

'ABORT' 'BUSY'
'ABORT' 'ERROR'
'ABORT' 'NO ANSWER'
'ABORT' 'NO CARRIER'
'ABORT' 'NO DIALTONE'
'ABORT' 'Invalid Login'
'ABORT' 'Login incorrect'
'' 'ATZ'
'OK' 'ATDT90101444'
'CONNECT' ''
'TIMEOUT' '5'
'~--' ''


I know that it failing to reconnect isn't because the other side hasn't reset, because I was playing with pppd manually and it works fine when I've setup the chat scripts and the peers file, but I have no idea what's causing this, or the modem lights, and it's driving me crazy. Any ideas?
Back to top
View user's profile Send private message
friction
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2002
Posts: 109

PostPosted: Tue Nov 19, 2002 6:25 am    Post subject: Reply with quote

I have since discovered the following cause in /var/log/everything/current:

[pppd] Hangup (SIGHUP)
[pppd] Modem hangup
[pppd] Connection terminated.
[pppd] Connect time 2.1 minutes.
[pppd] Sent 1210 bytes, received 1161 bytes.
[pppd] Couldn't release PPP unit: Invalid argument

<chat conversation for purpose of redial>

[pppd] Serial connection established.
[pppd] Couldn't create new ppp unit: Inappropriate ioctl for device
[pppd] Couldn't reset tty to normal line discipline: Bad file descriptor
[pppd] ioctl(PPPIOCGFLAGS): Bad file descriptor
[pppd] Hangup (SIGHUP)
[pppd] Exit.

A google search found this page, which patches the problem:

http://article.gmane.org/gmane.linux.ppp/369

While it DOES fix the problem, I havn't fully tested it yet, and it appears that if you kill the pppd process it doesn't release ppp0 as a device, which it should. This doesn't appear to be a problem if you use /etc/init.d/net.ppp0 pause/stop to terminate the connection, as it releases the device correctly after receipt of a signal 15.

This problem only exists while using the persist option of pppd, hope this helps someone out there.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum