[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pppd and xringd toghether(was: Debian secretary wont work with pon.)



*- Phillip Neumann wrote about "Debian secretary wont work with pon."
| 
| Hello,
| 
| 
| 
| 
| 
| thanks for the help, now xringd is working all right. But i have
| problems using it with pon.
| 
| My /etc/xringd.conf file:
| -a cat /home/filsin/ring.au > /dev/audio
| R 1-5 R 10 : pon
| 
| 
| It is supposted that when i let the phone line make 2 rings, after 10
| sec. pon should be executed by xrind, isnit?
| Well it doesnot.
| 
| 
| 
| 
| So probably the problem is with pon.
| 
| 
| When is xringd working??     You can see:
| 
| When doing nothing with pon, xringd works (it play the audio file.)
| When putting pon in a terminal, linux stay there, so i must press ctrl-c
| to let him show me the prompt again.... [ PROBLEM 1 ]
| After that xringd is still working.
| Doing pon again will do nothing, but plog said: pppd [185]: tcsetattr:
| Invalid argument. Exit (after that xringd is still working)   [ PROBLEM
| 2 ]
| So i must put pon a 3-th time. This time pon works so at this moment im
| conected to internet. (line busy, so xringd dont hear any rings...)
| Poff. After that xringd doesnt work anymore   :-<   [ PROBLEM 3 ]
| 

I think this might be modem reset problem.  I am just guessing. 
Perhaps by Ctrl-c'ing xringd it does not exit properly and reset the
modem.  Try using '/etc/init.d/xringd start' and '/etc/init.d/xringd
stop' to start and stop the xringd daemon.

| 
| Some email ago, Brian said i should do this:
| 
| >There was a discussion on this over
| >the last week or two.  In the /etc/ppp/ip-up.d directory create a shell
| 
| >script that calls '/etc/init.d/xringd stop > /dev/null' and in the
| >/etc/ppp/ip-down.d directory create a shell script that run
| >/etc/init.d/xringd start > /dev/null'.  It is necessary to restart the
| >xringd deamon so it regains control of the modem, thus the stop and
| >start.
| >
| >Hope that helps,
| >
| >Brian
| 
| 
| 
| so here are my files:
| 
| ---->/etc/ppp/ip-down.d/xringdown:
| /etc/init.d/xring start > /dev/null
| 
| 
| ---->/etc/ppp/ip-up.d/xringd:
| /etc/init.d/xringd stop > /dev/null
| 

These need to be executable scripts.  So it should be:

---->/etc/ppp/ip-down.d/xringdown:
#!/bin/sh
/etc/init.d/xringd start > /dev/null

---->/etc/ppp/ip-up.d/xringd:
#!/bin/sh
/etc/init.d/xringd.stop > /dev/null

then set the scripts executable and groups correctly:

chown root.dip /etc/ppp/ip-up.d/xringd /etc/ppp/ip-down.d/xringdown
chmod 755 /etc/ppp/ip-up.d/xringd /etc/ppp/ip-down.d/xringdown


Hmmmm, a new thought on this. The ip-up.d scripts get run after pppd is
started but if pppd can't control the modem device because xringd has
it locked then the script in ip-up.d to kill xringd is useless. Maybe
the /usr/bin/pon script needs to be modified to kill xringd before
calling pppd. Like so:

---------> /usr/bin/pon:
#!/bin/sh
/etc/init.d/xringd stop > /dev/null
/usr/sbin/pppd call ${1:-provider}

This is all off the top of my head since I do not currently use xringd.
Does anybody else have pppd and xringd working together?

-- 
Brian 
---------------------------------------------------------------------
"Never criticize anybody until you have walked a mile in their shoes,  
 because by that time you will be a mile away and have their shoes." 
							   - unknown  

Mechanical Engineering                              servis@purdue.edu
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: