dial(ADM)


dial, uuchat -- dial a modem

Syntax

/usr/lib/uucp/dialname ttyname telno speed

/usr/lib/uucp/dialname -h [ -c ] ttyname speed

/usr/lib/uucp/uuchat ttyname speed chat-script

Description

A /usr/lib/uucp/dialname program dials a modem attached to ttyname. (name is a dialer name, such as ``HA1200''.) Source for the dialname programs is provided in the respective dialname.c files.

The -h option is used to hang up the modem.

The -c option tells the dialer to wait for a connection and adjust the line rate to match before returning. This feature requires that a SIGUSR2 be sent back to uugetty (see getty(M)) after the modem has been initialized but before the connection has been received. Examine the sample dialers in /usr/lib/uucp to see how this is done.

uucico(ADM), ct(C), and cu(C) use /usr/lib/uucp/dialname.

uucico invokes dial with a ttyname, telno (telephone number), and speed. dial attempts to dial the phone number on the specified line at the given speed. When using dialHA12 or dialHA24, speed can be a range of baud rates. The range is specified with the form:

lowrate - highrate

where lowrate is the minimum acceptable connection baud rate and highrate is the maximum.

The dial program returns the status of the attempt through the following dial return codes:


bit 0x80 = 1
The connection attempt failed.

bits 0x0f = n
If bit 0x80 is a 1, then these bits are the dialer error code n:

0
general or unknown error code

1
line is being used

2
a signal has aborted the dialer

3
dialer arguments are invalid

4
the phone number is invalid

5
the baud rate is invalid or the dialer could not connect at the requested baud rate

6
can't open the line

7
ioctl error on the line

8
timeout waiting for connection

9
no dialtone was detected

10
unused

11
unused

12
unused

13
phone is busy

14
no carrier is detected

15
remote system did not answer

Error codes 12-15 are used to indicate that the problem is at the remote end.

If bit 0x80 is a 0, then these bits are used to indicate the actual connection baud rate. If 0, the baud rate is the same as the baud rate used to dial the phone number or the highest baud rate if a range was specified. Otherwise, these four bits are the CBAUD bits in the struct termio c_flag and the struct sgttyb sg_ispeed and sg_ospeed tty ioctl structures.

You can copy and modify one of the files /usr/lib/uucp/dialname.c to use a different modem. There is a makefile in /usr/lib/uucp that you can copy and modify to use for compiling a new dialer program.

The dial program to be used on a particular line is specified in the fifth field of the entry for that line in /usr/lib/uucp/Devices. If there is no dial program of that name, then uucico, ct, and cu use a built-in dialer, together with the chat-script of that name in /usr/lib/uucp/Dialers.

dial -h is executed by getty when it is respawned on a line shared between dial-in and dial-out. If there is no dial program, then getty uses /usr/lib/uucp/uuchat, passing it the ``&'' chat-script from /usr/lib/uucp/Dialers.

Limitations

You must have the Development System installed in order to compile and install a new dial program.

Files


/usr/lib/uucp/default/dialname
dialer default files

/usr/lib/uucp/dialname.c
source files for the dialer programs

/usr/lib/uucp/makefile
makefile to compile new dialer

/usr/lib/uucp/uuchat
program to interpret a chat-script

See also

atdialer(C), ct(C), cu(C), Dialers(F), getty(M), getty(M), uucico(ADM)

Standards conformance

dial is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005