static char sccsid
[] = "@(#)nov.c 4.1 (Berkeley) %G%";
* novopn(telno, flds, dev) connect to novation Smart-Cat
* (similar to hayes smartmodem)
* CF_DIAL,CF_DEVICE - failed
sprintf(dcname
, "/dev/%s", dev
->D_line
);
DEBUG(4, "dc - %s\n", dcname
);
if (strcmp(dev
->D_calldev
, "pulse") == 0)
DEBUG(1, "timeout novation open %s\n", dcname
);
logent("novation open", "TIMEOUT");
signal(SIGALRM
, alarmtr
);
dh
= open(dcname
, 2); /* read/write */
fixline(dh
, dev
->D_speed
);
/* set guard time small so line is in transparant mode */
slowrite(dh
, "\rATS12=1\r");
if (expect("OK", dh
) != 0) {
logent("NOV no line", _FAILED
);
strcpy(devSel
, dev
->D_line
);
if (expect("CONNECT", dh
) != 0) {
logent("NOV no carrier", _FAILED
);
strcpy(devSel
, dev
->D_line
);
DEBUG(4, "novation failed\n", CNULL
);
DEBUG(4, "novation ok\n", CNULL
);
sprintf(dcname
, "/dev/%s", devSel
);
DEBUG(4, "Hanging up fd = %d\n", fd
);
* code to drop DTR -- change to 0 baud then back to default.
* now raise DTR -- close the device & open it again.
* Since we have a getty sleeping on this line, when it wakes up it sends
* all kinds of garbage to the modem. Unfortunatly, the modem likes to
* execute the previous command when it sees the garbage. The previous
* command was to dial the phone, so let's make the last command reset