cool, thanks, but that still doesn't help me,,
I need to reset an external serial modem..
something like sending an ATZ directly down the serial port.
any idea bout that???
many thanks..
rgds
frank
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Steve Jeppesen
Sent: Sunday, 30 June 2002 8:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [newbie] How to hard reset a modem from command line???
Check out this guys page. He has created scripts to do some of what
you suggested - only for the Linux Router Project.
Not too sure if they work for anything outside of LRP.
http://65.29.126.224:81/lrp.html
Good Luck!
Steve
On Sun, 30 Jun 2002 17:37:57 +0800
Franki [EMAIL PROTECTED] wrote:
Hi guys,
I am writing a script to run on one of my permanently connected dialup
boxes.. it will run every 60 minuites as a crontab..
The two things I am not sure about.. if I want to issue a hard reset to
the
modem.. how can I do that from a shell script???
Also, what should I do to physically test if a connection is functioning
properly? I could try pinging a dns server somewhere and capture the
result,
grep it or something, but there must be an easier way.. any ideas?
(traceroute maybe?)
I am gonna add alot more to the script, I want it to test the connection 5
times or more before it assumes its not working.
and I want the script to count how many times it issues ifup ppp0 and
not
do it more then 5 times an hour..
anyone feel like jumping in with some suggestions??? :-)
Here is what I have so far:
#!/bin/sh
# Set some variables.
IFCONFIG = `which ifconfig`
EXTERNAL = ppp0
# Test if ppp0 is ip:
if [ ! -z `$IFCONFIG $EXTERNAL 2/dev/null | grep UP` ];
then
# Interface ppp0 is up,
# now see if it is working properly.
# try contacting a site. ping? traceroute? other?
# Yet to do that.. wondering what the best method is...
else
# ppp0 is down.
# Hard reset the modem. (how?)
# Start the ppp0 connection.
ifup ppp0
fi
Thats a long way from finished.. I want the scritp to test the connection
5
times or more.. (I mean try connecting to an external src) before it
assumes
the connection isn't working properly, its a dialup machine, so if its
mailing a big file or something, it might not respond for a while.. so I
don't want to assume that one test is definative.
Kindest regards
Frank
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com