Are you already connected to the remote customer? i.e. did you define a system in the /etc/uucp/Systems which contains the details for cu to connect? E.g.
otherhostname Any ACU 19200 5555000
If so, why do you want to do an "at" command? By running the "cu otherhostname" the modem will dial and connect to the defined phone number (555-5000)using the definition for ACU in the /etc/uucp/Devices file to find the tty port and modem port.
If you would want to automate a connection and transfers I would suggest to install "expect" for that, it works well. Below is a sample of what can be done with expect when connecting to a BBS:
#! /usr/local/bin/expect -f
set timeout -1
spawn cu otherhostname
expect "What is your name:"
send "username\r"
expect "Y,n"
send "\r"
expect "Password:"
send "password\r"
expect "ENTER"
send "\r"
Thanks, I should have stated what I was trying to do first. I am trying to set up a script so my billing people can dial out to a BBS just to look up information. No downloads or uploads.
To run an expect script you should ensure that the path is correct at the start of your script, very much like perl scripts, as per previous example:
#! /usr/local/bin/expect -f
Did you manage to set up the Device and Systems files correctly? If your billing people are going to do it interactively all you will need to do is set this up properly, all they then do is type "cu <otherhostname> and Bob's your uncle.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.