1847860 Members
4215 Online
104021 Solutions
New Discussion

modem

 
SOLVED
Go to solution
Kevin Wright
Honored Contributor

modem

does anybody know how to pass arguments to a modem through a shell script? I can connect to the modem with cu -l/dev/ and them issue the ATDT command and it works..but all I can do through a script is connect. How do I get the modem to recognize the ATDT command?
here is the script I have been playing with
It connects to the modem and thats all
thanks!

cu -l/dev/cul2a6
echo "~." ATDT "${mailbeep}--${mailcode}--${mess}" &
last=$!
sleep 50;kill $last
4 REPLIES 4
Alan Riggs
Honored Contributor

Re: modem

I sont have a system to test this on, but have you tried command line redirection?

cu -l/dev/cul2a6 << END
echo "~." ATDT "${mailbeep}--${mailcode}--${mess}" &
last=$!
sleep 50;kill $last
END
MANOJ SRIVASTAVA
Honored Contributor

Re: modem

If you are using ATDT command , then possibly you are using it to DIAL a Phone NO , the easier way is to give the whole argument in one line ie

cu -l/dev/ttyxxx

this will dial out , if the modem , systems are configured correctly.
John Palmer
Honored Contributor
Solution

Re: modem

Hi Kevin,

I remember wrestling with tis problem. The solution I came up with was as follows:-

{
echo "atzr"
sleep 1
echo
sleep 1
echo "~.r"
} | cu -l cul??? -m dir

Regards,
John
Lawrence Mahan
Frequent Advisor

Re: modem

If you are trying to do special dialing you may want to read up on the use of 'uucp' with the System and Dialer control files. Then let 'cu' do all of the work for you.