Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i get 'cu' to automatically

Status
Not open for further replies.

keenanbr

Programmer
Oct 3, 2001
469
IE
how can i get 'cu' to automatically put a '9' (to get an outside line) before the phone number from /usr/lib/uucp/Systems. I have a 2 modems and depending on which line i dial out on I either want the number as is from the file or else prefixed by a 9
 
you can set dial string on one modem to be ATDT9 and the other to ATDT. This of course depends on what dialer you are using.
 
Try putting 9, before the phone number you are dialing, i.e.
9,5551212
 
So if I am understanding your post correctly, you have two modems and two dialout lines, where 1 line requires a 9 to get an outside line and the other doesn't. You want the dialer to automatically use the 9 when needed.

How you do this is you create a separate dialer program for each line using "ATDT" for the dial command of the line that doesn't require a 9, and "ATDT9," for the dial command of the one that does require a 9.

For example, if you are using dialers from the "/usr/lib/uucp/Dialers" file they would look like this:

Code:
#Hayes compatible modem without dial 9
hayesNo9 =,-,  "" ATQ0E0T&D2S0=0X4S2=043\r\c OK\r ATDT\T\r\c Speed
&hayesNo9 =,-, "" +++\dATQ0H OK\r ATE0&D2X4S2=128 OK\r ATS0=1Q1\r

#Hayes compatible modem with dial 9
hayesWith9 =,-,  "" ATQ0E0T&D2S0=0X4S2=043\r\c OK\r ATDT9,\T\r\c Speed
&hayesWith9 =,-, "" +++\dATQ0H OK\r ATE0&D2X4S2=128 OK\r ATS0=1Q1\r

Of course if you are using compiled dialers the setup is different, but you would do the same thing in setting up two separate dialers.

To complete the setup you would then configure the "/usr/lib/uucp/Devices" file to use the desired dialers based on the modem port.

Code:
#Assuming COM1 is the line where you don't dial 9
ACU tty1A - 38400 hayesNo9
Direct tty1A - 38400 direct
#and COM2 is the line where you do dial 9
ACU tty2A - 38400 hayesWith9
Direct tty2A - 38400 direct

Having made these configurations, both lines should work with the existing "/usr/lib/uucp/Systems" settings appending the dial 9 based on whichever line you hit.
 
I am using compiled dialers. Where the source code is provided it is a simple matter to but a 9 before the number and make up a new dialer as suggested. To be a little clearer, I am using MultiTech MT5600MXZ modems. I have dowloaded a SCO-drivers file from multitech's web site and installed as suggested. There is now a dialer program called MultiTech_Systems_MT5600MZX in /usr/lib/uucp and a file in /usr/lib/uucp/default called MultiTech_Systems_MT5600MZX containing various AT commands. The AT commands initialize the modem and turn the modem speaker off. There is also a dial string viz. ATDT^M, (You are probably thinking 'just change to ATDT9^M), unfortunatley the dialer will not work unless i hash this line out. It receives the ATDT command without the numberand then receives the phone number as the next command. If I could get the syntax of this line correct my problem would be solved. I've tried ATDT without the carriage-return but this doesn't work either
 
What do you mean by "the dialer will not work"? Does the dialer give an error message? Does it attempt to dial but just not connect? Does it abbend?

Your dial 9 dialer command should be set to "ATDT9," not "ATDT9". The comma tells the modem to pause for a second so the outside line dialtone can engage.

Please post the exact contents of /usr/lib/uucp/default/MultiTech_Systems_MT5600MZX

It is difficult to debug a dialer without being able to hear the modem, so for testing purposes I suggest you configure the dialer to not turn the speaker off. After you get it working you can then reconfigure for speaker off.
 
The contents of /usr/lib/uucp is :

MDM_SETUP=AT&F&K0S0=2^M
MDM_SPEAKER=ATM0^M
MDM_DIALCMD=ATDT^M
MDM_HANGUP=ATH^M

with this file if i run

cu -x9 NameFromSystems

i see

sending dial string
Sent MODEM <<ATDT^M6876888^M>>-OK
wait for connect - timeout 109
MODEM returned <<^JATDT^MDropping DTRcall cleanup)2)
call _mode(0)
#
#

if i # out the DIAL_CMD i connect successfully
 
Sorry changing DIAL_CMD to ATDT (without the ^M) works. I don't know why it didn't yesterday. Probably for some other reason. Sorry for wasting your time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top