2 char *dialv = "Dial Command, 9.0.160, 16 Oct 2009";
4 /* C K U D I A -- Module for automatic modem dialing. */
7 Copyright (C) 1985, 2009,
8 Trustees of Columbia University in the City of New York.
9 All rights reserved. See the C-Kermit COPYING.TXT file or the
10 copyright text in the ckcmai.c module for disclaimer and permissions.
16 Original (version 1, 1985) author: Herm Fischer, Encino, CA.
17 Contributed to Columbia University in 1985 for inclusion in C-Kermit 4.0.
18 Author and maintainer since 1985: Frank da Cruz, Columbia University,
21 Contributions by many others throughout the years, including: Jeffrey
22 Altman, Mark Berryman, Fernando Cabral, John Chmielewski, Joe Doupnik,
23 Richard Hill, Larry Jacobs, Eric Jones, Tom Kloos, Bob Larson, Peter Mauzey,
24 Joe Orost, Kevin O'Gorman, Kai Uwe Rommel, Dan Schullman, Warren Tucker, and
30 ckdial(char * number) Dial a number or answer a call
31 dialhup() Hang up a dialed connection
32 mdmhup() Use modem commands to hang up
34 All other routines are static.
35 Don't call dialhup() or mdmhup() without first calling ckdial().
39 This module calls externally defined system-dependent functions for
40 communications i/o, as described in CKCPLM.DOC, the C-Kermit Program Logic
41 Manual, and thus should be portable to all systems that implement those
42 functions, and where alarm() and signal() work.
44 HOW TO ADD SUPPORT FOR ANOTHER MODEM:
46 1. In ckuusr.h, define a modem-type number symbol (n_XXX) for the new modem,
49 2. In ckuusr.h, adjust MAX_MDM to the new number of modem types.
51 The remaining steps are in this module:
53 3. Create a MDMINF structure for it. NOTE: The wake_str should include
54 all invariant setup info, e.g. enable result codes, BREAK transparency,
55 modulation negotiation, etc. See ckcker.h for MDMINF struct definition.
57 4. Add the address of the MDMINF structure to the modemp[] array,
58 according to the numerical value of the modem-type number.
60 5. Add the user-visible (SET MODEM) name and corresponding modem number
61 to the mdmtab[] array, in alphabetical order by modem-name string.
63 6. If this falls into a class like is_rockwell, is_supra, etc, add the new
64 one to the definition of the class.
66 7. Adjust the gethrn() routine to account for any special numeric result
67 codes (if it's a Hayes compatible modem).
69 8. Read through the code and add any modem-specific sections as necessary.
70 For most modern Hayes-compatible modems, no specific code will be
73 NOTE: The MINIDIAL symbol is used to build this module to include support
74 for only a minimum number of standard and/or generally useful modem types,
75 namely Hayes 1200 and 2400, ITU-T (CCITT) V.25bis and V.25ter (V.250),
76 Generic-High-Speed, "Unknown", and None. When adding support for a new
77 modem type, keep it outside of the MINIDIAL sections unless it deserves to
90 #ifndef NOOLDMODEMS /* Unless instructed otherwise, */
91 #define OLDMODEMS /* keep support for old modems. */
92 #endif /* NOOLDMODEMS */
94 #ifndef M_OLD /* Hide old modem keywords in SET MODEM table. */
95 #define M_OLD 0 /* Define as CM_INV to make them invisible. */
112 #define INCL_VIO /* Needed for ckocon.h */
130 #include <setjmpex.h>
138 #include "ckcsig.h" /* C-Kermit signal processing */
141 #define signal msignal
147 SIGTYP (*msignal(int type, SIGTYP (*func)(int)))(int);
151 #define signal asignal
153 #define SIGALRM (_NUMSIG+1)
155 SIGTYP (*asignal(int type, SIGTYP (*func)(int)))(int);
156 unsigned aalarm(unsigned);
161 VOS doesn't have alarm(), but it does have some things we can work with.
162 However, we have to catch all the signals in one place to do this, so
163 we intercept the signal() routine and call it from our own replacement.
165 #define signal vsignal
167 SIGTYP (*vsignal(int type, SIGTYP (*func)(int)))(int);
168 int valarm(int interval);
172 #define putchar(x) conoc(x)
176 #define getchar(x) coninc(0)
183 #define putchar(x) conoc(x)
197 #endif /* CKLOGDIAL */
199 char * dialmsg[] = { /* DIAL status strings */
201 /* Keyed to numbers defined in ckcker.h -- keep in sync! */
203 "DIAL succeeded", /* 0 DIA_OK */
204 "Modem type not specified", /* 1 DIA_NOMO */
205 "Communication device not specified", /* 2 DIA_NOLI */
206 "Communication device can't be opened", /* 3 DIA_OPEN */
207 "Speed not specified", /* 4 DIA_NOSP */
208 "Pre-DIAL hangup failed", /* 5 DIA_HANG */
209 "Internal error", /* 6 DIA_IE */
210 "Device input/output error", /* 7 DIA_IO */
211 "DIAL TIMEOUT expired", /* 8 DIA_TIMO */
212 "Interrupted by user", /* 9 DIA_INTR */
213 "Modem not ready", /* 10 DIA_NRDY */
214 "Partial dial OK", /* 11 DIA_PART */
215 "Dial directory lookup error", /* 12 DIA_DIR */
216 "Hangup OK", /* 13 DIA_HUP */
217 NULL, /* 14 (undef) */
218 NULL, /* 15 (undef) */
219 NULL, /* 16 (undef) */
220 NULL, /* 17 (undef) */
221 NULL, /* 18 (undef) */
222 "No response from modem", /* 19 DIA_NRSP */
223 "Modem command error", /* 20 DIA_ERR */
224 "Failure to initialize modem", /* 21 DIA_NOIN */
225 "Phone busy", /* 22 DIA_BUSY */
226 "No carrier", /* 23 DIA_NOCA */
227 "No dialtone", /* 24 DIA_NODT */
228 "Incoming call", /* 25 DIA_RING */
229 "No answer", /* 26 DIA_NOAN */
230 "Disconnected", /* 27 DIA_DISC */
231 "Answered by voice", /* 28 DIA_VOIC */
232 "Access denied / forbidden call", /* 29 DIA_NOAC */
233 "Blacklisted", /* 30 DIA_BLCK */
234 "Delayed", /* 31 DIA_DELA */
235 "Fax connection", /* 32 DIA_FAX */
236 "Digital line", /* 33 DIA_DIGI */
237 "TAPI dialing failure", /* 34 DIA_TAPI */
245 char modemmsg[128] = { NUL, NUL }; /* DIAL response from modem */
252 int mdmtyp = n_GENERIC; /* Default modem type */
253 int mdmset = 0; /* User explicitly set a modem type */
255 int /* SET DIAL parameters */
256 dialhng = 1, /* DIAL HANGUP, default is ON */
257 dialdpy = 0, /* DIAL DISPLAY, default is OFF */
258 mdmspd = 0, /* DIAL SPEED-MATCHING (0 = OFF) */
259 mdmspk = 1, /* MODEM SPEAKER */
260 mdmvol = 2, /* MODEM VOLUME */
261 dialtmo = 0, /* DIAL TIMEOUT */
262 dialatmo = -1, /* ANSWER TIMEOUT */
263 dialksp = 0, /* DIAL KERMIT-SPOOF, 0 = OFF */
264 dialidt = 0, /* DIAL IGNORE-DIALTONE */
266 /* If we can't do RTS/CTS then there's no flow control at first. */
267 /* So we might easily lose the echo to the init string and the OK */
268 /* and then give "No response from modem" errors. */
269 dialpace = 150, /* DIAL PACING */
272 #endif /* CK_RTSCTS */
274 /* 0 = RS232 (drop DTR); 1 = MODEM-COMMAND (e.g. <sec>+++<sec>ATH0) */
275 dialmhu = DEFMDMHUP; /* MODEM HANGUP-METHOD */
278 dialec = 1, /* DIAL ERROR-CORRECTION */
279 dialdc = 1, /* DIAL COMPRESSION */
281 /* VMS can only use Xon/Xoff */
282 dialfc = FLO_XONX, /* DIAL FLOW-CONTROL */
286 dialmth = XYDM_D, /* DIAL METHOD (Tone, Pulse, Defalt) */
287 dialmauto = 1, /* DIAL METHOD is AUTO */
288 dialesc = 0; /* DIAL ESCAPE */
290 int telephony = 0; /* Command-line '-T' option */
292 long dialmax = 0L, /* Modem's max interface speed */
293 dialcapas = 0L; /* Modem's capabilities */
295 int dialsta = DIA_UNK; /* Detailed return code (ckuusr.h) */
298 int ans_cid = 0; /* SET ANSWER parameters */
299 int ans_rings = 0; /* (not used yet...) */
305 int is_hayeshispd = 0;
307 /* Dialing directory list */
309 char *dialdir[MAXDDIR]; /* DIAL DIRECTORY filename array */
310 int ndialdir = 0; /* How many dial directories */
312 /* User overrides for built-in modem commands */
314 char *dialini = NULL; /* MODEM INIT-STRING none */
315 char *dialmstr = NULL; /* MODEM DIALMODE-STRING */
316 char *dialmprmt = NULL; /* MODEM DIALMODE-PROMPT */
317 char *dialcmd = NULL; /* MODEM DIAL-COMMAND, default none */
318 char *dialname = NULL; /* Descriptive name for modem */
319 char *dialdcon = NULL; /* DC ON command */
320 char *dialdcoff = NULL; /* DC OFF command */
321 char *dialecon = NULL; /* EC ON command */
322 char *dialecoff = NULL; /* EC OFF command */
323 char *dialaaon = NULL; /* Autoanswer ON command */
324 char *dialaaoff = NULL; /* Autoanswer OFF command */
325 char *dialhcmd = NULL; /* Hangup command */
326 char *dialhwfc = NULL; /* Hardware flow control command */
327 char *dialswfc = NULL; /* (Local) software f.c. command */
328 char *dialnofc = NULL; /* No (Local) flow control command */
329 char *dialtone = NULL; /* Command to force tone dialing */
330 char *dialpulse = NULL; /* ..to force pulse dialing */
331 char *dialx3 = NULL; /* Ignore dialtone */
332 char *mdmname = NULL;
333 char *dialspon = NULL; /* Speaker On command */
334 char *dialspoff = NULL; /* Speaker Off command */
335 char *dialvol1 = NULL; /* Volume Low command */
336 char *dialvol2 = NULL; /* Volume Medium command */
337 char *dialvol3 = NULL; /* Volume High command */
338 char *dialini2 = NULL; /* Second init string */
340 /* Phone number options */
342 char *dialnpr = NULL; /* DIAL PREFIX, ditto */
343 char *diallac = NULL; /* DIAL LOCAL-AREA-CODE, ditto */
344 char *diallcc = NULL; /* DIAL LOCAL-COUNTRY-CODE, ditto */
345 char *dialixp = NULL; /* DIAL INTL-PREFIX */
346 char *dialixs = NULL; /* DIAL INTL-SUFFIX */
347 char *dialldp = NULL; /* DIAL LD-PREFIX */
348 char *diallds = NULL; /* DIAL LD-SUFFIX */
349 char *diallcp = NULL; /* DIAL LOCAL-PREFIX */
350 char *diallcs = NULL; /* DIAL LOCAL-SUFFIX */
351 char *dialpxi = NULL; /* DIAL PBX-INTERNAL-PREFIX */
352 char *dialpxo = NULL; /* DIAL PBX-OUTSIDE-PREFIX */
353 char *dialsfx = NULL; /* DIAL SUFFIX */
354 char *dialtfp = NULL; /* DIAL TOLL-FREE-PREFIX */
356 char *callid_date = NULL; /* Caller ID strings */
357 char *callid_time = NULL;
358 char *callid_name = NULL;
359 char *callid_nmbr = NULL;
360 char *callid_mesg = NULL;
362 extern char * d_name;
363 extern char * dialtfc[]; /* DIAL TOLL-FREE-AREA-CODE */
364 extern char * dialpxx[]; /* DIAL PBX-EXCHANGE */
365 extern int ntollfree;
368 extern char * dialpucc[]; /* DIAL Pulse countries */
369 extern int ndialpucc;
370 extern char * dialtocc[]; /* DIAL Tone countries */
371 extern int ndialtocc;
373 char *dialmac = NULL; /* DIAL macro */
375 /* Countries where pulse dialing must be used (tone is not available) */
376 static char * pulsecc[] = { NULL }; /* (Unknown at present) */
378 /* Countries where tone dialing may safely be the default. */
379 /* "+" marks countries where pulse is also allowed. */
380 /* Both Pulse and Tone are allowed in Austria & Switzerland but it is not */
381 /* yet known if Tone is universally in those countries. */
382 static char * tonecc[] = {
383 "1", /* + North American Numbering Plan */
384 "31", /* Netherlands */
387 "352", /* Luxembourg */
396 "49", /* + Germany */
404 ATI Model Numbers Examples
405 --- ------------- --------
406 123 Telebit in "total Hayes-1200" emulation mode
407 960 Telebit in Conventional Command (Hayes) mode
408 961 RA12C IBM PC internal original Trailblazer
409 962 RA12E External original Trailblazer
410 963 RM12C Rackmount original Trailblazer
411 964 T18PC IBM PC internal Trailblazer-Plus (TB+)
412 965 T18SA, T2SAA, T2SAS External TB+, T1600, T2000, T3000, WB, and later
413 966 T18RMM Rackmount TB+
414 967 T2MC IBM PS/2 internal TB+
415 968 T1000 External T1000
418 971 T2500 External T2500
419 972 T2500 Rackmount T2500
422 /* Telebit model codes */
424 #define TB_UNK 0 /* Unknown Telebit model */
425 #define TB_BLAZ 1 /* Original TrailBlazer */
426 #define TB_PLUS 2 /* TrailBlazer Plus */
427 #define TB_1000 3 /* T1000 */
428 #define TB_1500 4 /* T1500 */
429 #define TB_1600 5 /* T1600 */
430 #define TB_2000 6 /* T2000 */
431 #define TB_2500 7 /* T2500 */
432 #define TB_3000 8 /* T3000 */
433 #define TB_QBLA 9 /* Qblazer */
434 #define TB_WBLA 10 /* WorldBlazer */
435 #define TB__MAX 10 /* Highest number */
437 char *tb_name[] = { /* Array of model names */
438 "Unknown", /* TB_UNK */
439 "TrailBlazer", /* TB_BLAZ */
440 "TrailBlazer-Plus", /* TB_PLUS */
441 "T1000", /* TB_1000 */
442 "T1500", /* TB_1500 */
443 "T1600", /* TB_1600 */
444 "T2000", /* TB_2000 */
445 "T2500", /* TB_2500 */
446 "T3000", /* TB_3000 */
447 "Qblazer", /* TB_QBLA */
448 "WorldBlazer", /* TB_WBLA */
451 #endif /* MINIDIAL */
453 extern int flow, local, mdmtyp, quiet, backgrd, parity, seslog, network;
454 extern int carrier, duplex, mdmsav, reliable, setreliable;
455 extern int ttnproto, nettype;
457 extern char ttname[], sesfil[];
460 extern int interrupted;
465 #define F_TIME 1 /* timeout */
466 #define F_INT 2 /* interrupt */
467 #define F_MODEM 3 /* modem-detected failure */
468 #define F_MINIT 4 /* cannot initialize modem */
476 int fail_code = 0; /* Default failure reason. */
478 static int xredial = 0;
479 static int func_code; /* 0 = dialing, nonzero = answering */
481 static int mymdmtyp = 0;
483 #define DW_NOTHING 0 /* What we are doing */
487 static int dial_what = DW_NOTHING; /* Nothing at first. */
488 static int nonverbal = 0; /* Hayes in numeric response mode */
490 static CHAR escbuf[6];
491 static long mdmcapas;
493 _PROTOTYP (static VOID dreset, (void) );
494 _PROTOTYP (static int (*xx_ok), (int,int) );
495 _PROTOTYP (static int ddinc, (int) );
496 _PROTOTYP (int dialhup, (void) );
497 _PROTOTYP (int getok, (int,int) );
498 _PROTOTYP (char * ck_time, (void) );
499 _PROTOTYP (static VOID ttslow, (char *, int) );
501 _PROTOTYP (static VOID xcpy, (char *, char *, unsigned int) );
503 _PROTOTYP (static VOID waitfor, (char *) );
504 _PROTOTYP (static VOID dialoc, (char) );
505 _PROTOTYP (static int didweget, (char *, char *) );
506 _PROTOTYP (static VOID spdchg, (long) );
507 _PROTOTYP (static int dialfail, (int) );
508 _PROTOTYP (static VOID gethrw, (void) );
509 _PROTOTYP (static VOID gethrn, (void) );
511 int dialudt = n_UDEF; /* Number of user-defined type */
513 /* BEGIN MDMINF STRUCT DEFINITIONS */
516 Declare structures containing modem-specific information.
517 REMEMBER that only the first SEVEN characters of these names are
518 guaranteed to be unique.
520 First declare the three types that are allowed for MINIDIAL versions.
523 MDMINF CCITT = /* CCITT / ITU-T V.25bis autodialer */
525 According to V.25bis:
526 . Even parity is required for giving commands to the modem.
527 . Commands might or might not echo.
528 . Responses ("Indications") from the modem are terminated by CR and LF.
529 . Call setup is accomplished by:
530 - DTE raises DTR (V.24 circuit 108) [ttopen() does this]
531 - Modem raises CTS (V.24 circuit 106) [C-Kermit ignores this]
532 - DTE issues a call request command ("CRN")
533 - Modem responds with "VAL" ("command accepted")
534 - If the call is completed:
535 modem responds with "CNX" ("call connected");
536 modem turns CTS (106) OFF;
537 modem turns DSR (107) ON;
539 modem responds with "CFI <parameter>" ("call failure indication").
540 . To clear a call, the DTE turns DTR (108) OFF.
541 . There is no mention of the Carrier Detect circuit (109) in the standard.
542 . There is no provision for "escaping back" to the modem's command mode.
544 It is not known whether there exists in real life a pure V.25bis modem.
545 If there is, this code has never been tested on it. See the Digitel entry.
548 "Any CCITT / ITU-T V.25bis conformant modem",
549 "", /* pulse command */
550 "", /* tone command */
551 40, /* dial_time -- programmable -- */
552 ",:", /* pause_chars -- "," waits for programmable time */
553 /* ":" waits for dial tone */
554 10, /* pause_time (seconds, just a guess) */
555 "", /* wake_str (none) */
556 200, /* wake_rate (msec) */
557 "VAL", /* wake_prompt */
558 "", /* dmode_str (none) */
559 "", /* dmode_prompt (none) */
560 "CRN%s\015", /* dial_str */
561 200, /* dial_rate (msec) */
572 "CIC\015", /* aa_on_str */
573 "DIC\015", /* aa_off_str */
589 MDMINF HAYES = /* Hayes 2400 and compatible modems */
591 "Hayes Smartmodem 2400 and compatibles",
592 "ATP\015", /* pulse command */
593 "ATT\015", /* tone command */
595 ",", /* pause_chars */
598 "ATE1Q0V1&S0&C1&D2\015", /* wake_str */
601 "ATQ0&S1\015", /* wake_str */
603 "ATQ0\015", /* wake_str */
607 "OK\015", /* wake_prompt */
609 "", /* dmode_prompt */
610 "ATD%s\015", /* dial_str, user supplies D or T */
614 "ATQ0H0\015", /* hup_str */
622 "ATS0=1\015", /* aa_on_str */
623 "ATS0=0\015", /* aa_off_str */
626 "ATM1\015", /* sp_on_str */
627 "ATM0\015", /* sp_off_str */
628 "ATL1\015", /* vol1_str */
629 "ATL2\015", /* vol2_str */
630 "ATL3\015", /* vol3_str */
631 "ATX3\015", /* ignoredt */
633 2400L, /* max_speed */
639 The intent of the "unknown" modem is to allow KERMIT to support
640 unknown modems by having the user type the entire autodial sequence
641 (possibly including control characters, etc.) as the "phone number".
642 The protocol and other characteristics of this modem are unknown, with
643 some "reasonable" values being chosen for some of them. The only way to
644 detect if a connection is made is to look for carrier.
647 MDMINF UNKNOWN = /* Information for "Unknown" modem */
649 "Unknown", /* name */
650 "", /* pulse command */
651 "", /* tone command */
653 "", /* pause_chars */
657 "", /* wake_prompt */
659 NULL, /* dmode_prompt */
660 "%s\015", /* dial_str */
690 MDMINF ATTISN = /* AT&T ISN Network */
692 "", /* pulse command */
693 "", /* tone command */
696 "", /* Pause characters */
698 "\015\015\015\015", /* Wake string */
700 "DIAL", /* Wake prompt */
702 "", /* dmode_prompt */
703 "%s\015", /* dial_str */
732 MDMINF ATTMODEM = /* information for AT&T switched-network modems */
733 /* "Number" following "dial" can include: p's and
734 * t's to indicate pulse or tone (default) dialing,
735 * + for wait for dial tone, , for pause, r for
736 * last number dialed, and, except for 2224B, some
737 * comma-delimited options like o12=y, before number.
739 * "Important" options for the modems:
741 * All: Except for 2224B, enable option 12 for "transparent
742 * data," o12=y. If a computer port used for both
743 * incoming and outgoing calls is connected to the
744 * modem, disable "enter interactive mode on carriage
745 * return," EICR. The Kermit "dial" command can
746 * function with EIA leads standard, EIAS.
748 * 2212C: Internal hardware switches at their default
749 * positions (four rockers down away from numbers)
750 * unless EICR is not wanted (rocker down at the 4).
751 * For EIAS, rocker down at the 1.
753 * 2224B: Front-panel switch position 1 must be up (at the 1,
754 * closed). Disable EICR with position 2 down.
755 * For EIAS, position 4 down.
756 * All switches on the back panel down.
758 * 2224CEO: All front-panel switches down except either 5 or 6.
759 * Enable interactive flow control with o16=y.
760 * Select normal asynchronous mode with o34=0 (zero).
761 * Disable EICR with position 3 up. For EIAS, 1 up.
762 * Reset the modem after changing switches.
764 * 2296A: If option 00 (zeros) is present, use o00=0.
765 * Enable interactive flow control with o16=y.
766 * Select normal asynchronous mode with o34=0 (zero).
767 * (available in Microcom Networking version, but
768 * not necessarily other models of the 2296A).
769 * Enable modem-port flow control (if available) with
770 * o42=y. Enable asynchronous operation with o50=y.
771 * Disable EICR with o69=n. For EIAS, o66=n, using
775 "AT&T switched-network modems",
776 "", /* pulse command */
777 "", /* tone command */
779 ",", /* pause_chars */
783 "", /* wake_prompt */
785 "", /* dmode_prompt */
786 "at%s\015", /* dial_str */
815 MDMINF ATTDTDM = /* AT&T Digital Terminal Data Module */
816 /* For dialing: KYBD switch down, others usually up. */
818 "AT&T Digital Terminal Data Module",
819 "", /* pulse command */
820 "", /* tone command */
822 "", /* pause_chars */
826 "", /* wake_prompt */
828 "", /* dmode_prompt */
829 "%s\015", /* dial_str */
858 MDMINF DIGITEL = /* Digitel DT-22 CCITT variant used in Brazil */
860 Attempts to adhere strictly to the V.25bis specification do not produce good
861 results in real life. The modem for which this code was developed: (a)
862 ignores parity; (b) sometimes terminates responses with LF CR instead of CR
863 LF; (c) has a Hayes-like escape sequence; (d) supports a hangup ("HUP")
864 command. Information from Fernando Cabral in Brasilia.
867 "Digitel DT-22 CCITT dialer",
868 "", /* pulse command */
869 "", /* tone command */
870 40, /* dial_time -- programmable -- */
871 ",:", /* pause_chars -- "," waits for programmable time */
872 /* ":" waits for dial tone */
873 10, /* pause_time (seconds, just a guess) */
874 "HUP\015", /* wake_str (Not Standard CCITT) */
875 200, /* wake_rate (msec) */
876 "VAL", /* wake_prompt */
877 "", /* dmode_str (none) */
878 "", /* dmode_prompt (none) */
879 "CRN%s\015", /* dial_str */
880 200, /* dial_rate (msec) */
881 1100, /* esc_time (Not Standard CCITT) */
882 43, /* esc_char (Not Standard CCITT) */
883 "HUP\015", /* hup_str (Not Standard CCITT) */
891 "CIC\015", /* aa_on_str */
892 "DIC\015", /* aa_off_str */
908 MDMINF H_1200 = /* Hayes 1200 and compatible modems */
910 "Hayes Smartmodem 1200 and compatibles",
911 "ATP\015", /* pulse command */
912 "ATT\015", /* tone command */
914 ",", /* pause_chars */
917 "ATE1Q0V1\015", /* wake_str */
919 "ATQ0\015", /* wake_str */
922 "OK\015", /* wake_prompt */
924 "", /* dmode_prompt */
925 "ATD%s\015", /* dial_str */
929 "ATQ0H0\015", /* hup_str */
937 "ATS0=1\015", /* aa_on_str */
938 "ATS0=0\015", /* aa_off_str */
941 "ATM1\015", /* sp_on_str */
942 "ATM0\015", /* sp_off_str */
943 "ATL1\015", /* vol1_str */
944 "ATL2\015", /* vol2_str */
945 "ATL3\015", /* vol3_str */
948 1200L, /* max_speed */
954 MDMINF H_ULTRA = /* Hayes high-speed */
956 "Hayes Ultra/Optima/Accura 96/144/288", /* U,O,A */
957 "ATP\015", /* pulse command */
958 "ATT\015", /* tone command */
960 ",", /* pause_chars */
963 "ATE1Q0V1X4N1Y0&S0&C1&D2S37=0S82=128\015", /* wake_str */
966 "ATQ0X4N1Y0&S1S37=0S82=128\015", /* wake_str */
968 "ATQ0X4N1Y0S37=0S82=128\015", /* wake_str */
972 "OK\015", /* wake_prompt */
974 "", /* dmode_prompt */
975 "ATD%s\015", /* dial_str */
979 "ATQ0H0\015", /* hup_str */
980 "AT&K3\015", /* hwfc_str */ /* OK for U,O */
981 "AT&K4\015", /* swfc_str */ /* OK for U,O */
982 "AT&K0\015", /* nofc_str */ /* OK for U,O */
983 "AT&Q5S36=7S48=7\015", /* ec_on_str */ /* OK for U,O */
984 "AT&Q0\015", /* ec_off_str */ /* OK for U,O */
985 "ATS46=2\015", /* dc_on_str */
986 "ATS46=0\015", /* dc_off_str */
987 "ATS0=1\015", /* aa_on_str */
988 "ATS0=0\015", /* aa_off_str */
991 "ATM1\015", /* sp_on_str */
992 "ATM0\015", /* sp_off_str */
993 "ATL1\015", /* vol1_str */
994 "ATL2\015", /* vol2_str */
995 "ATL3\015", /* vol3_str */
996 "ATX3\015", /* ignoredt */
998 115200L, /* max_speed */ /* (varies) */
999 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1004 MDMINF H_ACCURA = /* Hayes Accura */
1005 { /* GUESSING IT'S LIKE ULTRA & OPTIMA */
1007 "ATP\015", /* pulse command */
1008 "ATT\015", /* tone command */
1010 ",", /* pause_chars */
1013 "ATE1Q0V1X4N1Y0&S0&C1&D2S37=0\015", /* wake_str */
1016 "ATQ0X4N1Y0&S1S37=0\015", /* wake_str */
1018 "ATQ0X4N1Y0S37=0\015", /* wake_str */
1022 "OK\015", /* wake_prompt */
1024 "", /* dmode_prompt */
1025 "ATD%s\015", /* dial_str */
1027 1100, /* esc_time */
1029 "ATQ0H0\015", /* hup_str */
1030 "AT&K3\015", /* hwfc_str */
1031 "AT&K4\015", /* swfc_str */
1032 "AT&K0\015", /* nofc_str */
1033 "AT&Q5S36=7S48=7\015", /* ec_on_str */
1034 "AT&Q0\015", /* ec_off_str */
1035 "ATS46=2\015", /* dc_on_str */
1036 "ATS46=0\015", /* dc_off_str */
1037 "ATS0=1\015", /* aa_on_str */
1038 "ATS0=0\015", /* aa_off_str */
1040 "", /* sb_off_str */
1041 "ATM1\015", /* sp_on_str */
1042 "ATM0\015", /* sp_off_str */
1043 "ATL1\015", /* vol1_str */
1044 "ATL2\015", /* vol2_str */
1045 "ATL3\015", /* vol3_str */
1046 "ATX3\015", /* ignoredt */
1048 115200L, /* max_speed */ /* (varies) */
1049 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1054 MDMINF PPI = /* Practical Peripherals */
1056 "Practical Peripherals V.22bis or higher with V.42 and V.42bis",
1057 "ATP\015", /* pulse command */
1058 "ATT\015", /* tone command */
1060 ",", /* pause_chars */
1063 /* In newer models S82 (BREAK handling) was eliminated, causing an error. */
1065 "ATQ0X4N1&S0&C1&D2S37=0S82=128\015", /* wake_str */
1067 "ATQ0X4N1S37=0S82=128\015", /* wake_str */
1069 #else /* So now we use Y0 instead */
1071 "ATE1Q0V1X4N1&S0&C1&D2Y0S37=0\015", /* wake_str */
1074 "ATQ0X4N1Y0&S1S37=0\015", /* wake_str */
1076 "ATQ0X4N1Y0S37=0\015", /* wake_str */
1079 #endif /* COMMENT */
1081 "OK\015", /* wake_prompt */
1083 "", /* dmode_prompt */
1084 "ATD%s\015", /* dial_str */
1086 1100, /* esc_time */
1088 "ATQ0H0\015", /* hup_str */
1089 "AT&K3\015", /* hwfc_str */
1090 "AT&K4\015", /* swfc_str */
1091 "AT&K0\015", /* nofc_str */
1092 "AT&Q5S36=7S48=7\015", /* ec_on_str */
1093 "AT&Q0S36=0S48=128\015", /* ec_off_str */
1094 "ATS46=2\015", /* dc_on_str */
1095 "ATS46=0\015", /* dc_off_str */
1096 "ATS0=1\015", /* aa_on_str */
1097 "ATS0=0\015", /* aa_off_str */
1099 "", /* sb_off_str */
1100 "ATM1\015", /* sp_on_str */
1101 "ATM0\015", /* sp_off_str */
1102 "ATL1\015", /* vol1_str */
1103 "ATL2\015", /* vol2_str */
1104 "ATL3\015", /* vol3_str */
1105 "ATX3\015", /* ignoredt */
1107 115200L, /* max_speed */
1108 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1113 MDMINF DATAPORT = /* AT&T Dataport */
1115 "AT&T / Paradyne DataPort V.32 or higher",
1116 "ATP\015", /* pulse command */
1117 "ATT\015", /* tone command */
1119 ",", /* pause_chars */
1122 Note: S41=0 (use highest modulation) omitted, since it is not
1123 supported on the V.32 and lower models. So let's not touch it.
1126 "ATQ0E1V1X6&S0&C1&D2&Q0Y0\\K5S78=0\015", /* wake_str */
1129 "ATQ0E1X6&S1&Q0Y0\\K5S78=0\015", /* wake_str */
1131 "ATQ0E1X6&Q0Y0\\K5S78=0\015", /* wake_str */
1135 "OK\015", /* wake_prompt */
1137 "", /* dmode_prompt */
1138 "ATD%s\015", /* dial_str */
1140 1100, /* esc_time */
1142 "ATQ0H0\015", /* hup_str */
1143 "AT\\Q3\015", /* hwfc_str */
1144 "AT\\Q1\\X0\015", /* swfc_str */
1145 "AT\\Q0\015", /* nofc_str */
1146 "AT\\N7\015", /* ec_on_str */
1147 "AT\\N0\015", /* ec_off_str */
1148 "AT%C1\015", /* dc_on_str */
1149 "AT%C0\015", /* dc_off_str */
1150 "ATS0=1\015", /* aa_on_str */
1151 "ATS0=0\015", /* aa_off_str */
1153 "", /* sb_off_str */
1154 "ATM1\015", /* sp_on_str */
1155 "ATM0\015", /* sp_off_str */
1156 "ATL1\015", /* vol1_str */
1157 "ATL2\015", /* vol2_str */
1158 "ATL3\015", /* vol3_str */
1159 "ATX3\015", /* ignoredt */
1161 57600L, /* max_speed */
1162 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1167 MDMINF UCOM_AT = /* Microcom DeskPorte FAST ES 28.8 */
1169 "Microcom DeskPorte FAST 28.8",
1170 "ATP\015", /* pulse command */
1171 "ATT\015", /* tone command */
1173 ",", /* pause_chars */
1176 "ATE1Q0V1X4\\N0F0&S0&C1&D2\\K5\015", /* wake_str */
1179 "ATQ0X4F0&S1\\K5\015", /* wake_str */
1181 "ATQ0X4F0\\K5\015", /* wake_str */
1185 "OK\015", /* wake_prompt */
1187 "", /* dmode_prompt */
1188 "ATD%s\015", /* dial_str */
1190 1100, /* esc_time */
1192 "ATQ0H0\015", /* hup_str */
1193 "AT\\Q3\015", /* hwfc_str */
1194 "AT\\Q1\015", /* swfc_str */
1195 "AT\\H0\\Q0\015", /* nofc_str */
1196 "AT\\N3\015", /* ec_on_str */
1197 "AT\\N0\015", /* ec_off_str */
1198 "AT%C3\015", /* dc_on_str */
1199 "AT%C0\015", /* dc_off_str */
1200 "ATS0=1\015", /* aa_on_str */
1201 "ATS0=0\015", /* aa_off_str */
1202 "AT-J0\015", /* sb_on_str */
1203 "AT-J1\015", /* sb_off_str */
1204 "ATM1\015", /* sp_on_str */
1205 "ATM0\015", /* sp_off_str */
1206 "ATL1\015", /* vol1_str */
1207 "ATL2\015", /* vol2_str */
1208 "ATL3\015", /* vol3_str */
1209 "ATX3\015", /* ignoredt */
1211 115200L, /* max_speed */
1212 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1217 MDMINF ZOOM = /* Zoom Telephonics V.32bis */
1219 "Zoom Telephonics V.32bis",
1220 "ATP\015", /* pulse command */
1221 "ATT\015", /* tone command */
1223 ",", /* pause_chars */
1226 "ATE1Q0V1N1W1X4&S0&C1&D2S82=128S95=47\015", /* wake_str */
1229 "ATQ0E1N1W1X4&S1S82=128S95=47\015", /* wake_str */
1231 "ATQ0E1N1W1X4S82=128S95=47\015", /* wake_str */
1235 "OK\015", /* wake_prompt */
1237 "", /* dmode_prompt */
1238 "ATD%s\015", /* dial_str */
1240 1100, /* esc_time */
1242 "ATQ0H0\015", /* hup_str */
1243 "AT&K3\015", /* hwfc_str */
1244 "AT&K4\015", /* swfc_str */
1245 "AT&K0\015", /* nofc_str */
1246 "AT&Q5S36=7S48=7\015", /* ec_on_str */
1247 "AT&Q0\015", /* ec_off_str */
1248 "ATS46=138\015", /* dc_on_str */
1249 "ATS46=136\015", /* dc_off_str */
1250 "ATS0=1\015", /* aa_on_str */
1251 "ATS0=0\015", /* aa_off_str */
1253 "", /* sb_off_str */
1254 "ATM1\015", /* sp_on_str */
1255 "ATM0\015", /* sp_off_str */
1256 "ATL1\015", /* vol1_str */
1257 "ATL2\015", /* vol2_str */
1258 "ATL3\015", /* vol3_str */
1259 "ATX3\015", /* ignoredt */
1261 57600L, /* max_speed */
1262 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1267 MDMINF ZYXEL = /* ZyXEL U-Series */
1269 "ZyXEL U-Series V.32bis or higher",
1270 "ATP\015", /* pulse command */
1271 "ATT\015", /* tone command */
1273 ",", /* pause_chars */
1276 "ATE1Q0V1&S0&C1&D2&N0X5&Y1\015", /* wake_str */
1279 "ATQ0E1&S1&N0X5&Y1\015", /* wake_str */
1281 "ATQ0E1&N0X5&Y1\015", /* wake_str */
1285 "OK\015", /* wake_prompt */
1287 "", /* dmode_prompt */
1288 "ATD%s\015", /* dial_str */
1290 1100, /* esc_time */
1292 "ATQ0H0\015", /* hup_str */
1293 "AT&H3\015", /* hwfc_str */
1294 "AT&H4\015", /* swfc_str */
1295 "AT&H0\015", /* nofc_str */
1296 "AT&K3\015", /* ec_on_str */
1297 "AT&K0\015", /* ec_off_str */
1298 "AT&K4\015", /* dc_on_str */
1299 "AT&K3\015", /* dc_off_str */
1300 "ATS0=1\015", /* aa_on_str */
1301 "ATS0=0\015", /* aa_off_str */
1303 "", /* sb_off_str */
1304 "ATM1\015", /* sp_on_str */
1305 "ATM0\015", /* sp_off_str */
1306 "ATL1\015", /* vol1_str */
1307 "ATL2\015", /* vol2_str */
1308 "ATL3\015", /* vol3_str */
1309 "ATX3\015", /* ignoredt */
1311 57600L, /* max_speed */
1312 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1317 MDMINF ZOLTRIX = /* Zoltrix */
1319 "Zoltrix V.32bis and V.34 modems with Rockwell ACI chipset",
1320 "ATP\015", /* pulse command */
1321 "ATT\015", /* tone command */
1323 ",", /* pause_chars */
1326 "ATE1Q0V1F0W1X4Y0&S0&C1&D2\\K5S82=128S95=41\015", /* wake_str */
1329 "ATQ0E1F0W1X4Y0&S1\\K5S82=128S95=41\015", /* wake_str */
1331 "ATQ0E1F0W1X4Y0\\K5S82=128S95=41\015", /* wake_str */
1335 "OK\015", /* wake_prompt */
1337 "", /* dmode_prompt */
1338 "ATD%s\015", /* dial_str */
1340 1100, /* esc_time */
1342 "ATQ0H0\015", /* hup_str */
1343 "AT&K3\015", /* hwfc_str */
1344 "AT&K4S32=17S33=19\015", /* swfc_str */
1345 "AT&K0\015", /* nofc_str */
1346 "AT\\N3\015", /* ec_on_str */
1347 "AT\\N1\015", /* ec_off_str */
1348 "ATS46=138%C3\015", /* dc_on_str */
1349 "ATS46=136%C0\015", /* dc_off_str */
1350 "ATS0=1\015", /* aa_on_str */
1351 "ATS0=0\015", /* aa_off_str */
1352 "AT\\N0\015", /* sb_on_str */
1353 "AT&Q0\015", /* sb_off_str */
1354 "ATM1\015", /* sp_on_str */
1355 "ATM0\015", /* sp_off_str */
1356 "ATL1\015", /* vol1_str */
1357 "ATL2\015", /* vol2_str */
1358 "ATL3\015", /* vol3_str */
1359 "ATX3\015", /* ignoredt */
1361 57600L, /* max_speed */
1362 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1367 MDMINF MOTOROLA = { /* Motorola FasTalk II or Lifestyle */
1369 "\E" and "\X" commands removed - Motorola Lifestyle doesn't have them.
1370 \E0 = Don't echo while online
1371 \X0 = Process Xon/Xoff but don't pass through
1373 "Motorola FasTalk II or Lifestyle", /* Name */
1374 "ATP\015", /* pulse command */
1375 "ATT\015", /* tone command */
1377 ",", /* pause_chars */
1380 "ATE1Q0V1X4&S0&C1&D2\\K5\\V1\015", /* wake_str */
1383 "ATQ0E1X4&S1\\K5\\V1\015", /* wake_str */
1385 "ATQ0E1X4\\K5\\V1\015", /* wake_str */
1389 "OK\015", /* wake_prompt */
1391 "", /* dmode_prompt */
1392 "ATD%s\015", /* dial_str */
1394 1100, /* esc_time */
1396 "ATQ0H0\015", /* hup_str */
1397 "AT\\Q3\015", /* hwfc_str */
1398 "AT\\Q1\015", /* swfc_str */
1399 "AT\\Q0\015", /* nofc_str */
1400 "AT\\N6\015", /* ec_on_str */
1401 "AT\\N1\015", /* ec_off_str */
1402 "AT%C1\015", /* dc_on_str */
1403 "AT%C0\015", /* dc_off_str */
1404 "ATS0=1\015", /* aa_on_str */
1405 "ATS0=0\015", /* aa_off_str */
1406 "AT\\J0\015", /* sb_on_str */
1407 "AT\\J1\015", /* sb_off_str */
1408 "ATM1\015", /* sp_on_str */
1409 "ATM0\015", /* sp_off_str */
1410 "ATL1\015", /* vol1_str */
1411 "ATL2\015", /* vol2_str */
1412 "ATL3\015", /* vol3_str */
1413 "ATX3\015", /* ignoredt */
1415 57600L, /* max_speed */
1416 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1421 MDMINF BOCA = /* Boca */
1423 "BOCA 14.4 Faxmodem",
1424 "ATP\015", /* pulse command */
1425 "ATT\015", /* tone command */
1427 ",", /* pause_chars */
1430 "ATE1Q0V1F1N1W1&S0&C1&D2\\K5S37=11S82=128S95=47X4\015", /* wake_str */
1433 "ATQ0E1F1N1W1&S1\\K5S37=11S82=128S95=47X4\015", /* wake_str */
1435 "ATQ0E1F1N1W1\\K5S37=11S82=128S95=47X4\015", /* wake_str */
1439 "OK\015", /* wake_prompt */
1441 "", /* dmode_prompt */
1442 "ATD%s\015", /* dial_str */
1444 1100, /* esc_time */
1446 "ATQ0H0\015", /* hup_str */
1447 "AT&K3\015", /* hwfc_str */
1448 "AT&K4\015", /* swfc_str */
1449 "AT&K0\015", /* nofc_str */
1450 "AT\\N3S36=7S48=7\015", /* ec_on_str */
1451 "AT\\N1\015", /* ec_off_str */
1452 "ATS46=138\015", /* dc_on_str */
1453 "ATS46=136\015", /* dc_off_str */
1454 "ATS0=1\015", /* aa_on_str */
1455 "ATS0=0\015", /* aa_off_str */
1457 "", /* sb_off_str */
1458 "ATM1\015", /* sp_on_str */
1459 "ATM0\015", /* sp_off_str */
1460 "ATL1\015", /* vol1_str */
1461 "ATL2\015", /* vol2_str */
1462 "ATL3\015", /* vol3_str */
1463 "ATX3\015", /* ignoredt */
1465 57600L, /* max_speed */
1466 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1471 MDMINF INTEL = /* Intel */
1473 "Intel High-Speed Faxmodem",
1474 "ATP\015", /* pulse command */
1475 "ATT\015", /* tone command */
1477 ",", /* pause_chars */
1480 "ATE1Q0V1Y0X4&S0&C1&D2\\K1\\V2S25=50\015", /* wake_str */
1483 "ATQ0E1Y0X4&S1\\K1\\V2S25=50\015", /* wake_str */
1485 "ATQ0E1Y0X4\\K1\\V2S25=50\015", /* wake_str */
1489 "OK\015", /* wake_prompt */
1490 "ATB1+FCLASS=0\015", /* dmode_str */
1491 "OK\015", /* dmode_prompt */
1492 "ATD%s\015", /* dial_str */
1494 1100, /* esc_time */
1496 "ATQ0H0\015", /* hup_str */
1497 "AT\\G1\\Q3\015", /* hwfc_str */
1498 "AT\\G1\\Q1\\X0\015", /* swfc_str */
1499 "AT\\G0\015", /* nofc_str */
1500 "AT\\J0\\N3\"H3\015", /* ec_on_str */
1501 "AT\\N1\015", /* ec_off_str */
1502 "AT%C1\015", /* dc_on_str */
1503 "AT%C0\015", /* dc_off_str */
1504 "ATS0=1\015", /* aa_on_str */
1505 "ATS0=0\015", /* aa_off_str */
1507 "", /* sb_off_str */
1508 "ATM1\015", /* sp_on_str */
1509 "ATM0\015", /* sp_off_str */
1510 "ATL1\015", /* vol1_str */
1511 "ATL2\015", /* vol2_str */
1512 "ATL3\015", /* vol3_str */
1513 "ATX3\015", /* ignoredt */
1515 57600L, /* max_speed */
1516 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1521 MDMINF MULTITECH = /* Multitech */
1523 "Multitech MT1432 or MT2834 Series",
1524 "ATP\015", /* pulse command */
1525 "ATT\015", /* tone command */
1527 ",", /* pause_chars */
1529 /* #P0 (= no parity) is not listed in the manual for newer models */
1530 /* so it has been removed from all three copies of the Multitech wake_str */
1532 "ATE1Q0V1X4&S0&C1&D2&E8&Q0\015", /* wake_str */
1535 "ATQ0E1X4&S1&E8&Q0\015", /* wake_str */
1537 "ATQ0E1X4&E8&Q0\015", /* wake_str */
1541 "OK\015", /* wake_prompt */
1543 "", /* dmode_prompt */
1544 "ATD%s\015", /* dial_str */
1546 1100, /* esc_time */
1548 "ATQ0H0\015", /* hup_str */
1549 "AT&E4&E7&E8&E11&E13\015", /* hwfc_str */
1550 "AT&E5&E6&E8&E11&E13\015", /* swfc_str */
1551 "AT&E3&E7&E8&E10&E12\015", /* nofc_str */
1552 "AT&E1\015", /* ec_on_str */
1553 "AT&E0\015", /* ec_off_str */
1554 "AT&E15\015", /* dc_on_str */
1555 "AT&E14\015", /* dc_off_str */
1556 "ATS0=1\015", /* aa_on_str */
1557 "ATS0=0\015", /* aa_off_str */
1558 "AT$BA0\015", /* sb_on_str (= "baud adjust off") */
1559 "AT$BA1\015", /* sb_off_str */
1560 "ATM1\015", /* sp_on_str */
1561 "ATM0\015", /* sp_off_str */
1562 "ATL1\015", /* vol1_str */
1563 "ATL2\015", /* vol2_str */
1564 "ATL3\015", /* vol3_str */
1565 "ATX3\015", /* ignoredt */
1567 57600L, /* max_speed */
1568 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1573 MDMINF SUPRA = /* Supra */
1575 "SupraFAXModem 144 or 288",
1576 "ATP\015", /* pulse command */
1577 "ATT\015", /* tone command */
1579 ",", /* pause_chars */
1582 "ATQ0E1V1N1W0X4Y0&S0&C1&D2\\K5S82=128\015", /* wake_str */
1585 "ATQ0E1N1W0X4Y0&S1\\K5S82=128\015", /* wake_str */
1587 "ATQ0E1N1W0X4Y0\\K5S82=128\015", /* wake_str */
1591 "OK\015", /* wake_prompt */
1593 "", /* dmode_prompt */
1594 "ATD%s\015", /* dial_str */
1596 1100, /* esc_time */
1598 "ATQ0H0\015", /* hup_str */
1599 "AT&K3\015", /* hwfc_str */
1600 "AT&K4\015", /* swfc_str */
1601 "AT&K0\015", /* nofc_str */
1602 "AT&Q5\\N3S48=7\015", /* ec_on_str */
1603 "AT&Q0\\N1\015", /* ec_off_str */
1604 "AT%C1S46=138\015", /* dc_on_str */
1605 "AT%C0S46=136\015", /* dc_off_str */
1606 "ATS0=1\015", /* aa_on_str */
1607 "ATS0=0\015", /* aa_off_str */
1609 "", /* sb_off_str */
1610 "ATM1\015", /* sp_on_str */
1611 "ATM\015", /* sp_off_str */
1612 "ATL\015", /* vol1_str */
1613 "ATL2\015", /* vol2_str */
1614 "ATL3\015", /* vol3_str */
1615 "ATX3\015", /* ignoredt */
1617 57600L, /* max_speed */
1618 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1623 MDMINF SUPRAX = /* Supra Express */
1625 "Diamond Supra Express V.90",
1626 "ATP\015", /* pulse command */
1627 "ATT\015", /* tone command */
1629 ",", /* pause_chars */
1632 "ATQ0E1V1W0X4&C1&D2&S0\\K5\015", /* wake_str */
1635 "ATQ0E1W0X4&S1\\K5\015", /* wake_str */
1637 "ATQ0E1W0X4\\K5\015", /* wake_str */
1641 "OK\015", /* wake_prompt */
1643 "", /* dmode_prompt */
1644 "ATD%s\015", /* dial_str */
1646 1100, /* esc_time */
1648 "ATQ0H0\015", /* hup_str */
1649 "AT&K3\015", /* hwfc_str */
1650 "AT&K4\015", /* swfc_str */
1651 "AT&K0\015", /* nofc_str */
1652 "AT\\N3\015", /* ec_on_str */
1653 "AT\\N1\015", /* ec_off_str */
1654 "AT%C2\015", /* dc_on_str */
1655 "AT%C0\015", /* dc_off_str */
1656 "ATS0=1\015", /* aa_on_str */
1657 "ATS0=0\015", /* aa_off_str */
1659 "", /* sb_off_str */
1660 "ATM1\015", /* sp_on_str */
1661 "ATM\015", /* sp_off_str */
1662 "ATL\015", /* vol1_str */
1663 "ATL2\015", /* vol2_str */
1664 "ATL3\015", /* vol3_str */
1665 "ATX3\015", /* ignoredt */
1667 230400L, /* max_speed */
1668 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1673 MDMINF MAXTECH = /* MaxTech */
1675 "MaxTech XM288EA or GVC FAXModem",
1676 "ATP\015", /* pulse command */
1677 "ATT\015", /* tone command */
1679 ",", /* pause_chars */
1682 "ATQ0E1V1X4Y0&S0&C1&D2&L0&M0\\K5\015", /* wake_str */
1685 "ATQ0E1X4Y0&L0&M0&S1\\K5\015", /* wake_str */
1687 "ATQ0E1X4Y0&L0&M0\\K5\015", /* wake_str */
1691 "OK\015", /* wake_prompt */
1693 "", /* dmode_prompt */
1694 "ATD%s\015", /* dial_str */
1696 1100, /* esc_time */
1698 "ATQ0H0\015", /* hup_str */
1699 "AT\\Q3\015", /* hwfc_str */
1700 "AT\\Q1\\X0\015", /* swfc_str */
1701 "AT\\Q0\015", /* nofc_str */
1702 "AT\\N6\015", /* ec_on_str */
1703 "AT\\N0\015", /* ec_off_str */
1704 "AT\\N6%C1\015", /* dc_on_str */
1705 "AT\\N6%C0\015", /* dc_off_str */
1706 "ATS0=1\015", /* aa_on_str */
1707 "ATS0=0\015", /* aa_off_str */
1709 "", /* sb_off_str */
1710 "ATM1\015", /* sp_on_str */
1711 "ATM0\015", /* sp_off_str */
1712 "ATL1\015", /* vol1_str */
1713 "ATL2\015", /* vol2_str */
1714 "ATL3\015", /* vol3_str */
1715 "ATX3\015", /* ignoredt */
1717 115200L, /* max_speed */
1718 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1723 MDMINF ROLM = /* IBM / Siemens / Rolm 8000, 9000, 9751 CBX DCM */
1725 "IBM/Siemens/Rolm CBX Data Communications Module",
1726 "", /* pulse command */
1727 "", /* tone command */
1729 "", /* pause_chars */
1731 "\015\015", /* wake_str */
1733 "MODIFY?", /* wake_prompt */
1735 "", /* dmode_prompt */
1736 "CALL %s\015", /* dial_str */
1745 "", /* ec_off_str */
1747 "", /* dc_off_str */
1749 "", /* aa_off_str */
1751 "", /* sb_off_str */
1752 "", /* sp_off_str */
1759 19200L, /* max_speed */
1765 MDMINF USR = /* USR Courier and Sportster modems */
1767 "US Robotics Courier, Sportster, or compatible",
1768 "ATP\015", /* pulse command */
1769 "ATT\015", /* tone command */
1771 ",", /* pause_chars */
1774 "ATQ0E1V1X4&A3&S0&C1&D2&N0&Y3S14=0\015", /* wake_str */
1777 "ATQ0X4&A3&S0&N0&Y3S14=0\015", /* wake_str -- needs &S0 in SunOS */
1780 "ATQ0X4&A3&S1&N0&Y3S14=0\015", /* wake_str -- needs &S1 in VMS */
1782 "ATQ0X4&A3&N0&Y3S14=0\015", /* wake_str */
1787 "OK\015", /* wake_prompt */
1789 "", /* dmode_prompt */
1790 "ATD%s\015", /* dial_str */
1792 1100, /* esc_time */
1794 "ATQ0H0\015", /* hup_str */
1795 "AT&H1&R2&I0\015", /* hwfc_str */
1796 "AT&H2&R1&I2\015", /* swfc_str */
1797 "AT&H0&R1&I0\015", /* nofc_str */
1798 "AT&M4&B1\015", /* ec_on_str */
1799 "AT&M0\015", /* ec_off_str */
1800 "AT&K1\015", /* dc_on_str */
1801 "AT&K0\015", /* dc_off_str */
1802 "ATS0=1\015", /* aa_on_str */
1803 "ATS0=0\015", /* aa_off_str */
1805 "", /* sb_off_str */
1806 "ATM1\015", /* sp_on_str */
1807 "ATM0\015", /* sp_off_str */
1808 "ATL1\015", /* vol1_str */
1809 "ATL2\015", /* vol2_str */
1810 "ATL3\015", /* vol3_str */
1811 "ATX3\015", /* ignoredt */
1813 115200L, /* max_speed */
1814 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1820 MDMINF USRX2 = /* USR XJ-CC1560 X2 56K */
1822 "US Robotics / Megahertz CC/XJ-CC1560 X2",
1823 "ATP\015", /* pulse command */
1824 "ATT\015", /* tone command */
1826 ",", /* pause_chars */
1829 "ATQ0E1V1X4&A3&S0&B2&C1&D2&N0\015", /* wake_str */
1832 "ATQ0X4&A3&B2&N0&S1\015", /* wake_str */
1834 "ATQ0X4&A3&B2&N0\015", /* wake_str */
1838 "OK\015", /* wake_prompt */
1840 "", /* dmode_prompt */
1841 "ATD%s\015", /* dial_str */
1843 1100, /* esc_time */
1845 "ATQ0H0\015", /* hup_str */
1846 "AT&H1&I0\015", /* hwfc_str */
1847 "AT&H2&I2\015", /* swfc_str */
1848 "AT&H0&I0\015", /* nofc_str */
1849 "AT&M4\015", /* ec_on_str */
1850 "AT&M0\015", /* ec_off_str */
1851 "AT&K1\015", /* dc_on_str */
1852 "AT&K0\015", /* dc_off_str */
1853 "ATS0=1\015", /* aa_on_str */
1854 "ATS0=0\015", /* aa_off_str */
1855 "AT&B1\015", /* sb_on_str */
1856 "AT&B0\015", /* sb_off_str */
1857 "ATM1\015", /* sp_on_str */
1858 "ATM0\015", /* sp_off_str */
1859 "ATL1\015", /* vol1_str */
1860 "ATL2\015", /* vol2_str */
1861 "ATL3\015", /* vol3_str */
1862 "ATX3\015", /* ignoredt */
1864 115200L, /* max_speed */
1865 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
1870 MDMINF OLDTB = /* Old Telebits */
1872 "Telebit TrailBlazer, T1000, T1500, T2000, T2500",
1873 "ATP\015", /* pulse command */
1874 "ATT\015", /* tone command */
1876 ",", /* pause_chars */
1879 "\021AAAAATQ0E1V1X1&S0&C1&D2S12=50S50=0S54=3\015", /* wake_str. */
1882 "\021AAAAATQ0X1S12=50S50=0S54=3\015", /* wake_str. */
1884 "\021AAAAATQ0X1&S1S12=50S50=0S54=3\015", /* wake_str. */
1887 100, /* wake_rate = 100 msec */
1888 "OK\015", /* wake_prompt */
1890 "", /* dmode_prompt */
1891 "ATD%s\015", /* dial_str, Note: no T or P */
1893 1100, /* esc_time (guard time) */
1895 "ATQ0H0\015", /* hup_str */
1896 "ATS58=2S68=2\015", /* hwfc_str */
1897 "ATS58=3S68=3S69=0\015", /* swfc_str */
1898 "ATS58=0S68=0\015", /* nofc_str */
1899 "ATS66=1S95=2\015", /* ec_on_str */
1900 "ATS95=0\015", /* ec_off_str */
1901 "ATS110=1S96=1\015", /* dc_on_str */
1902 "ATS110=0S96=0\015", /* dc_off_str */
1903 "ATS0=1\015", /* aa_on_str */
1904 "ATS0=0\015", /* aa_off_str */
1906 "", /* sb_off_str */
1907 "ATM1\015", /* sp_on_str */
1908 "ATM0\015", /* sp_off_str */
1909 "ATL1\015", /* vol1_str */
1910 "ATL2\015", /* vol2_str */
1911 "ATL3\015", /* vol3_str */
1912 "ATX3\015", /* ignoredt */
1914 19200L, /* max_speed */
1915 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW|CKD_TB|CKD_KS, /* capas */
1920 MDMINF NEWTB = /* New Telebits */
1922 "Telebit T1600, T3000, QBlazer, WorldBlazer, etc.",
1923 "ATP\015", /* pulse command */
1924 "ATT\015", /* tone command */
1926 ",", /* pause_chars */
1929 "\021AAAAATQ0E1V1X2&S0&C1&D2S12=50S50=0S61=0S63=0\015", /* wake_str. */
1932 "\021AAAAATQ0X2&S1S12=50S50=0S61=0S63=0\015", /* wake_str. */
1934 "\021AAAAATQ0X2S12=50S50=0S61=0S63=0\015", /* wake_str. */
1937 100, /* wake_rate = 100 msec */
1938 "OK\015", /* wake_prompt */
1940 "", /* dmode_prompt */
1941 "ATD%s\015", /* dial_str, Note: no T or P */
1943 1100, /* esc_time (guard time) */
1945 "ATQ0H0\015", /* hup_str */
1946 "ATS58=2S68=2\015", /* hwfc_str */
1947 "ATS58=3S68=3\015", /* swfc_str */
1948 "ATS58=0S68=0\015", /* nofc_str */
1949 "ATS180=3\015", /* ec_on_str */
1950 "ATS180=0\015", /* ec_off_str */
1951 "ATS190=1\015", /* dc_on_str */
1952 "ATS190=0\015", /* dc_off_str */
1953 "ATS0=1\015", /* aa_on_str */
1954 "ATS0=0\015", /* aa_off_str */
1956 "", /* sb_off_str */
1957 "ATM1\015", /* sp_on_str */
1958 "ATM0\015", /* sp_off_str */
1959 "ATL1\015", /* vol1_str */
1960 "ATL2\015", /* vol2_str */
1961 "ATL3\015", /* vol3_str */
1962 "ATX3\015", /* ignoredt */
1964 38400L, /* max_speed */
1965 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW|CKD_TB|CKD_KS, /* capas */
1968 #endif /* MINIDIAL */
1971 MDMINF DUMMY = /* dummy information for modems that are handled elsewhere */
1974 "", /* pulse command */
1975 "", /* tone command */
1977 "", /* pause_chars */
1981 "", /* wake_prompt */
1983 NULL, /* dmode_prompt */
1984 "%s\015", /* dial_str */
1993 "", /* ec_off_str */
1995 "", /* dc_off_str */
1997 "", /* aa_off_str */
1999 "", /* sb_off_str */
2000 "", /* sp_off_str */
2014 MDMINF RWV32 = /* Generic Rockwell V.32 */
2016 "Generic Rockwell V.32 modem", /* ATI3, ATI4, and ATI6 for details */
2017 "ATP\015", /* pulse command */
2018 "ATT\015", /* tone command */
2020 ",", /* pause_chars */
2023 "ATQ0E1V1X4Y0&S0&C1&D2%E2\\K5+FCLASS=0N1S37=0\015", /* wake_str */
2026 "ATQ0X4Y0&S1%E2\\K5+FCLASS=0N1S37=0\015", /* wake_str */
2028 "ATQ0X4Y0%E2\\K5+FCLASS=0N1S37=0\015", /* wake_str */
2032 "OK\015", /* wake_prompt */
2034 "", /* dmode_prompt */
2035 "ATD%s\015", /* dial_str */
2037 1100, /* esc_time */
2039 "ATQ0H0\015", /* hup_str */
2040 "AT&K3\015", /* hwfc_str */
2041 "AT&K4S32=17S33=19\015", /* swfc_str */
2042 "AT&K0\015", /* nofc_str */
2043 "AT&Q6\015", /* ec_on_str */
2044 "AT&Q0\015", /* ec_off_str */
2045 "AT%C1\015", /* dc_on_str */
2046 "AT%C0\015", /* dc_off_str */
2047 "ATS0=1\015", /* aa_on_str */
2048 "ATS0=0\015", /* aa_off_str */
2050 "", /* sb_off_str */
2051 "ATM1\015", /* sp_on_str */
2052 "ATM0\015", /* sp_off_str */
2053 "ATL1\015", /* vol1_str */
2054 "ATL2\015", /* vol2_str */
2055 "ATL3\015", /* vol3_str */
2056 "ATX3\015", /* ignoredt */
2058 57600L, /* max_speed */
2059 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2064 MDMINF RWV32B = /* Generic Rockwell V.32bis */
2066 "Generic Rockwell V.32bis modem", /* ATI3, ATI4, and ATI6 for details */
2067 "ATP\015", /* pulse command */
2068 "ATT\015", /* tone command */
2070 ",", /* pause_chars */
2073 "ATQ0E1V1X4Y0&S0&C1&D2%E2\\K5+FCLASS=0N1S37=0\015", /* wake_str */
2076 "ATQ0X4Y0&S1%E2\\K5+FCLASS=0N1S37=0\015", /* wake_str */
2078 "ATQ0X4Y0%E2\\K5+FCLASS=0N1S37=0\015", /* wake_str */
2082 "OK\015", /* wake_prompt */
2084 "", /* dmode_prompt */
2085 "ATD%s\015", /* dial_str */
2087 1100, /* esc_time */
2089 "ATQ0H0\015", /* hup_str */
2090 "AT&K3\015", /* hwfc_str */
2091 "AT&K4S32=17S33=19\015", /* swfc_str */
2092 "AT&K0\015", /* nofc_str */
2093 "AT&Q5\015", /* ec_on_str */
2094 "AT&Q0\015", /* ec_off_str */
2095 "ATS%C1\015", /* dc_on_str */
2096 "ATS%C0\015", /* dc_off_str */
2097 "ATS0=1\015", /* aa_on_str */
2098 "ATS0=0\015", /* aa_off_str */
2100 "", /* sb_off_str */
2101 "ATM1\015", /* sp_on_str */
2102 "ATM0\015", /* sp_off_str */
2103 "ATL1\015", /* vol1_str */
2104 "ATL2\015", /* vol2_str */
2105 "ATL3\015", /* vol3_str */
2106 "ATX3\015", /* ignoredt */
2108 57600L, /* max_speed */
2109 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2114 MDMINF RWV34 = /* Generic Rockwell V.34 Data/Fax */
2116 "Generic Rockwell V.34 modem", /* ATI3, ATI4, and ATI6 for details */
2117 "ATP\015", /* pulse command */
2118 "ATT\015", /* tone command */
2120 ",", /* pause_chars */
2123 "ATQ0V1X4Y0&C1&D2&S0%E2\\K5+FCLASS=0\015", /* wake_str */
2126 "ATQ0V1X4Y0&C1&D2&S1%E2\\K5+FCLASS=0\015", /* wake_str */
2128 "ATQ0V1X4Y0&C1&D2%E2\\K5+FCLASS=0\015", /* wake_str */
2132 "OK\015", /* wake_prompt */
2134 "", /* dmode_prompt */
2135 "ATD%s\015", /* dial_str */
2137 1100, /* esc_time */
2139 "ATQ0H0\015", /* hup_str */
2140 "AT&K3\015", /* hwfc_str */
2141 "AT&K4S32=17S33=19\015", /* swfc_str */
2142 "AT&K0\015", /* nofc_str */
2143 "AT&Q5\015", /* ec_on_str */
2144 "AT&Q0\015", /* ec_off_str */
2145 "ATS%C3\015", /* dc_on_str */
2146 "ATS%C0\015", /* dc_off_str */
2147 "ATS0=1\015", /* aa_on_str */
2148 "ATS0=0\015", /* aa_off_str */
2150 "", /* sb_off_str */
2151 "ATM1\015", /* sp_on_str */
2152 "ATM0\015", /* sp_off_str */
2153 "ATL1\015", /* vol1_str */
2154 "ATL2\015", /* vol2_str */
2155 "ATL3\015", /* vol3_str */
2156 "ATX3\015", /* ignoredt */
2158 115200L, /* max_speed */
2159 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2164 MDMINF RWV90 = /* Generic Rockwell V.90 Data/Fax */
2166 "Generic Rockwell V.90 56K modem", /* ATI3, ATI4, and ATI6 for details */
2167 "ATP\015", /* pulse command */
2168 "ATT\015", /* tone command */
2170 ",", /* pause_chars */
2173 "ATQ0V1N1X4Y0&C1&D2&S0%E2\\K5+FCLASS=0S37=0\015", /* K95 */
2176 "ATQ0V1N1X4Y0&C1&D2&S1%E2\\K5+FCLASS=0S37=0\015", /* wake_str */
2178 "ATQ0V1N1X4Y0&C1&D2%E2\\K5+FCLASS=0S37=0\015", /* wake_str */
2182 "OK\015", /* wake_prompt */
2184 "", /* dmode_prompt */
2185 "ATD%s\015", /* dial_str */
2187 1100, /* esc_time */
2189 "ATQ0H0\015", /* hup_str */
2190 "AT&K3\015", /* hwfc_str */
2191 "AT&K4S32=17S33=19\015", /* swfc_str */
2192 "AT&K0\015", /* nofc_str */
2193 "AT&Q5\015", /* ec_on_str */
2194 "AT&Q0\015", /* ec_off_str */
2195 "AT%C3\015", /* dc_on_str */
2196 "AT%C0\015", /* dc_off_str */
2197 "ATS0=1\015", /* aa_on_str */
2198 "ATS0=0\015", /* aa_off_str */
2200 "", /* sb_off_str */
2201 "ATM1\015", /* sp_on_str */
2202 "ATM0\015", /* sp_off_str */
2203 "ATL1\015", /* vol1_str */
2204 "ATL2\015", /* vol2_str */
2205 "ATL3\015", /* vol3_str */
2206 "ATX3\015", /* ignoredt */
2208 115200L, /* max_speed */
2209 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2214 MDMINF MWAVE = /* IBM Mwave */
2216 "IBM Mwave Adapter",
2217 "ATP\015", /* pulse command */
2218 "ATT\015", /* tone command */
2220 ",", /* pause_chars */
2223 "ATQ0E1V1X4Y0&S0&C1&D2&M0&Q0&N1\\K3\\T0%E2S28=0\015", /* wake_str */
2226 "ATQ0X4Y0&M0&S1&Q0&N1&S0\\K3\\T0%E2S28=0\015", /* wake_str */
2228 "ATQ0X4Y0&M0&Q0&N1&S0\\K3\\T0%E2S28=0\015", /* wake_str */
2232 "OK\015", /* wake_prompt */
2234 "", /* dmode_prompt */
2235 "ATD%s\015", /* dial_str */
2237 1100, /* esc_time */
2239 "ATQ0H0\015", /* hup_str */
2240 "AT\\Q3\015", /* hwfc_str */
2241 "", /* swfc_str (it doesn't!) */
2242 "AT\\Q0\015", /* nofc_str */
2243 "AT\\N7\015", /* ec_on_str */
2244 "AT\\N0\015", /* ec_off_str */
2245 "AT%C1\"H3\015", /* dc_on_str */
2246 "AT%C0\"H0\015", /* dc_off_str */
2247 "ATS0=1\015", /* aa_on_str */
2248 "ATS0=0\015", /* aa_off_str */
2250 "", /* sb_off_str */
2251 "ATM1\015", /* sp_on_str */
2252 "ATM0\015", /* sp_off_str */
2253 "ATL1\015", /* vol1_str */
2254 "ATL2\015", /* vol2_str */
2255 "ATL3\015", /* vol3_str */
2256 "ATX3\015", /* ignoredt */
2258 57600L, /* max_speed */
2259 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW, /* capas */
2264 MDMINF TELEPATH = /* Gateway 2000 Telepath */
2266 "Gateway 2000 Telepath II 28.8",
2267 "ATP\015", /* pulse command */
2268 "ATT\015", /* tone command */
2270 ",", /* pause_chars */
2273 "ATQ0E1V1X4&S0&C1&D2&N0&Y2#CLS=0S13=0S15=0S19=0\015", /* wake_str */
2276 "ATQ0X4&N0&S1&Y1#CLS=0S13=0S15=0S19=0\015", /* wake_str */
2278 "ATQ0X4&N0&Y1#CLS=0S13=0S15=0S19=0\015", /* wake_str */
2282 "OK\015", /* wake_prompt */
2284 "", /* dmode_prompt */
2285 "ATD%s\015", /* dial_str */
2287 1100, /* esc_time */
2289 "ATQ0H0\015", /* hup_str */
2290 "AT&H1&R2\015", /* hwfc_str */
2291 "AT&H2&I2S22=17S23=19\015", /* swfc_str */
2292 "AT&H0&I0&R1\015", /* nofc_str */
2293 "AT&M4&B1\015", /* ec_on_str -- also fixes speed */
2294 "AT&M0\015", /* ec_off_str */
2295 "AT&K1\015", /* dc_on_str */
2296 "AT&K0\015", /* dc_off_str */
2297 "ATS0=1\015", /* aa_on_str */
2298 "ATS0=0\015", /* aa_off_str */
2300 "", /* sb_off_str */
2301 "ATM1\015", /* sp_on_str */
2302 "ATM0\015", /* sp_off_str */
2303 "ATL1\015", /* vol1_str */
2304 "ATL2\015", /* vol2_str */
2305 "ATL3\015", /* vol3_str */
2306 "ATX3\015", /* ignoredt */
2308 57600L, /* max_speed */
2309 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2314 MDMINF CARDINAL = /* Cardinal - based on Rockwell V.34 */
2316 "Cardinal MVP288X Series", /* ATI3, ATI4, and ATI6 for details */
2317 "ATP\015", /* pulse command */
2318 "ATT\015", /* tone command */
2320 ",", /* pause_chars */
2323 "ATQ0E1V1X4W1Y0%E2&S0&C1&D2\\K5+FCLASS=0+MS=11,1\015", /* wake_str */
2326 "ATQ0X4W1Y0&S1%E2\\K5+FCLASS=0+MS=11,1\015", /* wake_str */
2328 "ATQ0X4W1Y0%E2\\K5+FCLASS=0+MS=11,1\015", /* wake_str */
2332 "OK\015", /* wake_prompt */
2334 "", /* dmode_prompt */
2335 "ATD%s\015", /* dial_str */
2337 1100, /* esc_time */
2339 "ATQ0H0\015", /* hup_str */
2340 "AT&K3\015", /* hwfc_str */
2341 "AT&K4S32=17S33=19\015", /* swfc_str */
2342 "AT&K0\015", /* nofc_str */
2343 "AT&Q5S36=7S48=7\\N3\015", /* ec_on_str */
2344 "AT&Q0S48=128\\N1\015", /* ec_off_str */
2345 "ATS46=138%C1\015", /* dc_on_str */
2346 "ATS46=136%C0\015", /* dc_off_str */
2347 "ATS0=1\015", /* aa_on_str */
2348 "ATS0=0\015", /* aa_off_str */
2350 "", /* sb_off_str */
2351 "ATM1\015", /* sp_on_str */
2352 "ATM0\015", /* sp_off_str */
2353 "ATL1\015", /* vol1_str */
2354 "ATL2\015", /* vol2_str */
2355 "ATL3\015", /* vol3_str */
2356 "ATX3\015", /* ignoredt */
2358 115200L, /* max_speed */
2359 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2364 MDMINF LUCENT = /* Lucent Venus or Data/Fax modem */
2366 "Lucent Venus chipset",
2367 "ATP\015", /* pulse command */
2368 "ATT\015", /* tone command */
2370 ",", /* pause_chars */
2373 "ATQ0V1N1X4Y0&C1&D2&S0%E2\\K5+FCLASS=0S37=0\015", /* K95 */
2376 "ATQ0V1N1X4Y0&C1&D2&S1%E2\\K5+FCLASS=0S37=0\015", /* VMS */
2378 "ATQ0V1N1X4Y0&C1&D2%E2\\K5+FCLASS=0S37=0\015", /* All others */
2382 "OK\015", /* wake_prompt */
2384 "", /* dmode_prompt */
2385 "ATD%s\015", /* dial_str */
2387 1100, /* esc_time */
2389 "ATQ0H0\015", /* hup_str */
2390 "AT&K3\015", /* hwfc_str */
2391 "AT&K4S32=17S33=19\015", /* swfc_str */
2392 "AT&K0\015", /* nofc_str */
2393 "AT&Q5\015", /* ec_on_str */
2394 "AT&Q0\015", /* ec_off_str */
2395 "AT%C1\015", /* dc_on_str */
2396 "AT%C0\015", /* dc_off_str */
2397 "ATS0=1\015", /* aa_on_str */
2398 "ATS0=0\015", /* aa_off_str */
2400 "", /* sb_off_str */
2401 "ATM1\015", /* sp_on_str */
2402 "ATM0\015", /* sp_off_str */
2403 "ATL1\015", /* vol1_str */
2404 "ATL2\015", /* vol2_str */
2405 "ATL3\015", /* vol3_str */
2406 "ATX3\015", /* ignoredt */
2408 115200L, /* max_speed */
2409 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2414 MDMINF CONEXANT = /* Conexant family */
2416 "Conexant family of modems",
2417 "ATP\015", /* pulse command */
2418 "ATT\015", /* tone command */
2420 ",", /* pause_chars */
2423 "ATQ0V1X4&C1&D2&S0%E1+FCLASS=0\015", /* K95 */
2426 "ATQ0V1X4&C1&D2&S1%E1+FCLASS=0\015", /* VMS */
2428 "ATQ0V1X4&C1&D2%E1+FCLASS=0\015", /* UNIX etc */
2432 "OK\015", /* wake_prompt */
2434 "", /* dmode_prompt */
2435 "ATD%s\015", /* dial_str */
2437 1100, /* esc_time */
2439 "ATQ0H0\015", /* hup_str */
2440 "AT&K3\015", /* hwfc_str */
2441 "AT&K4S32=17S33=19\015", /* swfc_str */
2442 "AT&K0\015", /* nofc_str */
2443 "AT&Q5\015", /* ec_on_str */
2444 "AT&Q0\015", /* ec_off_str */
2445 "AT%C3\015", /* dc_on_str */
2446 "AT%C0\015", /* dc_off_str */
2447 "ATS0=1\015", /* aa_on_str */
2448 "ATS0=0\015", /* aa_off_str */
2450 "", /* sb_off_str */
2451 "ATM1\015", /* sp_on_str */
2452 "ATM0\015", /* sp_off_str */
2453 "ATL1\015", /* vol1_str */
2454 "ATL2\015", /* vol2_str */
2455 "ATL3\015", /* vol3_str */
2456 "ATX3\015", /* ignoredt */
2458 115200L, /* max_speed */
2459 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2464 MDMINF PCTEL = /* PCTel chipset */
2467 "ATP\015", /* pulse command */
2468 "ATT\015", /* tone command */
2470 ",", /* pause_chars */
2473 "ATQ0V1N1X4Y0&C1&D2&S0%E2\\K5S37=0\015", /* K95 */
2476 "ATQ0V1N1X4Y0&C1&D2&S1%E2\\K5S37=0\015", /* VMS */
2478 "ATQ0V1N1X4Y0&C1&D2%E2\\K5S37=0\015", /* UNIX etc */
2482 "OK\015", /* wake_prompt */
2484 "", /* dmode_prompt */
2485 "ATD%s\015", /* dial_str */
2487 1100, /* esc_time */
2489 "ATQ0H0\015", /* hup_str */
2490 "AT&K3\015", /* hwfc_str */
2491 "AT&K4S32=17S33=19\015", /* swfc_str */
2492 "AT&K0\015", /* nofc_str */
2493 "AT\\N3\015", /* ec_on_str */
2494 "AT\\N0\015", /* ec_off_str */
2495 "AT%C1\015", /* dc_on_str */
2496 "AT%C0\015", /* dc_off_str */
2497 "ATS0=1\015", /* aa_on_str */
2498 "ATS0=0\015", /* aa_off_str */
2500 "", /* sb_off_str */
2501 "ATM1\015", /* sp_on_str */
2502 "ATM0\015", /* sp_off_str */
2503 "ATL1\015", /* vol1_str */
2504 "ATL2\015", /* vol2_str */
2505 "ATL3\015", /* vol3_str */
2506 "ATX3\015", /* ignoredt */
2508 115200L, /* max_speed */
2509 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2514 MDMINF ZOOMV34 = /* Zoom Telephonics V.34 */
2516 "Zoom Telephonics V.34",
2517 "ATP\015", /* pulse command */
2518 "ATT\015", /* tone command */
2520 ",", /* pause_chars */
2523 "ATQ0V1N1W1X4&S0&C1&D2S82=128\015", /* wake_str */
2526 "ATQ0V1N1W1X4&S1S82=128\015", /* wake_str */
2528 "ATQ0V1N1W1X4S82=128S015", /* wake_str */
2532 "OK\015", /* wake_prompt */
2534 "", /* dmode_prompt */
2535 "ATD%s\015", /* dial_str */
2537 1100, /* esc_time */
2539 "ATQ0H0\015", /* hup_str */
2540 "AT&K3\015", /* hwfc_str */
2541 "AT&K4\015S32=17S33=19", /* swfc_str */
2542 "AT&K0\015", /* nofc_str */
2543 "AT&Q5\015", /* ec_on_str */
2544 "AT&Q0\015", /* ec_off_str */
2545 "ATS%C3\015", /* dc_on_str */
2546 "ATS%C0\015", /* dc_off_str */
2547 "ATS0=1\015", /* aa_on_str */
2548 "ATS0=0\015", /* aa_off_str */
2550 "", /* sb_off_str */
2551 "ATM1\015", /* sp_on_str */
2552 "ATM0\015", /* sp_off_str */
2553 "ATL1\015", /* vol1_str */
2554 "ATL2\015", /* vol2_str */
2555 "ATL3\015", /* vol3_str */
2556 "ATX3\015", /* ignoredt */
2558 57600L, /* max_speed */
2559 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2564 MDMINF ZOOMV90 = /* ZOOM V.90 */
2567 "ATP\015", /* pulse command */
2568 "ATT\015", /* tone command */
2570 ",", /* pause_chars */
2573 "ATQ0V1N1X4Y0&C1&D2&S0%E2\\K5+FCLASS=0S37=0\015", /* K95 */
2576 "ATQ0V1N1X4Y0&C1&D2&S1%E2\\K5+FCLASS=0S37=0\015", /* VMS */
2578 "ATQ0V1N1X4Y0&C1&D2%E2\\K5+FCLASS=0S37=0\015", /* All others */
2582 "OK\015", /* wake_prompt */
2584 "", /* dmode_prompt */
2585 "ATD%s\015", /* dial_str */
2587 1100, /* esc_time */
2589 "ATQ0H0\015", /* hup_str */
2590 "AT&K3\015", /* hwfc_str */
2591 "AT&K4S32=17S33=19\015", /* swfc_str */
2592 "AT&K0\015", /* nofc_str */
2593 "AT&Q5\015", /* ec_on_str */
2594 "AT&Q0\015", /* ec_off_str */
2595 "AT%C1\015", /* dc_on_str */
2596 "AT%C0\015", /* dc_off_str */
2597 "ATS0=1\015", /* aa_on_str */
2598 "ATS0=0\015", /* aa_off_str */
2600 "", /* sb_off_str */
2601 "ATM1\015", /* sp_on_str */
2602 "ATM0\015", /* sp_off_str */
2603 "ATL1\015", /* vol1_str */
2604 "ATL2\015", /* vol2_str */
2605 "ATL3\015", /* vol3_str */
2606 "ATX3\015", /* ignoredt */
2608 115200L, /* max_speed */
2609 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2614 MDMINF ZOOMV92 = /* ZOOM V.92 */
2616 "Zoom V.92 with V.44 compression",
2617 "ATP\015", /* pulse command */
2618 "ATT\015", /* tone command */
2620 ",", /* pause_chars */
2623 "ATQ0V1N1X4Y0&C1&D2&S0%E2\\K5+FCLASS=0S37=0+MS=V92\015", /* K95 */
2626 "ATQ0V1N1X4Y0&C1&D2&S1%E2\\K5+FCLASS=0S37=0+MS=V92\015", /* VMS */
2628 "ATQ0V1N1X4Y0&C1&D2%E2\\K5+FCLASS=0S37=0+MS=V92\015", /* All others */
2632 "OK\015", /* wake_prompt */
2634 "", /* dmode_prompt */
2635 "ATD%s\015", /* dial_str */
2637 1100, /* esc_time */
2639 "ATQ0H0\015", /* hup_str */
2640 "AT&K3\015", /* hwfc_str */
2641 "AT&K4S32=17S33=19\015", /* swfc_str */
2642 "AT&K0\015", /* nofc_str */
2643 "AT&Q5\015", /* ec_on_str */
2644 "AT&Q0\015", /* ec_off_str */
2645 "AT%C1+DCS=1,1\015", /* dc_on_str */
2646 "AT%C0\015", /* dc_off_str */
2647 "ATS0=1\015", /* aa_on_str */
2648 "ATS0=0\015", /* aa_off_str */
2650 "", /* sb_off_str */
2651 "ATM1\015", /* sp_on_str */
2652 "ATM0\015", /* sp_off_str */
2653 "ATL1\015", /* vol1_str */
2654 "ATL2\015", /* vol2_str */
2655 "ATL3\015", /* vol3_str */
2656 "ATX3\015", /* ignoredt */
2658 115200L, /* max_speed */
2659 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
2665 Now the "old" modems, all grouped together, and also within
2666 "if not defined MINIDIAL"...
2671 MDMINF CERMETEK = /* Information for "Cermetek Info-Mate 212 A" modem */
2673 "Cermetek Info-Mate 212 A",
2674 "", /* pulse command */
2675 "", /* tone command */
2677 "BbPpTt", /* pause_chars */
2679 " XY\016R\015", /* wake_str */
2680 200, /* wake_rate */
2681 "", /* wake_prompt */
2683 NULL, /* dmode_prompt */
2684 "\016D '%s'\015", /* dial_str */
2685 200, /* dial_rate */
2693 "", /* ec_off_str */
2695 "", /* dc_off_str */
2697 "", /* aa_off_str */
2699 "", /* sb_off_str */
2700 "", /* sp_off_str */
2707 1200L, /* max_speed */
2713 MDMINF DF03 = /* information for "DEC DF03-AC" modem */
2716 "", /* pulse command */
2717 "", /* tone command */
2719 "=", /* pause_chars */
2720 15, /* pause_time */
2721 "\001\002", /* wake_str */
2723 "", /* wake_prompt */
2725 NULL, /* dmode_prompt */
2726 "%s", /* dial_str */
2735 "", /* ec_off_str */
2737 "", /* dc_off_str */
2739 "", /* aa_off_str */
2741 "", /* sb_off_str */
2742 "", /* sp_off_str */
2755 MDMINF DF100 = /* information for "DEC DF100-series" modem */
2757 * The telephone "number" can include "P"s and/or "T"s
2758 * within it to indicate that subsequent digits are
2759 * to be dialed using pulse or tone dialing. The
2760 * modem defaults to pulse dialing. You may modify
2761 * the dial string below to explicitly default all
2762 * dialing to pulse or tone, but doing so prevents
2763 * the use of phone numbers that you may have stored
2764 * in the modem's memory.
2768 "", /* pulse command */
2769 "", /* tone command */
2771 "=", /* pause_chars */
2772 15, /* pause_time */
2773 "\001", /* wake_str */
2775 "", /* wake_prompt */
2777 NULL, /* dmode_prompt */
2778 "%s#", /* dial_str */
2787 "", /* ec_off_str */
2789 "", /* dc_off_str */
2791 "", /* aa_off_str */
2793 "", /* sb_off_str */
2794 "", /* sp_off_str */
2807 MDMINF DF200 = /* information for "DEC DF200-series" modem */
2809 * The telephone "number" can include "P"s and/or "T"s
2810 * within it to indicate that subsequent digits are
2811 * to be dialed using pulse or tone dialing. The
2812 * modem defaults to pulse dialing. You may modify
2813 * the dial string below to explicitly default all
2814 * dialing to pulse or tone, but doing so prevents
2815 * the use of phone numbers that you may have stored
2816 * in the modem's memory.
2820 "", /* pulse command */
2821 "", /* tone command */
2823 "=W", /* pause_chars */ /* =: second tone; W: 5 secs */
2824 15, /* pause_time */ /* worst case */
2825 "\002", /* wake_str */ /* allow stored number usage */
2827 "", /* wake_prompt */
2829 NULL, /* dmode_prompt */
2831 "%s!", /* dial_str */
2834 #endif /* COMMENT */
2843 "", /* ec_off_str */
2845 "", /* dc_off_str */
2847 "", /* aa_off_str */
2849 "", /* sb_off_str */
2850 "", /* sp_off_str */
2863 MDMINF GDC = /* information for "GeneralDataComm 212A/ED" modem */
2865 "GeneralDataComm 212A/ED",
2866 "", /* pulse command */
2867 "", /* tone command */
2869 "%", /* pause_chars */
2871 "\015\015", /* wake_str */
2872 500, /* wake_rate */
2873 "$", /* wake_prompt */
2874 "D\015", /* dmode_str */
2875 ":", /* dmode_prompt */
2876 "T%s\015", /* dial_str */
2885 "", /* ec_off_str */
2887 "", /* dc_off_str */
2889 "", /* aa_off_str */
2891 "", /* sb_off_str */
2892 "", /* sp_off_str */
2899 1200L, /* max_speed */
2905 MDMINF PENRIL = /* information for "Penril" modem */
2908 "", /* pulse command */
2909 "", /* tone command */
2911 "", /* pause_chars */
2913 "\015\015", /* wake_str */
2914 300, /* wake_rate */
2915 ">", /* wake_prompt */
2916 "k\015", /* dmode_str */
2917 ":", /* dmode_prompt */
2918 "%s\015", /* dial_str */
2927 "", /* ec_off_str */
2929 "", /* dc_off_str */
2931 "", /* aa_off_str */
2933 "", /* sb_off_str */
2934 "", /* sp_off_str */
2947 MDMINF RACAL = /* Racal Vadic VA4492E */
2949 "Racal Vadic VA4492E",
2950 "", /* pulse command */
2951 "", /* tone command */
2952 35, /* dial_time (manual says modem is hardwired to 60) */
2953 "Kk", /* pause_chars */
2955 "\005\015", /* wake_str, ^E^M */
2957 "*", /* wake_prompt */
2958 "D\015", /* dmode_str */
2959 "?", /* dmode_prompt */
2960 "%s\015", /* dial_str */
2962 1100, /* esc_time */
2963 5, /* esc_char, ^E */
2964 "\003\004", /* hup_str, ^C^D */
2969 "", /* ec_off_str */
2971 "", /* dc_off_str */
2973 "", /* aa_off_str */
2975 "", /* sb_off_str */
2976 "", /* sp_off_str */
2989 MDMINF VENTEL = /* Information for Ven-Tel modem */
2992 "", /* pulse command */
2993 "", /* tone command */
2995 "%", /* pause_chars */
2997 "\015\015\015", /* wake_str */
2998 300, /* wake_rate */
2999 "$", /* wake_prompt */
3000 "K\015", /* dmode_str (was "") */
3001 "Number to call: ", /* dmode_prompt (was NULL) */
3002 "%s\015", /* dial_str (was "<K%s\r>") */
3011 "", /* ec_off_str */
3013 "", /* dc_off_str */
3015 "", /* aa_off_str */
3017 "", /* sb_off_str */
3018 "", /* sp_off_str */
3031 MDMINF CONCORD = /* Info for Condor CDS 220 2400b modem */
3033 "Concord Condor CDS 220 2400b",
3034 "", /* pulse command */
3035 "", /* tone command */
3037 ",", /* pause_chars */
3039 "\015\015", /* wake_str */
3041 "CDS >", /* wake_prompt */
3043 NULL, /* dmode_prompt */
3044 "<D M%s\015>", /* dial_str */
3053 "", /* ec_off_str */
3055 "", /* dc_off_str */
3057 "", /* aa_off_str */
3059 "", /* sb_off_str */
3060 "", /* sp_off_str */
3067 2400L, /* max_speed */
3071 #endif /* OLDMODEMS */
3074 MDMINF MICROCOM = /* Microcom modems in native SX mode */
3075 /* (long answer only) */
3077 "Microcom MNP modems in SX command mode",
3078 "DP\015", /* pulse command */
3079 "DT\015", /* tone command */
3081 ",!@", /* pause_chars (! and @ aren't pure pauses) */
3084 The following sets 8 bits, no parity, BREAK passthru, and SE0 disables the
3085 escape character, which is a single character with no guard time, totally
3086 unsafe, so we have no choice but to disable it. Especially since, by
3087 default, it is Ctrl-A, which is Kermit's packet-start character. We would
3088 change it to something else, which would enable "mdmhup()", but the user
3089 wouldn't know about it. Very bad. Note: SE1 sets it to Ctrl-A, SE2
3090 sets it to Ctrl-B, etc (1..31 allowed). Also SE/Q sets it to "Q".
3092 "SE0;S1P4;SBRK5\015", /* wake_str */
3093 100, /* wake_rate */
3094 "!", /* wake_prompt */
3096 NULL, /* dmode_prompt */
3097 "D%s\015", /* dial_str - number up to 39 chars */
3100 0, /* esc_char - we can't use this */
3101 "", /* hup_str - it's "H" but can't use */
3102 "SF13\015", /* hwfc_str */
3103 "SF11\015", /* swfc_str */
3104 "SF10\015", /* nofc_str */
3105 "BAOFF;SMAUT\015", /* ec_on_str */
3106 "BAON;SMDIR\015", /* ec_off_str */
3107 "COMP1\015", /* dc_on_str */
3108 "COMP0\015", /* dc_off_str */
3109 "AA", /* aa_on_str */
3110 "", /* aa_off_str */
3112 "", /* sb_off_str */
3113 "SA2", /* sp_off_str */
3114 "SA0", /* sp_on_str */
3121 CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW|CKD_KS, /* capas */
3126 MDMINF MICROLINK = /* MicroLink ... */
3127 { /* 14.4TQ,TL,PC;28.8TQ,TQV;2440T/TR */
3128 "ELSA MicroLink 14.4, 28.8, 33.6 or 56K", /* ELSA GmbH, Aachen */
3129 "ATP\015", /* pulse command */
3130 "ATT\015", /* tone command */
3132 ",", /* pause_chars */
3135 "ATQ0E1V1X4&S0\\D0&C1&D2\\K5\015", /* wake_str */
3138 "ATQ0X4&S1\\K5\015", /* wake_str */
3140 "ATQ0X4\\K5\015", /* wake_str */
3144 "OK\015", /* wake_prompt */
3146 "", /* dmode_prompt */
3147 "ATD%s\015", /* dial_str */
3149 1100, /* esc_time */
3151 "ATQ0H\015", /* hup_str */
3152 "AT\\Q3\015", /* hwfc_str */
3153 "AT\\Q1\\X0\015", /* swfc_str */
3154 "AT\\Q0\015", /* nofc_str */
3155 "AT\\N3\015", /* ec_on_str */
3156 "AT\\N0\015", /* ec_off_str */
3157 "AT%C3\015", /* dc_on_str */
3158 "AT%C0\015", /* dc_off_str */
3159 "ATS0=1\015", /* aa_on_str */
3160 "ATS0=0\015", /* aa_off_str */
3161 "\\J0", /* sb_on_str (?) */
3162 "", /* sb_off_str */
3163 "ATM1\015", /* sp_on_str */
3164 "ATM0\015", /* sp_off_str */
3165 "ATL1\015", /* vol1_str */
3166 "ATL2\015", /* vol2_str */
3167 "ATL3\015", /* vol3_str */
3168 "ATX3\015", /* ignoredt */
3170 57600L, /* max_speed */
3171 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3176 MDMINF ULINKV250 = /* MicroLink V.250 */
3177 { /* 56Kflex, V.90; V.250 command set */
3178 "ELSA MicroLink 56K V.250", /* ELSA GmbH, Aachen */
3179 "ATP\015", /* pulse command */
3180 "ATT\015", /* tone command */
3182 ",", /* pause_chars */
3185 /* \D0 = DSR & CTS always on but hwfc overrides on CTS. */
3186 "ATQ0E1V1X4&S0\\D0&C1&D2\015", /* wake_str */
3189 "ATQ0X4&S1\015", /* wake_str */
3191 "ATQ0X4\015", /* wake_str */
3195 "OK\015", /* wake_prompt */
3197 "", /* dmode_prompt */
3198 "ATD%s\015", /* dial_str */
3200 1100, /* esc_time */
3202 "ATQ0H0\015", /* hup_str */
3203 "AT+IFC=2,2\015", /* hwfc_str */
3204 "AT+IFC=1,1\015", /* swfc_str */
3205 "AT+IFC=0,0\015", /* nofc_str */
3206 "AT+ES=3,0\015", /* ec_on_str */
3207 "AT+ES=1,0\015", /* ec_off_str */
3208 "AT+DS=3,0,2048,32\015", /* dc_on_str */
3209 "AT+DS=0,0\015", /* dc_off_str */
3211 "ATS0=1\015", /* aa_on_str */
3212 "ATS0=0\015", /* aa_off_str */
3213 "", /* sb_on_str (?) */
3214 "", /* sb_off_str */
3215 "ATM1\015", /* sp_on_str */
3216 "ATM0\015", /* sp_off_str */
3217 "ATL1\015", /* vol1_str */
3218 "ATL2\015", /* vol2_str */
3219 "ATL3\015", /* vol3_str */
3220 "ATX3\015", /* ignoredt */
3222 57600L, /* max_speed */
3223 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3226 #endif /* MINIDIAL */
3229 MDMINF ITUTV250 = /* ITU-T V.250 conforming modem */
3231 "Any ITU-T V.25ter/V.250 conformant modem",
3232 "ATP\015", /* pulse command */
3233 "ATT\015", /* tone command */
3235 ",", /* pause_chars */
3237 "ATQ0E1V1X4&C1&D2\015", /* wake_str (no &Sn in V.25) */
3239 "OK\015", /* wake_prompt */
3241 "", /* dmode_prompt */
3242 "ATD%s\015", /* dial_str */
3244 1100, /* esc_time */
3246 "ATQ0H0\015", /* hup_str */
3247 "AT+IFC=2,2\015", /* hwfc_str */
3248 "AT+IFC=1,1\015", /* swfc_str */
3249 "AT+IFC=0,0\015", /* nofc_str */
3250 "AT+ES=3,0,2;+EB=1,0,30\015", /* ec_on_str */
3251 "AT+ES=0\015", /* ec_off_str */
3252 "AT+DS=3,0\015", /* dc_on_str */
3253 "AT+DS=0,0\015", /* dc_off_str */
3254 "ATS0=1\015", /* aa_on_str */
3255 "ATS0=0\015", /* aa_off_str */
3257 "", /* sb_off_str */
3258 "ATM1\015", /* sp_on_str */
3259 "ATM0\015", /* sp_off_str */
3260 "ATL1\015", /* vol1_str */
3261 "ATL2\015", /* vol2_str */
3262 "ATL3\015", /* vol3_str */
3263 "ATX3\015", /* ignoredt */
3265 57600L, /* max_speed */
3266 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3272 #endif /* CK_TAPI */
3273 MDMINF GENERIC = /* Generic high speed ... */
3275 "Generic high-speed AT command set",
3276 "ATP\015", /* pulse command */
3277 "ATT\015", /* tone command */
3279 ",", /* pause_chars */
3283 "", /* wake_prompt */
3285 "", /* dmode_prompt */
3286 "ATD%s\015", /* dial_str */
3288 1100, /* esc_time */
3290 "ATQ0H0\015", /* hup_str */
3295 "", /* ec_off_str */
3297 "", /* dc_off_str */
3298 "ATS0=1\015", /* aa_on_str */
3299 "ATS0=0\015", /* aa_off_str */
3301 "", /* sb_off_str */
3303 "", /* sp_off_str */
3307 "ATX3\015", /* ignoredt */
3309 115200, /* max_speed */
3310 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW, /* capas */
3316 MDMINF XJACK = /* Megahertz X-Jack */
3318 "Megahertz X-Jack XJ3144 / CC6144",
3319 "ATP\015", /* pulse command */
3320 "ATT\015", /* tone command */
3322 ",", /* pause_chars */
3325 "ATQ0E1V1X4N1&C1&D2\\K5\015", /* wake_str */
3327 "ATQ0X4N1\\K5\015", /* wake_str */
3330 "OK\015", /* wake_prompt */
3332 "", /* dmode_prompt */
3333 "ATD%s\015", /* dial_str */
3335 1100, /* esc_time */
3337 "ATQ0H\015", /* hup_str */
3338 "AT&K3\015", /* hwfc_str */
3339 "AT&K4\015", /* swfc_str */
3340 "AT&K0\015", /* nofc_str */
3341 "AT\\N3&Q5\015", /* ec_on_str */
3342 "AT\\N1&Q0\015", /* ec_off_str */
3343 "AT%C3\015", /* dc_on_str */
3344 "AT%C0\015", /* dc_off_str */
3345 "ATS0=1\015", /* aa_on_str */
3346 "ATS0=0\015", /* aa_off_str */
3348 "", /* sb_off_str */
3349 "ATM1\015", /* sp_on_str */
3350 "ATM0\015", /* sp_off_str */
3351 "ATL1\015", /* vol1_str */
3352 "ATL2\015", /* vol2_str */
3353 "ATL3\015", /* vol3_str */
3354 "ATX3\015", /* ignoredt */
3356 57600L, /* max_speed */
3357 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3362 MDMINF SPIRITII = /* QuickComm Spirit II */
3364 "QuickComm Spirit II",
3365 "ATP\015", /* pulse command */
3366 "ATT\015", /* tone command */
3368 ",", /* pause_chars */
3370 "AT&F\015", /* wake_str */
3372 "OK\015", /* wake_prompt */
3374 "", /* dmode_prompt */
3375 "ATD%s\015", /* dial_str */
3377 1100, /* esc_time */
3379 "ATQ0H\015", /* hup_str */
3380 "AT*F3\015", /* hwfc_str */
3381 "AT*F2\015", /* swfc_str */
3382 "AT*F0\015", /* nofc_str */
3383 "AT*E6\015", /* ec_on_str */
3384 "AT*E0\015", /* ec_off_str */
3385 "AT*E9\015", /* dc_on_str */
3386 "AT*E0\015", /* dc_off_str */
3387 "ATS0=2\015", /* aa_on_str */
3388 "ATS0=0\015", /* aa_off_str */
3390 "", /* sb_off_str */
3391 "ATM1\015", /* sp_on_str */
3392 "ATM0\015", /* sp_off_str */
3393 "ATL1\015", /* vol1_str */
3394 "ATL2\015", /* vol2_str */
3395 "ATL3\015", /* vol3_str */
3396 "ATX3\015", /* ignoredt */
3398 57600L, /* max_speed */
3399 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3404 MDMINF MONTANA = { /* Motorola Montana */
3405 "Motorola Montana", /* Name */
3406 "ATP\015", /* pulse command */
3407 "ATT\015", /* tone command */
3409 ",", /* pause_chars */
3412 "ATQ0E1V1X4&S0&C1&D2\\K5\\V1\015", /* wake_str */
3415 "ATQ0E1X4&S1\\K5\\V1\015", /* wake_str */
3417 "ATQ0E1X4\\K5\\V1\015", /* wake_str */
3421 "OK\015", /* wake_prompt */
3423 "", /* dmode_prompt */
3424 "ATD%s\015", /* dial_str */
3426 1100, /* esc_time */
3428 "ATQ0H0\015", /* hup_str */
3429 "AT\\Q3\015", /* hwfc_str */
3430 "AT\\Q1\015", /* swfc_str */
3431 "AT\\Q0\015", /* nofc_str */
3432 "AT\\N4\015", /* ec_on_str */
3433 "AT\\N1\015", /* ec_off_str */
3434 "AT%C1\015", /* dc_on_str */
3435 "AT%C0\015", /* dc_off_str */
3436 "ATS0=1\015", /* aa_on_str */
3437 "ATS0=0\015", /* aa_off_str */
3438 "AT\\J0\015", /* sb_on_str */
3439 "AT\\J1\015", /* sb_off_str */
3440 "ATM1\015", /* sp_on_str */
3441 "ATM0\015", /* sp_off_str */
3442 "ATL1\015", /* vol1_str */
3443 "ATL2\015", /* vol2_str */
3444 "ATL3\015", /* vol3_str */
3445 "ATX3\015", /* ignoredt */
3447 57600L, /* max_speed */
3448 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3453 MDMINF COMPAQ = { /* Compaq Data+Fax Modem */
3454 "Compaq Data+Fax Modem", /* Name */
3455 "ATP\015", /* pulse command */
3456 "ATT\015", /* tone command */
3458 ",", /* pause_chars */
3461 "ATQ0E1V1X4&S0&C1&D2\015", /* wake_str */
3464 "ATQ0E1X4&S1\015", /* wake_str */
3466 "ATQ0E1X4\015", /* wake_str */
3470 "OK\015", /* wake_prompt */
3472 "", /* dmode_prompt */
3473 "ATD%s\015", /* dial_str */
3475 1100, /* esc_time */
3477 "ATQ0H0\015", /* hup_str */
3478 "AT\\Q3\015", /* hwfc_str (same as &K3) */
3479 "AT\\Q1\015", /* swfc_str (same as &K4) */
3480 "AT\\Q0\015", /* nofc_str (same as &K0) */
3481 "AT\\N3\015", /* ec_on_str */
3482 "AT\\N0\015", /* ec_off_str */
3483 "AT%C1\015", /* dc_on_str */
3484 "AT%C0\015", /* dc_off_str */
3485 "ATS0=1\015", /* aa_on_str */
3486 "ATS0=0\015", /* aa_off_str */
3487 "AT\\N3\015", /* sb_on_str */
3488 "AT\\N1\015", /* sb_off_str */
3489 "ATM1\015", /* sp_on_str */
3490 "ATM0\015", /* sp_off_str */
3491 "ATL0\015", /* vol1_str */
3492 "ATL2\015", /* vol2_str */
3493 "ATL3\015", /* vol3_str */
3494 "ATX3\015", /* ignoredt */
3496 115200L, /* max_speed */
3497 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3503 MDMINF FUJITSU = { /* Fujitsu */
3504 "Fujitsu Fax/Modem Adapter", /* Name */
3505 "ATP\015", /* pulse command */
3506 "ATT\015", /* tone command */
3508 ",", /* pause_chars */
3511 "ATQ0E1V1X4&S0&C1&D2\\K5\\N3\015", /* wake_str */
3514 "ATQ0E1X4&S1\\K5\\N3\015", /* wake_str */
3516 "ATQ0E1X4\\K5\\N3\015", /* wake_str */
3520 "OK\015", /* wake_prompt */
3522 "", /* dmode_prompt */
3523 "ATD%s\015", /* dial_str */
3525 1100, /* esc_time */
3527 "ATQ0H0\015", /* hup_str */
3528 "AT&K3\\Q3\015", /* hwfc_str */
3529 "AT&K4\\Q1\015", /* swfc_str */
3530 "AT&K0\\Q0\015", /* nofc_str */
3531 "AT\\N3\015", /* ec_on_str */
3532 "AT\\N0\015", /* ec_off_str */
3533 "AT%C1", /* dc_on_str */
3534 "AT%C0", /* dc_off_str */
3535 "ATS0=1\015", /* aa_on_str */
3536 "ATS0=0\015", /* aa_off_str */
3537 "AT\\J0\015", /* sb_on_str */
3538 "AT\\J1\015", /* sb_off_str */
3539 "ATM1\015", /* sp_on_str */
3540 "ATM0\015", /* sp_off_str */
3541 "ATL1\015", /* vol1_str */
3542 "ATL2\015", /* vol2_str */
3543 "ATL3\015", /* vol3_str */
3544 "ATX3\015", /* ignoredt */
3546 115200L, /* max_speed */
3547 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3552 MDMINF MHZATT = /* Megahertz AT&T V.34 */
3554 "Megahertz AT&T V.34",
3555 "ATP\015", /* pulse command */
3556 "ATT\015", /* tone command */
3558 ",", /* pause_chars */
3561 "ATQ0E1V1X4N1&C1&D2\\K5\015", /* wake_str */
3563 "ATQ0X4N1\\K5\015", /* wake_str */
3566 "OK\015", /* wake_prompt */
3568 "", /* dmode_prompt */
3569 "ATD%s\015", /* dial_str */
3571 1100, /* esc_time */
3573 "ATQ0H\015", /* hup_str */
3574 "AT&K3\015", /* hwfc_str */
3575 "AT&K4\015", /* swfc_str */
3576 "AT&K0\015", /* nofc_str */
3577 "AT\\N3\015", /* ec_on_str */
3578 "AT\\N0\015", /* ec_off_str */
3579 "AT%C1\"H3\015", /* dc_on_str */
3580 "AT%C0\"H0\015", /* dc_off_str */
3581 "ATS0=1\015", /* aa_on_str */
3582 "ATS0=0\015", /* aa_off_str */
3583 "AT\\J0\015", /* sb_on_str */
3584 "AT\\J1\015", /* sb_off_str */
3585 "ATM1\015", /* sp_on_str */
3586 "ATM0\015", /* sp_off_str */
3587 "ATL1\015", /* vol1_str */
3588 "ATL2\015", /* vol2_str */
3589 "ATL3\015", /* vol3_str */
3590 "ATX3\015", /* ignoredt */
3592 115200L, /* max_speed */
3593 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3598 MDMINF SUPRASON = /* SupraSonic */
3600 "Diamond SupraSonic 288V+", /* Diamond Multimedia Systems Inc */
3601 "ATP\015", /* pulse command */
3602 "ATT\015", /* tone command */
3604 ",", /* pause_chars */
3607 "ATQ0E1V1N1W0X4Y0&S0&C1&D2\015", /* wake_str */
3610 "ATQ0E1N1W0X4Y0&S1\015", /* wake_str */
3612 "ATQ0E1N1W0X4Y0\015", /* wake_str */
3616 "OK\015", /* wake_prompt */
3618 "", /* dmode_prompt */
3619 "ATD%s\015", /* dial_str */
3621 1100, /* esc_time */
3623 "ATQ0H0\015", /* hup_str */
3624 "AT&K3\015", /* hwfc_str */
3625 "AT&K4\015", /* swfc_str */
3626 "AT&K\015", /* nofc_str */
3627 "AT&Q5\\N3S48=7\015", /* ec_on_str */
3628 "AT&Q0\\N1\015", /* ec_off_str */
3629 "AT%C3S46=138\015", /* dc_on_str */
3630 "AT%C0S46=136\015", /* dc_off_str */
3631 "ATS0=1\015", /* aa_on_str */
3632 "ATS0=0\015", /* aa_off_str */
3634 "", /* sb_off_str */
3635 "ATM1\015", /* sp_on_str */
3636 "ATM\015", /* sp_off_str */
3637 "ATL\015", /* vol1_str */
3638 "ATL2\015", /* vol2_str */
3639 "ATL3\015", /* vol3_str */
3640 "ATX3\015", /* ignoredt */
3642 115200L, /* max_speed */
3643 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3648 MDMINF BESTDATA = /* Best Data */
3650 "Best Data Fax Modem", /* Best Data Fax Modem */
3651 "ATP\015", /* pulse command */
3652 "ATT\015", /* tone command */
3654 ",", /* pause_chars */
3657 "ATQ0E1V1N1W0X4Y0&S0&C1&D2\015", /* wake_str */
3660 "ATQ0E1N1W0X4Y0&S1\015", /* wake_str */
3662 "ATQ0E1N1W0X4Y0\015", /* wake_str */
3666 "OK\015", /* wake_prompt */
3668 "", /* dmode_prompt */
3669 "ATD%s\015", /* dial_str */
3671 1100, /* esc_time */
3673 "ATQ0H0\015", /* hup_str */
3674 "AT&K3\015", /* hwfc_str */
3675 "AT&K4\015", /* swfc_str */
3676 "AT&K\015", /* nofc_str */
3677 "AT&Q6\\N3\015", /* ec_on_str */
3678 "AT&Q0\\N1\015", /* ec_off_str */
3679 "AT%C3\015", /* dc_on_str */
3680 "AT%C0\015", /* dc_off_str */
3681 "ATS0=1\015", /* aa_on_str */
3682 "ATS0=0\015", /* aa_off_str */
3683 "AT\\N3\015", /* sb_on_str */
3684 "AT\\N0\015", /* sb_off_str */
3685 "ATM1\015", /* sp_on_str */
3686 "ATM0\015", /* sp_off_str */
3687 "ATL1\015", /* vol1_str */
3688 "ATL2\015", /* vol2_str */
3689 "ATL3\015", /* vol3_str */
3690 "ATX3\015", /* ignoredt */
3692 57600L, /* max_speed */
3693 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3698 MDMINF ATT1900 = /* AT&T Secure Data STU III 1900 */
3700 "AT&T Secure Data STU III Model 1900", /* name */
3701 "", /* pulse command */
3702 "", /* tone command */
3704 ",", /* pause_chars */
3707 "ATQ0E1V1X4\015", /* wake_str */
3709 "ATQ0E1X4\015", /* wake_str */
3712 "OK\015", /* wake_prompt */
3714 "", /* dmode_prompt */
3715 "ATD%s\015", /* dial_str */
3717 1100, /* esc_time */
3719 "ATQ0H0\015", /* hup_str */
3724 "", /* ec_off_str */
3726 "", /* dc_off_str */
3727 "ATS0=1\015", /* aa_on_str */
3728 "ATS0=0\015", /* aa_off_str */
3730 "", /* sb_off_str */
3732 "", /* sp_off_str */
3738 9600L, /* max_speed */
3739 CKD_AT|CKD_SB|CKD_HW, /* capas */
3744 Experimentation showed that hardly any of the documented commands did
3745 anything other that print ERROR. At first there was no communication at
3746 all at 9600 bps -- turns out the interface speed was stuck at 2400.
3747 ATS28=130 (given at 2400 bps) allowed it to work at 9600.
3750 MDMINF ATT1910 = /* AT&T Secure Data STU III 1910 */
3751 { /* Adds V.32bis, V.42, V.42bis */
3752 "AT&T Secure Data STU III Model 1910", /* name */
3754 /* Believe it or not, "ATT" and "ATP" result in ERROR */
3756 "", /* pulse command */
3757 "", /* tone command */
3759 ",", /* pause_chars */
3762 "ATQ0E1V1X4\015", /* wake_str */
3764 "ATQ0E1X4\015", /* wake_str */
3767 "OK\015", /* wake_prompt */
3769 "", /* dmode_prompt */
3770 "ATD%s\015", /* dial_str */
3772 1100, /* esc_time */
3774 "ATQ0H0\015", /* hup_str */
3779 /* These are evidently read-only registers */
3780 "ATS46=138S47=0\015", /* ec_on_str */
3781 "ATS46=138S47=128\015", /* ec_off_str */
3782 "ATS46=138S47=0\015", /* dc_on_str */
3783 "ATS46=138S47=128\015", /* dc_off_str */
3789 #endif /* COMMENT */
3790 "ATS0=1\015", /* aa_on_str */
3791 "ATS0=0\015", /* aa_off_str */
3793 "", /* sb_off_str */
3795 "", /* sp_off_str */
3801 9600L, /* max_speed */
3802 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW, /* capas */
3807 MDMINF KEEPINTOUCH = /* AT&T KeepinTouch Card Modem */
3809 "AT&T KeepinTouch V.32bis Card Modem", /* Name */
3810 "ATP\015", /* pulse command */
3811 "ATT\015", /* tone command */
3813 ",", /* pause_chars */
3816 /* This used to include &C1&S0&D2+Q0 but that gives ERROR */
3817 "ATQ0E1V1X4&S0&C1&D2\\K5\015", /* wake_str */
3820 "ATQ0E1X4&S1\\K5\015", /* wake_str */
3822 "ATQ0E1X4\\K5\015", /* wake_str */
3826 "OK\015", /* wake_prompt */
3828 "", /* dmode_prompt */
3829 "ATD%s\015", /* dial_str */
3831 1100, /* esc_time */
3833 "ATQ0H0\015", /* hup_str */
3834 "AT\\Q3\015", /* hwfc_str */
3835 "AT\\Q1\\X0\015", /* swfc_str */
3836 "AT\\Q0\015", /* nofc_str */
3837 "AT\\N3-J1\015", /* ec_on_str */
3838 "AT\\N1\015", /* ec_off_str */
3839 "AT%C3\"H3\015", /* dc_on_str */
3840 "AT%C0\"H0\015", /* dc_off_str */
3841 "ATS0=1\015", /* aa_on_str */
3842 "ATS0=0\015", /* aa_off_str */
3843 "ATN0\\J0\015", /* sb_on_str */
3844 "ATN1\\J1\015", /* sb_off_str */
3845 "ATM1\015", /* sp_on_str */
3846 "ATM0\015", /* sp_off_str */
3850 "ATX3\015", /* ignoredt */
3852 57600L, /* max_speed */
3853 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3858 MDMINF ROLM_AT = /* Rolm data phone with AT command set */
3860 "Rolm 244PC or 600 Series with AT Command Set",
3861 "", /* pulse command */
3862 "", /* tone command */
3864 ",", /* pause_chars */
3867 "ATE1Q0V1\015", /* wake_str */
3869 "ATQ0\015", /* wake_str */
3872 "OK\015", /* wake_prompt */
3874 "", /* dmode_prompt */
3875 "ATDT%s\015", /* dial_str -- always Tone */
3877 1100, /* esc_time */
3879 "ATQ0H0\015", /* hup_str */
3884 "", /* ec_off_str */
3886 "", /* dc_off_str */
3887 "ATS0=1\015", /* aa_on_str */
3888 "ATS0=0\015", /* aa_off_str */
3890 "", /* sb_off_str */
3892 "", /* sp_off_str */
3898 19200L, /* max_speed */
3904 MDMINF ATLAS = /* Atlas / Newcom ixfC 33.6 */
3906 "Atlas / Newcom 33600ixfC Data/Fax Modem", /* Name */
3907 "ATP\015", /* pulse command */
3908 "ATT\015", /* tone command */
3910 ",", /* pause_chars */
3913 "ATZ0&FQ0V1&C1&D2\015", /* wake_str */
3915 "ATZ0&FQ0V1\015", /* wake_str */
3918 "OK\015", /* wake_prompt */
3920 "", /* dmode_prompt */
3921 "ATD%s\015", /* dial_str */
3923 1100, /* esc_time */
3925 "ATQ0H0\015", /* hup_str */
3926 "AT&K3\015", /* hwfc_str */
3927 "AT&K4\015", /* swfc_str */
3928 "AT&K0\015", /* nofc_str */
3929 "AT\"H3\015", /* ec_on_str */
3930 "AT\"H0\015", /* ec_off_str */
3931 "AT%C1\015", /* dc_on_str */
3932 "AT%C0\015", /* dc_off_str */
3933 "ATS0=1\015", /* aa_on_str */
3934 "ATS0=0\015", /* aa_off_str */
3935 "ATN0\\J0\015", /* sb_on_str */
3936 "ATN1\\J1\015", /* sb_off_str */
3937 "ATM1\015", /* sp_on_str */
3938 "ATM0\015", /* sp_off_str */
3939 "ATL1\015", /* vol1_str */
3940 "ATL2\015", /* vol2_str */
3941 "ATL3\015", /* vol3_str */
3942 "ATX3\015", /* ignoredt */
3944 115200L, /* max_speed */
3945 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
3950 MDMINF CODEX = { /* Motorola Codex */
3951 "Motorola Codex 326X Series", /* Name - AT&V to see settings */
3952 "ATP\015", /* pulse command */
3953 "ATT\015", /* tone command */
3955 ",", /* pause_chars */
3958 /* &M0=Async (not sync) */
3959 /* *MM0=Automatic modulation negotiation */
3960 /* *DE22=Automatic data rate */
3961 "ATZQ0E1V1X4Y0*DE22*MM0&C1&M0&S0&D2\015", /* wake_str */
3964 "ATZQ0E1V1X4Y0*DE22*MM0&C1&M0&S1\015", /* wake_str */
3966 "ATZQ0E1V1X4Y0*DE22*MM0&C1&M0\015", /* wake_str */
3970 "OK\015", /* wake_prompt */
3972 "", /* dmode_prompt */
3973 "ATD%s\015", /* dial_str */
3975 1100, /* esc_time */
3977 "ATQ0H0\015", /* hup_str */
3978 "AT*MF1*FL3\015", /* hwfc_str */
3979 "AT*MF1*FL1\015", /* swfc_str */
3980 "AT*MF0*FL0\015", /* nofc_str */
3981 "AT*EC0*SM3*SC0\015", /* ec_on_str */
3982 "AT*SM0\015", /* ec_off_str */
3983 "AT*DC1\015", /* dc_on_str */
3984 "AT*DC0\015", /* dc_off_str */
3985 "AT*AA5S0=1\015", /* aa_on_str */
3986 "AT*AA5S0=0\015", /* aa_off_str */
3987 "AT*SC1\015", /* sb_on_str */
3988 "AT*SC0\015", /* sb_off_str */
3989 "ATM1\015", /* sp_on_str */
3990 "ATM0\015", /* sp_off_str */
3991 "ATL1\015", /* vol1_str */
3992 "ATL2\015", /* vol2_str */
3993 "ATL3\015", /* vol3_str */
3994 "ATX3*BD2\015", /* ignoredt */
3996 115200L, /* max_speed */
3997 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
4002 MDMINF MT5634ZPX = /* Multitech */
4004 "Multitech MT5634ZPX", /* name */
4005 "ATP\015", /* pulse command */
4006 "ATT\015", /* tone command */
4008 ",", /* pause_chars */
4011 "ATE1Q0V1X4&S0&C1&D2&Q0\015", /* wake_str */
4014 "ATQ0E1X4&S1&Q0\015", /* wake_str */
4016 "ATQ0E1X4&Q0\015", /* wake_str */
4020 "OK\015", /* wake_prompt */
4022 "", /* dmode_prompt */
4023 "ATD%s\015", /* dial_str */
4025 1100, /* esc_time */
4027 "ATQ0H0\015", /* hup_str */
4028 "AT&K3\015", /* hwfc_str */
4029 "AT&K4\015", /* swfc_str */
4030 "AT&K0\015", /* nofc_str */
4031 "AT\\N3\015", /* ec_on_str */
4032 "AT\\N1\015", /* ec_off_str */
4033 "AT%C1\015", /* dc_on_str */
4034 "AT%C0\015", /* dc_off_str */
4035 "ATS0=1\015", /* aa_on_str */
4036 "ATS0=0\015", /* aa_off_str */
4037 "AT\\J0\015", /* sb_on_str */
4038 "AT\\J1\015", /* sb_off_str (NOT SUPPORTED) */
4039 "ATM1\015", /* sp_on_str */
4040 "ATM0\015", /* sp_off_str */
4041 "ATL1\015", /* vol1_str */
4042 "ATL2\015", /* vol2_str */
4043 "ATL3\015", /* vol3_str */
4044 "ATX3\015", /* ignoredt */
4046 115200L, /* max_speed */
4047 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
4052 MDMINF MOTSM56 = /* Motorola SM56 Chipset */
4054 "Motorola SM56 V.90 chipset", /* name */
4055 "ATP\015", /* pulse command */
4056 "ATT\015", /* tone command */
4058 ",", /* pause_chars */
4061 "ATQ0V1X4&S0&C1&D2*MM16\015", /* wake_str */
4064 "ATQ0V1X4&S1&C1&D2*MM16\015", /* wake_str */
4066 "ATQ0V1X4&C1&D2*MM16\015", /* wake_str */
4070 "OK\015", /* wake_prompt */
4072 "", /* dmode_prompt */
4073 "ATD%s\015", /* dial_str */
4075 1100, /* esc_time */
4077 "ATQ0H0\015", /* hup_str */
4078 "AT\\Q3\015", /* hwfc_str */
4079 "AT\\Q1\015", /* swfc_str */
4080 "AT\\Q0\015", /* nofc_str */
4081 "AT\\N7\015", /* ec_on_str */
4082 "AT\\N1\015", /* ec_off_str */
4083 "AT%C1\015", /* dc_on_str */
4084 "AT%C0\015", /* dc_off_str */
4085 "ATS0=1\015", /* aa_on_str */
4086 "ATS0=0\015", /* aa_off_str */
4087 "AT\\J0\015", /* sb_on_str */
4088 "AT\\J1\015", /* sb_off_str (NOT SUPPORTED) */
4089 "ATM1\015", /* sp_on_str */
4090 "ATM0\015", /* sp_off_str */
4091 "ATL1\015", /* vol1_str */
4092 "ATL2\015", /* vol2_str */
4093 "ATL3\015", /* vol3_str */
4094 "ATX3\015", /* ignoredt */
4096 115200L, /* max_speed */
4097 CKD_AT|CKD_SB|CKD_EC|CKD_DC|CKD_HW|CKD_SW, /* capas */
4100 #endif /* MINIDIAL */
4102 /* END MDMINF STRUCT DEFINITIONS */
4105 Table to convert modem numbers to MDMINF struct pointers.
4106 The entries MUST be in ascending order by modem number, without any
4107 "gaps" in the numbers, and starting from one (1).
4110 MDMINF *modemp[] = {
4119 #else /* Not MINIDIAL */
4137 #endif /* OLDMODEMS */
4145 #endif /* OLDMODEMS */
4153 #endif /* OLDMODEMS */
4160 #endif /* OLDMODEMS */
4161 &USR, /* 19 USR Courier and Sportster */
4162 &OLDTB, /* 20 Old Telebits */
4163 &DIGITEL, /* 21 Digitel CCITT */
4164 &H_1200, /* 22 Hayes 1200 */
4165 &H_ULTRA, /* 23 Hayes Ultra */
4166 &H_ACCURA, /* 24 Hayes Optima */
4168 &DATAPORT, /* 26 Dataport */
4169 &BOCA, /* 27 Boca */
4170 &MOTOROLA, /* 28 Motorola UDS MOTOROLA */
4171 NULL, /* 29 Digicomm */
4172 NULL, /* 30 Dynalink */
4173 &INTEL, /* 31 Intel */
4174 &UCOM_AT, /* 32 Microcom in AT mode */
4175 &MULTITECH, /* 33 Multitech */
4176 &SUPRA, /* 34 Supra */
4177 &ZOLTRIX, /* 35 Zoltrix */
4178 &ZOOM, /* 36 Zoom */
4179 &ZYXEL, /* 37 ZyXEL */
4180 &DUMMY, /* 38 TAPI */
4181 &NEWTB, /* 39 New-Telebit */
4182 &MAXTECH, /* 40 MaxTech */
4183 &DUMMY, /* 41 User-defined */
4184 &RWV32, /* 42 Rockwell V.32 */
4185 &RWV32B, /* 43 Rockwell V.32bis */
4186 &RWV34, /* 44 Rockwell V.34 */
4187 &MWAVE, /* 45 IBM Mwave */
4188 &TELEPATH, /* 46 Gateway 2000 Telepath II 28.8 */
4189 &MICROLINK, /* 47 MicroLink modems */
4190 &CARDINAL, /* 48 Cardinal */
4191 &GENERIC, /* 49 Generic high-speed */
4192 &XJACK, /* 50 Megahertz-Xjack */
4193 &SPIRITII, /* 51 QuickComm Spirit II */
4194 &MONTANA, /* 52 Motorola Montana */
4195 &COMPAQ, /* 53 Compaq Data+Fax */
4196 &FUJITSU, /* 54 Fujitsu */
4197 &MHZATT, /* 55 Megahertz AT&T V.34 */
4198 &SUPRASON, /* 56 Suprasonic */
4199 &BESTDATA, /* 57 Best Data */
4200 &ATT1900, /* 58 AT&T Secure Data STU III 1900 */
4201 &ATT1910, /* 59 AT&T Secure Data STU III 1910 */
4202 &KEEPINTOUCH, /* 60 AT&T KeepinTouch */
4203 &USRX2, /* 61 USR XJ-1560 X2 */
4204 &ROLM_AT, /* 62 Rolm with AT command set */
4205 &ATLAS, /* 63 Atlas / Newcom */
4206 &CODEX, /* 64 Motorola Codex */
4207 &MT5634ZPX, /* 65 Multitech MT5634ZPX */
4208 &ULINKV250, /* 66 Microlink V.250 56K */
4209 &ITUTV250, /* 67 Generic ITU-T V.250 */
4210 &RWV90, /* 68 Rockwell V.90 56K */
4211 &SUPRAX, /* 69 Diamond Supra Express V.90 */
4212 &LUCENT, /* 70 Lucent Venus chipset */
4213 &PCTEL, /* 71 PCTel */
4214 &CONEXANT, /* 72 Conexant */
4215 &ZOOMV34, /* 73 Zoom V.34 */
4216 &ZOOMV90, /* 74 Zoom V.90 */
4217 &ZOOMV92, /* 75 Zoom V.92 */
4218 &MOTSM56 /* 76 Motorola SM56 chipset */
4219 #endif /* MINIDIAL */
4222 * Declare modem names and associated numbers for command parsing,
4223 * and also for doing number-to-name translation.
4225 * The entries must be in alphabetical order by modem name.
4227 struct keytab mdmtab[] = {
4229 "3com-usr-megahertz-56k", n_USRX2, CM_INV,
4230 "acer-v90", n_RWV90, M_ALIAS,
4231 "atlas-newcom-33600ifxC", n_ATLAS, 0,
4232 "att-1900-stu-iii", n_ATT1900, 0,
4233 "att-1910-stu-iii", n_ATT1910, 0,
4234 "att-7300", n_ATTUPC, 0,
4235 "att-dataport", n_DATAPORT, 0,
4236 "att-dtdm", n_ATTDTDM, 0,
4237 "att-isn", n_ATTISN, 0,
4238 "att-keepintouch", n_KEEPINTOUCH, 0,
4239 "att-switched-net", n_ATTMODEM, 0,
4241 "att7300", n_ATTUPC, CM_INV, /* old name */
4242 "attdtdm", n_ATTDTDM, CM_INV, /* old name */
4243 "attisn", n_ATTISN, CM_INV, /* old name */
4244 "attmodem", n_ATTMODEM, CM_INV, /* old name */
4246 "bestdata", n_BESTDATA, 0,
4248 "cardinal", n_CARDINAL, 0,
4249 #endif /* MINIDIAL */
4250 "ccitt-v25bis", n_CCITT, CM_INV, /* Name changed to ITU-T */
4253 "cermetek", n_CERMETEK, M_OLD,
4254 #endif /* OLDMODEMS */
4255 "compaq", n_COMPAQ, 0,
4257 "concord", n_CONCORD, M_OLD,
4258 #endif /* OLDMODEMS */
4259 "conexant", n_CONEXANT, 0,
4260 "courier", n_USR, CM_INV,
4261 "dataport", n_DATAPORT, CM_INV, /* == att-dataport */
4263 "df03-ac", n_DF03, M_OLD,
4264 "df100-series", n_DF100, M_OLD,
4265 "df200-series", n_DF200, M_OLD,
4266 #endif /* OLDMODEMS */
4267 "digitel-dt22", n_DIGITEL, 0,
4268 #endif /* MINIDIAL */
4269 "direct", 0, CM_INV, /* Synonym for NONE */
4271 "fujitsu", n_FUJITSU, 0,
4272 "gateway-telepath", n_TELEPATH, 0,
4274 "gdc-212a/ed", n_GDC, M_OLD,
4275 "ge", n_GENERIC, CM_INV|CM_ABR,
4276 "gen", n_GENERIC, CM_INV|CM_ABR,
4277 "gendatacomm", n_GDC, CM_INV, /* Synonym for GDC */
4278 #endif /* OLDMODEMS */
4279 #endif /* MINIDIAL */
4280 "gene", n_GENERIC, CM_INV|CM_ABR,
4281 "generic", n_GENERIC, 0,
4282 "generic-high-speed",n_GENERIC, CM_INV,
4283 "h", n_HAYES, CM_INV|CM_ABR,
4284 "ha", n_HAYES, CM_INV|CM_ABR,
4285 "hay", n_HAYES, CM_INV|CM_ABR,
4286 "haye", n_HAYES, CM_INV|CM_ABR,
4287 "hayes", n_HAYES, CM_INV|CM_ABR, /* Hayes 2400 */
4289 "hayes-1200", n_H_1200, 0,
4290 #endif /* MINIDIAL */
4291 "hayes-2400", n_HAYES, 0,
4293 "hayes-high-speed", n_H_ACCURA, 0,
4294 "hayes-accura", n_H_ACCURA, CM_INV,
4295 "hayes-optima", n_H_ACCURA, CM_INV,
4296 "hayes-ultra", n_H_ULTRA, CM_INV,
4297 "hst-courier", n_USR, CM_INV, /* Synonym for COURIER */
4298 "intel", n_INTEL, 0,
4299 #endif /* MINIDIAL */
4301 "itu-t-v250", n_ITUTV250, 0,
4302 "itu-t-v25bis", n_CCITT, 0, /* New name for CCITT */
4303 "itu-t-v25ter/v250",n_ITUTV250, CM_INV,
4306 "lucent", n_LUCENT, 0,
4307 "maxtech", n_MAXTECH, 0,
4309 "megahertz-att-v34", n_MHZATT, 0, /* Megahertzes */
4310 "megahertz-xjack", n_XJACK, CM_INV|CM_ABR,
4311 "megahertz-xjack-33.6", n_XJACK, 0,
4312 "megahertz-xjack-56k", n_USRX2, 0, /* 3COM/USR/Megahertz 33.6 PC Card */
4314 "mi", n_MICROCOM, CM_INV|CM_ABR,
4315 "mic", n_MICROCOM, CM_INV|CM_ABR,
4316 "micr", n_MICROCOM, CM_INV|CM_ABR,
4317 "micro", n_MICROCOM, CM_INV|CM_ABR,
4318 "microc", n_MICROCOM, CM_INV|CM_ABR,
4319 "microco", n_MICROCOM, CM_INV|CM_ABR,
4320 "microcom", n_MICROCOM, CM_INV|CM_ABR,
4321 "microcom-at-mode", n_UCOM_AT, 0, /* Microcom DeskPorte, etc */
4322 "microcom-sx-mode", n_MICROCOM, 0, /* Microcom AX,QX,SX, native mode */
4323 "microlink", n_MICROLINK, 0,
4324 "microlink-v250", n_ULINKV250, 0,
4325 "motorola-codex", n_CODEX, 0,
4326 "motorola-fastalk", n_MOTOROLA, 0,
4327 "motorola-lifestyle",n_MOTOROLA, 0,
4328 "motorola-montana", n_MONTANA, 0,
4329 "motorola-sm56-v90",n_MOTSM56, 0,
4330 "mt5634zpx", n_MT5634ZPX, 0,
4331 "multitech", n_MULTI, 0,
4332 "mwave", n_MWAVE, 0,
4333 #endif /* MINIDIAL */
4337 "old-telebit", n_TELEBIT, 0,
4338 #endif /* OLDTBCODE */
4339 "pctel", n_PCTEL, 0,
4341 "penril", n_PENRIL, M_OLD,
4342 #endif /* OLDMODEMS */
4345 "racalvadic", n_RACAL, M_OLD,
4346 #endif /* OLDMODEMS */
4347 "rockwell-v32", n_RWV32, 0,
4348 "rockwell-v32bis", n_RWV32B, 0,
4349 "rockwell-v34", n_RWV34, 0,
4350 "rockwell-v90", n_RWV90, 0,
4351 "rolm", n_ROLM, CM_INV|CM_ABR,
4352 "rolm-244pc", n_ROLMAT, 0,
4353 "rolm-600-series", n_ROLMAT, 0,
4354 "rolm-dcm", n_ROLM, 0,
4355 "smartlink-v90", n_USR, M_ALIAS,
4356 "spirit-ii", n_SPIRITII, 0,
4357 "sportster", n_USR, M_ALIAS,
4358 "sup", n_SUPRA, CM_INV|CM_ABR,
4359 "supr", n_SUPRA, CM_INV|CM_ABR,
4360 "supra", n_SUPRA, CM_INV|CM_ABR,
4361 "supra-express-v90",n_SUPRAX, 0,
4362 "suprafaxmodem", n_SUPRA, 0,
4363 "suprasonic", n_SUPRASON, 0,
4366 #endif /* CK_TAPI */
4367 "te", n_TBNEW, CM_INV|CM_ABR,
4368 "tel", n_TBNEW, CM_INV|CM_ABR,
4369 "telebit", n_TBNEW, 0,
4370 "telepath", n_TELEPATH, CM_INV,
4371 #endif /* MINIDIAL */
4372 "unknown", n_UNKNOWN, 0,
4373 "user-defined", n_UDEF, 0,
4376 "usr", n_USR, CM_INV|CM_ABR,
4377 "usr-212a", n_HAYES, CM_INV|M_ALIAS,
4378 "usr-courier", n_USR, CM_INV,
4379 "usr-megahertz-56k", n_USRX2, 0,
4380 "usr-sportster", n_USR, CM_INV,
4381 "usr-xj1560-x2", n_USRX2, CM_INV,
4382 "usrobotics", n_USR, 0,
4384 "v25bis", n_CCITT, CM_INV, /* Name changed to ITU-T */
4386 "ventel", n_VENTEL, M_OLD,
4387 #endif /* OLDMODEMS */
4388 "zoltrix-v34", n_ZOLTRIX, 0,
4389 "zoltrix-hsp-v90", n_PCTEL, M_ALIAS,
4390 "zoltrix-hcf-v90", n_ITUTV250, 0,
4391 "zoo", n_ZOOM, CM_INV|CM_ABR,
4392 "zoom", n_ZOOM, CM_INV|CM_ABR,
4393 "zoom-v32bis", n_ZOOM, 0,
4394 "zoom-v34", n_ZOOMV34, 0,
4395 "zoom-v90", n_ZOOMV90, 0,
4396 "zoom-v92", n_ZOOMV92, 0,
4397 "zyxel", n_ZYXEL, 0,
4398 #endif /* MINIDIAL */
4401 int nmdm = (sizeof(mdmtab) / sizeof(struct keytab)) - 1; /* Number of modems */
4403 #define CONNECTED 1 /* For completion status */
4407 static int tries = 0;
4408 static int mdmecho = 0; /* Assume modem does not echo */
4410 static char *p; /* For command strings & messages */
4413 static char lbuf[LBUFL+4];
4414 char modemmsg[LBUFL+4] = { NUL, NUL }; /* DIAL response from modem */
4418 static char *rbuf = NULL;
4421 static char rbuf[RBUFL+1];
4422 #endif /* DYNAMIC */
4425 #define FULLNUML 256
4426 char *fbuf = NULL; /* For full (prefixed) phone number */
4428 #define FULLNUML 100
4429 char fbuf[FULLNUML];
4430 #endif /* DYNAMIC */
4432 static ckjmpbuf sjbuf;
4435 static SIGTYP (*savalrm)(int); /* For saving alarm handler */
4436 static SIGTYP (*savint)(int); /* For saving interrupt handler */
4438 static SIGTYP (*savalrm)(); /* For saving alarm handler */
4439 static SIGTYP (*savint)(); /* For saving interrupt handler */
4440 #endif /* CK_ANSIC */
4444 dologdial(s) char *s; {
4448 extern char cxlogbuf[], uidbuf[], myhost[];
4451 if ((x = strlen(s)) > 0) { /* Replace spaces by underscores */
4452 r = (char *)malloc(x+1);
4455 for (i = 0; i <= x; i++) {
4456 if (s[i] != 0 && s[i] <= SP)
4465 n = ckstrncpy(cxlogbuf,p,CXLOGBUFL);
4467 debug(F100,"dologdial uidbuf empty","",0);
4468 ckstrncpy(uidbuf,(char *)whoami(),UIDBUFLEN);
4470 m = strlen(uidbuf)+strlen(myhost)+strlen(ttname)+strlen(s)+strlen(buf2)+32;
4471 if (n+m < CXLOGBUFL-1) {
4473 if (diallcc && diallac) {
4475 ckmakmsg(&buf2[1],15,diallcc,"(",diallac,")");
4477 ckstrncpy(buf2,"Unknown",16);
4479 sprintf(p," %s %s T=DIAL H=%s D=%s N=%s O=%s ", /* safe (prechecked) */
4487 debug(F110,"dologdial cxlogbuf",cxlogbuf,0);
4489 sprintf(p,"LOGDIAL BUFFER OVERFLOW");
4492 #endif /* CKLOGDIAL */
4498 xcpy(to,from,len) /* Copy the given number of bytes */
4499 register char *to, *from;
4500 register unsigned int len; {
4501 while (len--) *to++ = *from++;
4503 #endif /* COMMENT */
4504 #endif /* MINIDIAL */
4508 dialtime(int foo) /* Timer interrupt handler */
4510 dialtime(foo) int foo; /* Timer interrupt handler */
4511 #endif /* CK_ANSIC */
4514 fail_code = F_TIME; /* Failure reason = timeout */
4515 debug(F100,"dialtime caught SIGALRM","",0);
4519 #endif /* BE_DR_7 */
4522 signal(SIGALRM, dialtime);
4525 signal(SIGALRM, SIG_ACK); /* Needed for OS/2 */
4526 #endif /* __EMX__ */
4528 #ifdef OSK /* OS-9 */
4530 We are in an intercept routine but do not perform a F$RTE (done implicitly
4531 by RTS), so we have to decrement the sigmask as F$RTE does. Warning:
4532 longjump only restores the CPU registers, NOT the FPU registers. So, don't
4533 use FPU at all or at least don't use common FPU (double or float) register
4546 cklongjmp(ckjaddr(sjbuf),1);
4557 dialint(int foo) /* Keyboard interrupt handler */
4559 dialint(foo) int foo;
4560 #endif /* CK_ANSIC */
4563 debug(F100,"dialint caught SIGINT","",0);
4565 signal(SIGINT, dialint);
4566 debug(F100,"dialint() SIGINT caught -- dialint restored","",0) ;
4569 signal(SIGINT, SIG_ACK); /* Needed for OS/2 */
4570 #endif /* __EMX__ */
4571 #ifdef OSK /* OS-9, see comment in dialtime() */
4577 PostTAPIConnectSem();
4578 PostTAPIAnswerSem();
4579 #endif /* CK_TAPI */
4582 cklongjmp(ckjaddr(sjbuf),1);
4591 Routine to read a character from communication device, handling TELNET
4592 protocol negotiations in case we're connected to the modem through a
4593 TCP/IP TELNET modem server.
4600 debug(F101,"ddinc entry n","",n);
4603 /* debug(F000,"ddinc","",c); */
4604 if (c < 0) return(c);
4606 if ((c == IAC) && network && IS_TELNET()) {
4607 switch (tn_doop((CHAR)(c & 0xff),duplex,ttinc)) {
4608 case 2: duplex = 0; continue;
4614 done = !(c == IAC && network && IS_TELNET());
4615 scriptwrtbuf(c); /* TELNET negotiations handled by emulator */
4625 ttslow(s,millisec) char *s; int millisec; { /* Output s-l-o-w-l-y */
4627 extern int tn_nlm, tn_b_nlm;
4628 #endif /* TCPSOCKET */
4629 debug(F111,"ttslow",s,millisec);
4630 if (dialdpy && (duplex || !mdmecho)) { /* Echo the command in case modem */
4631 printf("%s\n",s); /* isn't echoing commands. */
4634 char *s2 = s; /* Echo to emulator */
4636 scriptwrtbuf((USHORT)*s2++);
4638 scriptwrtbuf((USHORT)CR);
4639 scriptwrtbuf((USHORT)LF);
4646 if (*s == CR && network && IS_TELNET()) {
4647 if (!TELOPT_ME(TELOPT_BINARY) && tn_nlm != TNL_CR)
4648 ttoc((char)((tn_nlm == TNL_CRLF) ? LF : NUL));
4649 else if (TELOPT_ME(TELOPT_BINARY) &&
4650 (tn_b_nlm == TNL_CRLF || tn_b_nlm == TNL_CRNUL))
4651 ttoc((char)((tn_b_nlm == TNL_CRLF) ? LF : NUL));
4653 #endif /* TCPSOCKET */
4660 * Wait for a string of characters.
4662 * The characters are waited for individually, and other characters may
4663 * be received "in between". This merely guarantees that the characters
4664 * ARE received, and in the order specified.
4667 waitfor(s) char *s; {
4669 while ((c = *s++)) { /* while more characters remain... */
4670 do { /* wait for the character */
4671 x = (CHAR) (ddinc(0) & 0177);
4672 debug(F000,"dial waitfor got","",x);
4674 if (x != LF) conoc(x);
4675 if (x == CR) conoc(LF);
4682 didweget(s,r) char *s, *r; { /* Looks in string s for response r */
4683 int lr = (int)strlen(r); /* 0 means not found, 1 means found it */
4685 debug(F110,"didweget",r,0);
4686 debug(F110," in",s,0);
4687 for (i = (int)strlen(s)-lr; i >= 0; i--)
4688 if ( s[i] == r[0] ) if ( !strncmp(s+i,r,lr) ) return( 1 );
4693 /* R E S E T -- Reset alarms, etc. on exit. */
4697 debug(F100,"dreset resetting alarm and signal handlers","",0);
4699 signal(SIGALRM,savalrm); /* restore alarm handler */
4700 signal(SIGINT,savint); /* restore interrupt handler */
4701 debug(F100,"dreset alarm and signal handlers reset","",0);
4705 Call this routine when the modem reports that it has connected at a certain
4706 speed, giving that speed as the argument. If the connection speed is not
4707 the same as Kermit's current communication speed, AND the modem interface
4708 speed is not locked (i.e. DIAL SPEED-MATCHING is not ON), then change the
4709 device speed to the one given.
4716 #endif /* CK_ANSIC */
4719 if (!mdmspd) /* If modem interface speed locked, */
4720 return; /* don't do this. */
4721 if (speed != s) { /* Speeds differ? */
4722 s2 = s / 10L; /* Convert to cps expressed as int */
4723 if (ttsspd(s2) < 0) { /* Change speed. */
4724 printf(" WARNING - speed change to %ld failed.\r\n",s);
4726 printf(" Speed changed to %ld.\r\n",s);
4727 speed = s; /* Update global speed variable */
4733 Display all characters received from modem dialer through this routine,
4734 for consistent handling of carriage returns and linefeeds.
4741 #endif /* CK_ANSIC */
4742 { /* dialoc */ /* Dial Output Character */
4744 if (c != LF) conoc(c); /* Don't echo LF */
4745 if (c == CR) conoc(LF); /* Echo CR as CRLF */
4751 getdm(x) int x; { /* Return dial modifier */
4764 #endif /* MINIDIAL */
4766 ishayes = (dialcapas ? dialcapas : mp->capas) & CKD_AT;
4769 return(ishayes ? "," : "");
4774 return(m == n_USR ? "/" : "");
4775 #endif /* MINIDIAL */
4777 return(ishayes ? "P" : "");
4779 return(ishayes ? "T" : "");
4781 return(ishayes ? "@" : "");
4783 return(ishayes ? "W" : "");
4785 return(ishayes ? ";" : "");
4787 return(ishayes ? "!" : "");
4789 return(ishayes ? "$" : "");
4797 if (dialmauto && diallcc) { /* If DIAL METHOD AUTO... */
4798 int i; /* and we know our area code... */
4799 for (i = 0; i < ndialtocc; i++) { /* First check Tone countries list */
4800 if (!strcmp(dialtocc[i],diallcc)) {
4805 for (i = 0; i < ndialpucc; i++) { /* Then Pulse countries list */
4806 if (!strcmp(dialpucc[i],diallcc)) {
4814 VOID /* Get dialing defaults from environment */
4819 makestr(&p,getenv("K_DIAL_DIRECTORY"));
4822 xwords(p,(MAXDDIR - 2),dialdir,0);
4823 for (i = 0; i < (MAXDDIR - 1); i++) {
4827 dialdir[i] = dialdir[i+1];
4831 xmakestr(&diallcc,getenv("K_COUNTRYCODE")); /* My country code */
4832 xmakestr(&dialixp,getenv("K_LD_PREFIX")); /* My long-distance prefix */
4833 xmakestr(&dialldp,getenv("K_INTL_PREFIX")); /* My international prefix */
4834 xmakestr(&dialldp,getenv("K_TF_PREFIX")); /* Ny Toll-free prefix */
4837 p = getenv("K_DIAL_METHOD"); /* Local dial method */
4839 extern struct keytab dial_m[];
4841 i = lookup(dial_m,p,ndial_m,&x);
4855 xmakestr(&p,getenv("K_TF_AREACODE")); /* Toll-free areacodes */
4858 xwords(p,7,dialtfc,0);
4859 for (i = 0; i < 8; i++) {
4863 dialtfc[i] = dialtfc[i+1];
4868 for (i = 0; i < MAXTPCC; i++) { /* Clear Tone/Pulse country lists */
4872 for (i = 0; i < MAXTPCC; i++) { /* Init Tone country list */
4874 makestr(&(dialtocc[i]),tonecc[i]);
4879 for (i = 0; i < MAXTPCC; i++) { /* Init Pulse country list */
4881 makestr(&(dialpucc[i]),pulsecc[i]);
4887 if (diallcc) { /* Have country code */
4888 if (!strcmp(diallcc,"1")) { /* If it's 1 */
4889 if (!dialldp) /* Set these prefixes... */
4890 makestr(&dialldp,"1");
4892 makestr(&dialtfp,"1");
4894 makestr(&dialixp,"011");
4895 if (ntollfree == 0) { /* Toll-free area codes */
4896 if ((dialtfc[0] = malloc(4))) {
4897 ckstrncpy(dialtfc[0],"800",4); /* 1970-something */
4899 if ((dialtfc[1] = malloc(4))) {
4900 ckstrncpy(dialtfc[1],"888",4); /* 1996 */
4902 if ((dialtfc[2] = malloc(4))) {
4903 ckstrncpy(dialtfc[2],"877",4); /* 5 April 1998 */
4905 if ((dialtfc[3] = malloc(4))) {
4906 ckstrncpy(dialtfc[3],"866",4); /* 2000? */
4913 } else if (!strcmp(diallcc,"358") &&
4914 ((int) strcmp(zzndate(),"19961011") > 0)
4916 if (!dialldp) /* Long-distance prefix */
4917 makestr(&dialldp,"9");
4918 if (!dialixp) /* International dialing prefix */
4919 makestr(&dialixp,"990");
4920 } else { /* Not NANP or Finland */
4922 makestr(&dialldp,"0");
4924 makestr(&dialixp,"00");
4927 xmakestr(&diallac,getenv("K_AREACODE"));
4928 xmakestr(&dialpxo,getenv("K_PBX_OCP"));
4929 xmakestr(&dialpxi,getenv("K_PBX_ICP"));
4930 p = getenv("K_PBX_XCH");
4932 xmakestr(&dialpxx,p);
4936 char * pp[MAXPBXEXCH+2];
4937 makestr(&s,p); /* Make a copy for poking */
4939 xwords(s,MAXPBXEXCH+1,pp,0); /* Note: pp[] is 1-based. */
4940 for (i = 0; i <= MAXPBXEXCH; i++) {
4941 if (!pp[i+1]) break;
4942 makestr(&(dialpxx[i]),pp[i+1]);
4945 makestr(&s,NULL); /* Free poked copy */
4948 #endif /* COMMENT */
4952 dialfail(x) int x; {
4956 debug(F101,"ckudial dialfail","",x);
4957 dreset(); /* Reset alarm and signal handlers */
4959 printf("%s Failure: ", func_code == 0 ? "DIAL" : "ANSWER");
4960 if (dialdpy) { /* If showing progress */
4961 debug(F100,"dial display is on","",0);
4962 p = ck_time(); /* get current time; */
4963 if (*p) printf("%s: ",p);
4965 switch (fail_code) { /* Type of failure */
4966 case F_TIME: /* Timeout */
4967 if (dial_what == DW_INIT)
4968 printf ("Timed out while trying to initialize modem.\n");
4969 else if (dial_what == DW_DIAL)
4970 printf ("%s interval expired.\n",
4971 func_code == 0 ? "DIAL TIMEOUT" : "ANSWER timeout");
4973 printf("Timeout.\n");
4975 if (mdmcapas & CKD_AT)
4976 ttoc('\015'); /* Send CR to interrupt dialing */
4977 /* Some Hayes modems don't fail with BUSY on busy lines */
4979 debug(F110,"dial","timeout",0);
4982 case F_INT: /* Dialing interrupted */
4983 printf ("Interrupted.\n");
4988 debug(F111,"dial","interrupted",mdmcapas & CKD_AT);
4989 if (mdmcapas & CKD_AT)
4990 ttoc('\015'); /* Send CR to interrupt dialing */
4994 case F_MODEM: /* Modem detected a failure */
4995 debug(F111,"dialfail()","lbuf",lbuf);
4996 if (lbuf && *lbuf) {
4998 for (s = lbuf; *s; s++)
5000 putchar(*s); /* Display printable reason */
5002 } else printf(func_code == 0 ?
5003 " Call not completed." :
5004 " Call did not come in."
5007 debug(F110,"dial",lbuf,0);
5008 if (dialsta < 0) dialsta = DIA_UNSP;
5011 case F_MINIT: /* Failure to initialize modem */
5012 printf ("Error initializing modem.\n");
5013 debug(F110,"dial","modem init",0);
5018 printf("unknown\n");
5019 debug(F110,"dial","unknown",0);
5021 if (mdmcapas & CKD_AT)
5022 ttoc('\015'); /* Send CR to interrupt dialing */
5027 if (rbuf) free(rbuf); rbuf = NULL;
5028 if (fbuf) free(fbuf); fbuf = NULL;
5029 #endif /* DYNAMIC */
5031 if (dialsta < 0) dialsta = DIA_UERR; /* Set failure code */
5032 return(0); /* Return zero (important) */
5035 /* C K D I A L -- Dial up the remote system */
5037 /* Returns 1 if call completed, 0 otherwise */
5039 static int mdmwait, mdmstat = 0;
5042 #endif /* CK_TAPI */
5044 int mdmwaitd = 10 ; /* dialtmo / mdmwait difference */
5046 static char *telnbr;
5048 static int wr = 0; /* wr = wake rate */
5049 static char * ws; /* ws = wake string */
5050 static char * xnum = NULL;
5051 static int inited = 0;
5055 _dodial(void * threadinfo)
5056 #else /* CK_ANSIC */
5057 _dodial(threadinfo) VOID * threadinfo;
5058 #endif /* CK_ANSIC */
5061 char *dcmd, *s, *flocmd = NULL;
5062 int x = 0, n = F_TIME;
5065 signal( SIGINT, dialint );
5066 if (threadinfo) { /* Thread local storage... */
5067 TlsSetValue(TlsIndex,threadinfo);
5071 dcmd = dialcmd ? dialcmd : mp->dial_str;
5072 if ((int)strlen(dcmd) + (int)strlen(telnbr) > (LBUFL - 2)) {
5073 printf("DIAL command + phone number too long!\n");
5076 if (rbuf) free(rbuf); rbuf = NULL;
5077 if (fbuf) free(fbuf); fbuf = NULL;
5078 #endif /* DYNAMIC */
5080 ckThreadEnd(threadinfo);
5082 SIGRETURN; /* No conversation with modem to complete dialing */
5084 makestr(&xnum,telnbr);
5086 getdialmth(); /* Get dial method */
5089 /* Combine the SET DIAL METHOD command with the DIAL command string */
5090 if (!dialcmd && /* Using default DIAL command */
5091 (mdmcapas & CKD_AT) && /* AT command set only */
5092 ((dialmth == XYDM_T && !dialtone) || /* and using default */
5093 (dialmth == XYDM_P && !dialpulse))) { /* modem commands... */
5095 debug(F110,"dial atdt xnum 1",xnum,0);
5097 debug(F110,"dial atdt s",s,0);
5098 if (*telnbr != 'T' &&
5102 !ckstrcmp(s,"atd",3,0) &&
5108 c = (dialmth == XYDM_T) ? 'T' : 'P';
5111 if ((int)strlen(telnbr) < 199) {
5112 sprintf(xbuf,"%c%s",c,telnbr);
5113 makestr(&xnum,xbuf);
5117 #endif /* CK_ATDT */
5118 debug(F111,"_dodial",xnum,xredial);
5120 /* Hang up the modem (in case it wasn't "on hook") */
5121 /* But only if SET DIAL HANGUP ON... */
5123 if (!xredial) { /* Modem not initalized yet. */
5126 if (!xredial || !inited) {
5127 if (dialhup() < 0) { /* Hangup first */
5128 debug(F100,"_dodial dialhup failed","",0);
5130 if (mdmcapas & CKD_TB) /* Telebits might need a BREAK */
5131 ttsndb(); /* first. */
5132 #endif /* MINIDIAL */
5133 if (dialhng && dialsta != DIA_PART) { /* If hangup failed, */
5134 ttclos(0); /* close and reopen the device. */
5135 if (ttopen(ttname,&local,mymdmtyp,0) < 0) {
5136 printf("Sorry, Can't hang up communication device.\n");
5137 printf("Try 'set line %s' again.\n",ttname);
5140 if (rbuf) free(rbuf); rbuf = NULL;
5141 if (fbuf) free(fbuf); fbuf = NULL;
5142 #endif /* DYNAMIC */
5145 ckThreadEnd(threadinfo);
5151 inited = 0; /* We hung up so must reinit */
5154 /* Don't start talking to Rolm too soon */
5155 if (mymdmtyp == n_ROLM && dialsta != DIA_PART)
5157 #endif /* MINIDIAL */
5159 if (dialsta != DIA_PART /* Some initial setups. */
5161 && mymdmtyp != n_ATTUPC
5162 #endif /* MINIDIAL */
5164 fail_code = F_MINIT; /* Default failure code */
5165 dial_what = DW_INIT; /* What I'm Doing Now */
5166 if (dialdpy) { /* If showing progress, */
5167 p = ck_time(); /* get timestamp. */
5170 printf(" Initializing: %s...\n",p);
5175 if (mymdmtyp == n_ATTUPC) {
5177 For ATT7300/Unix PC's with their special internal modem. Whole dialing
5178 process is handled right here, an exception to the normal structure.
5179 Timeout and user interrupts are enabled during dialing. attdial() is in
5180 file ckutio.c. - jrd
5182 _PROTOTYP( int attdial, (char *, long, char *) );
5183 fail_code = F_MODEM; /* Default failure code */
5184 dial_what = DW_DIAL;
5185 if (dialdpy) { /* If showing progress */
5186 p = ck_time(); /* get current time; */
5188 printf(" Dialing: %s...\n",p);
5190 alarm(waitct); /* Set alarm */
5191 if (attdial(ttname,speed,telnbr)) { /* dial internal modem */
5192 dreset(); /* reset alarms, etc. */
5193 printf(" Call failed.\r\n");
5194 dialhup(); /* Hangup the call */
5196 if (rbuf) free(rbuf); rbuf = NULL;
5197 if (fbuf) free(fbuf); fbuf = NULL;
5198 #endif /* DYNAMIC */
5201 ckThreadEnd(threadinfo);
5203 SIGRETURN; /* return failure */
5205 dreset(); /* reset alarms, etc. */
5206 ttpkt(speed,FLO_DIAX,parity); /* cancel dialing ioctl */
5207 if (!quiet && !backgrd) {
5210 printf(" Call complete.\r\n");
5211 } else if (modemmsg[0])
5212 printf(" Call complete: \"%s\".\r\n",(char *)modemmsg);
5214 printf(" Call complete.\r\n");
5218 #endif /* CKLOGDIAL */
5222 if (rbuf) free(rbuf); rbuf = NULL;
5223 if (fbuf) free(fbuf); fbuf = NULL;
5224 #endif /* DYNAMIC */
5226 ckThreadEnd(threadinfo);
5228 SIGRETURN; /* No conversation with modem to complete dialing */
5230 #endif /* ATT7300 */
5232 if (tttapi && !tapipass) { /* TAPI Dialing */
5233 switch (func_code) {
5235 if (cktapidial(telnbr)) {
5244 if (dialsta == DIA_PART)
5247 fail_code = F_MODEM;
5251 case 1: { /* Answer */
5252 long strttime = time((long *)NULL);
5260 if (cktapianswer()) { /* SUCCESS */
5264 } else { /* FAILURE */
5269 fail_code = F_MODEM;
5274 diff = time((long *)NULL) - strttime;
5276 } while ((dialatmo > 0) ? (diff < waitct) : 1);
5281 ckThreadEnd(threadinfo);
5285 #endif /* CK_TAPI */
5286 #endif /* MINIDIAL */
5288 /* Modems with AT command set... */
5290 if ((mdmcapas & CKD_AT) && dialsta != DIA_PART) {
5292 if (dialpace > -1) /* Set intercharacter pacing */
5297 if (dialini) /* Get wakeup/init string */
5302 if (!ws) ws = "\015"; /* If none, use CR */
5303 #endif /* COMMENT */
5305 /* First get the modem's attention and enable result codes */
5307 for (tries = 0; tries < 5; tries++) { /* Send short command */
5309 ttoc('\015'); /* AT must go first for speed */
5310 msleep(wr); /* detection. */
5312 if (mymdmtyp == n_GENERIC) /* Force word result codes */
5313 ttslow("ATQ0V1\015",wr); /* for generic modem type */
5315 ttslow("ATQ0\015",wr);
5316 mdmstat = getok(tries < 2 ? 2 : tries, 1); /* Get response */
5317 if (mdmstat > 0) break; /* OK - done */
5318 if (dialdpy && tries > 0) {
5319 printf("\r\n No response from modem");
5324 if (rbuf) free(rbuf); rbuf = NULL;
5325 if (fbuf) free(fbuf); fbuf = NULL;
5326 #endif /* DYNAMIC */
5328 ckThreadEnd(threadinfo);
5330 SIGRETURN; /* return failure */
5332 printf(", retrying%s...\r\n",
5333 (tries > 1) ? " again" : "");
5338 case 0: msleep(100); break;
5339 case 1: ttsndb(); break;
5355 debug(F101,"_dodial ATQ0 mdmstat","",mdmstat);
5357 if (xredial && inited) { /* Redialing... */
5358 ttoc('\015'); /* Cancel previous */
5359 msleep(250); /* Wait a bit */
5361 /* This wasn't the problem... */
5362 ttflui(); /* Clear out stuff from modem setup */
5363 ttslow("ATS7=60\015",wr); /* Redo carrier wait */
5364 getok(4,1); /* Get response */
5365 #endif /* COMMENT */
5366 alarm(0); /* Just in case... */
5367 ttflui(); /* Clear out stuff from modem setup */
5368 goto REDIAL; /* Skip setup - we already did it */
5371 Do flow control next because a long init string echoing back could
5372 cause data overruns, causing us to miss the OK, or (worse) to get out
5375 x = 0; /* User said SET DIAL FLOW RTS/CTS */
5376 if (dialfc == FLO_RTSC || /* Even if Kermit's FLOW isn't... */
5377 (dialfc == FLO_AUTO && flow == FLO_RTSC)) {
5378 if (dialhwfc) { /* User-defined HWFC string */
5383 } else if ((mdmcapas & CKD_HW) && *(mp->hwfc_str)) {
5385 flocmd = mp->hwfc_str;
5387 } else if (dialfc == FLO_XONX || /* User said SET DIAL FLOW SOFT */
5388 (dialfc == FLO_AUTO && flow == FLO_XONX)) {
5394 } else if ((mdmcapas & CKD_SW) && *(mp->swfc_str)) {
5396 flocmd = mp->swfc_str;
5398 } else if (dialfc == FLO_NONE) { /* User said SET DIAL FLOW NONE */
5404 } else if (mp->nofc_str && *(mp->nofc_str)) {
5406 flocmd = mp->nofc_str;
5409 if (x) { /* Send the flow control command */
5410 debug(F110,"_dodial flocmd",flocmd,0);
5411 for (tries = 4; tries > 0; tries--) { /* Send the command */
5413 mdmstat = getok(5,1);
5414 if (mdmstat > 0) break;
5415 if (dialdpy && tries > 1)
5416 printf(" No response from modem, retrying%s...\n",
5417 (tries < 4) ? " again" : "");
5423 So far only ckutio.c has ttsetflow().
5424 We have just told the modem to turn on RTS/CTS flow control and the modem
5425 has said OK. But we ourselves have not turned it on yet because of the
5426 disgusting ttpkt(...FLO_DIAL...) hack. So now, if the computer does not
5427 happen to be asserting RTS, the modem will no longer send characters to it.
5428 So at EXACTLY THIS POINT, we must enable RTS/CTS in the device driver.
5430 if (dialfc == FLO_RTSC ||
5431 (dialfc == FLO_AUTO && flow == FLO_RTSC)) {
5432 ttsetflow(FLO_RTSC);
5434 #endif /* CK_RTSCTS */
5435 #endif /* CK_TTSETFLOW */
5437 ttflui(); /* Clear out stuff from modem setup */
5440 if (!ws) goto xdialec; /* No init string */
5441 if (!*ws) goto xdialec;
5443 for (tries = 4; tries > 0; tries--) { /* Send init string */
5445 mdmstat = getok(4,1); /* Get response */
5446 if (mdmstat > 0) break;
5447 if (dialdpy && tries > 1)
5448 printf(" No response from modem, retrying%s...\n",
5449 (tries < 4) ? " again" : "");
5451 debug(F101,"_dodial wake_str mdmstat","",mdmstat);
5453 if (mdmstat < 1) { /* Initialized OK? */
5454 dialfail(F_MINIT); /* No, fail. */
5456 ckThreadEnd(threadinfo);
5462 } else if (mymdmtyp == n_ATTDTDM && dialsta != DIA_PART) { /* AT&T ... */
5463 ttsndb(); /* Send BREAK */
5464 #endif /* MINIDIAL */
5466 } else if (dialsta != DIA_PART) { /* All others */
5468 /* Place modem into command mode */
5470 ws = dialini ? dialini : mp->wake_str;
5471 if (ws && (int)strlen(ws) > 0) {
5472 debug(F111,"_dodial default, wake string", ws, wr);
5474 } else debug(F100,"_dodial no wake_str","",0);
5475 if (mp->wake_prompt && (int)strlen(mp->wake_prompt) > 0) {
5476 debug(F110,"_dodial default, waiting for wake_prompt",
5479 waitfor(mp->wake_prompt);
5481 } else debug(F100,"_dodial no wake_prompt","",0);
5484 /* Handle error correction, data compression, and flow control... */
5488 if (dialsta != DIA_PART) {
5489 alarm(0); /* Turn off alarm */
5490 debug(F100,"_dodial got wake prompt","",0);
5491 msleep(500); /* Allow settling time */
5493 /* Enable/disable error-correction */
5496 if (dialec) { /* DIAL ERROR-CORRECTION is ON */
5497 if (dialecon) { /* SET DIAL STRING ERROR-CORRECTION */
5500 ttslow(dialecon, wr);
5502 } else if ((mdmcapas & CKD_EC) && *(mp->ec_on_str)) {
5504 ttslow(mp->ec_on_str, wr);
5508 "WARNING - I don't know how to turn on EC for this modem\n"
5510 #endif /* COMMENT */
5512 if (dialecoff) { /* DIAL ERROR-CORRECTION OFF */
5515 ttslow(dialecoff, wr);
5517 } else if ((mdmcapas & CKD_EC) && *(mp->ec_off_str)) {
5519 ttslow(mp->ec_off_str, wr);
5523 "WARNING - I don't know how to turn off EC for this modem\n"
5525 #endif /* COMMENT */
5527 /* debug(F101,"ckudia xx_ok","",xx_ok); */
5528 if (x && xx_ok) { /* Look for OK response */
5529 debug(F100,"ckudia calling xx_ok for EC","",0);
5531 debug(F101,"ckudia xx_ok","",x);
5533 printf("WARNING - Trouble enabling error-correction.\n");
5535 " Likely cause: Your modem is an RPI model, which does not have built-in\n");
5536 printf(" error correction and data compression.");
5540 /* Enable/disable data compression */
5544 if (x < 0 || !dialec) {
5546 "WARNING - You can't have compression without error correction.\n");
5547 } else if (dialdcon) { /* SET DIAL STRING ... */
5550 ttslow(dialdcon, wr);
5552 } else if ((mdmcapas & CKD_DC) && *(mp->dc_on_str)) {
5554 ttslow(mp->dc_on_str, wr);
5558 "WARNING - I don't know how to turn on DC for this modem\n"
5560 #endif /* COMMENT */
5565 ttslow(dialdcoff, wr);
5567 } else if ((mdmcapas & CKD_DC) && *(mp->dc_off_str)) {
5569 ttslow(mp->dc_off_str, wr);
5573 "WARNING - I don't know how to turn off compression for this modem\n"
5575 #endif /* COMMENT */
5577 if (x && xx_ok) { /* Look for OK response */
5579 if (x < 0) printf("WARNING - Trouble enabling compression\n");
5585 if (mdmcapas & CKD_KS && dialsta != DIA_PART) { /* Kermit spoof */
5586 int r; /* Register */
5587 char tbcmdbuf[64]; /* Command buffer */
5590 case n_MICROCOM: /* Microcoms in SX mode */
5592 sprintf(tbcmdbuf,"APM1;KMC%d\015",stchr); /* safe */
5594 sprintf(tbcmdbuf,"APM0\015"); /* safe */
5595 ttslow(tbcmdbuf, MICROCOM.wake_rate);
5597 waitfor(mp->wake_prompt);
5601 case n_TELEBIT: /* Old and new Telebits */
5604 sprintf(tbcmdbuf,"ATS111=0\015"); /* safe */
5606 switch (parity) { /* S111 value depends on parity */
5607 case 'e': r = 12; break;
5608 case 'm': r = 13; break;
5609 case 'o': r = 11; break;
5610 case 's': r = 14; break;
5612 default: r = 10; break;
5614 sprintf(tbcmdbuf,"ATS111=%d S112=%d\015",r,stchr); /* safe */
5616 ttslow(tbcmdbuf, wr);
5618 /* Not all Telebit models have the Kermit spoof, so ignore response. */
5620 if (xx_ok) { /* Get modem's response */
5625 #endif /* MINIDIAL */
5630 if (mymdmtyp != n_GENERIC &&
5631 (mdmcapas & CKD_AT) && (dialsta != DIA_PART) &&
5632 !dialspon && !dialspoff &&
5633 !dialvol1 && !dialvol2 &&!dialvol3) {
5634 /* AT command set and commands have not been customized */
5635 /* so combine speaker and volume commands. */
5637 sprintf(lbuf,"ATM1L%d%c",mdmvol,13); /* safe */
5639 sprintf(lbuf,"ATM0%c",13); /* safe */
5640 ttslow(lbuf,wr); /* Send command */
5641 getok(5,1); /* Get but ignore response */
5642 } else if (dialsta != DIA_PART) { /* Customized or not AT commands */
5643 x = 0; /* Do it the hard way */
5648 ttslow(dialspon,wr);
5651 if (mp->sp_on_str[0]) {
5653 ttslow(mp->sp_on_str,wr);
5657 /* s = dialspoff ? dialspoff : mp->sp_off_str; */
5661 ttslow(dialspoff,wr);
5664 if (mp->sp_off_str[0]) {
5666 ttslow(mp->sp_off_str,wr);
5671 if (xx_ok) /* Get response */
5673 if (x && mdmspk) { /* Good response and speaker on? */
5674 switch (mdmvol) { /* Yes, send volume command. */
5677 s = dialvol1 ? dialvol1 : mp->vol1_str; break;
5679 s = dialvol2 ? dialvol2 : mp->vol2_str; break;
5681 s = dialvol3 ? dialvol3 : mp->vol3_str; break;
5685 if (s) if (*s) { /* Send volume command. */
5687 if (xx_ok) /* Get response but ignore it */
5695 /* Dialing Method */
5697 if (dialmth && dialsta != DIA_PART) { /* If dialing method specified... */
5698 char *s = ""; /* Do it here... */
5700 if (dialmth == XYDM_T && dialtone) /* Tone */
5702 else if (dialmth == XYDM_P && dialpulse) /* Pulse */
5706 if (xx_ok) /* Get modem's response */
5707 (*xx_ok)(5,1); /* (but ignore it...) */
5710 #endif /* CK_ATDT */
5712 if (dialidt) { /* Ignore dialtone? */
5714 s = dialx3 ? dialx3 : mp->ignoredt;
5717 if (xx_ok) /* Get modem's response */
5718 (*xx_ok)(5,1); /* (but ignore it...) */
5722 char *s = ""; /* Last-minute init string? */
5723 s = dialini2 ? dialini2 : mp->ini2;
5726 if (xx_ok) /* Get modem's response */
5727 (*xx_ok)(5,1); /* (but ignore it...) */
5730 if (func_code == 1) { /* ANSWER (not DIAL) */
5732 s = dialaaon ? dialaaon : mp->aa_on_str;
5735 /* Here we would handle caller ID */
5736 ttslow(s, (dialpace > -1) ? wr : mp->dial_rate);
5737 if (xx_ok) /* Get modem's response */
5738 (*xx_ok)(5,1); /* (but ignore it...) */
5741 "WARNING - I don't know how to enable autoanswer for this modem.\n"
5743 } /* And skip all the phone-number & dialing stuff... */
5744 alarm(waitct); /* This much time allowed. */
5745 debug(F101,"_dodial ANSWER waitct","",waitct);
5747 } else { /* DIAL (not ANSWER) */
5749 if (dialsta != DIA_PART) { /* Last dial was not partial */
5753 s = dialaaoff ? dialaaoff : mp->aa_off_str;
5754 #endif /* COMMENT */
5756 ttslow(s, (dialpace > -1) ? wr : mp->dial_rate);
5757 if (xx_ok) /* Get modem's response */
5758 (*xx_ok)(5,1); /* (but ignore it...) */
5761 /* Put modem into dialing mode, if the modem requires it. */
5763 if (mp->dmode_str && *(mp->dmode_str)) {
5764 ttslow(mp->dmode_str, (dialpace > -1) ? wr : mp->dial_rate);
5765 savalrm = signal(SIGALRM,dialtime);
5767 /* Wait for prompt, if any expected */
5768 if (mp->dmode_prompt && *(mp->dmode_prompt)) {
5769 waitfor(mp->dmode_prompt);
5772 alarm(0); /* Turn off alarm on dialing prompts */
5773 signal(SIGALRM,savalrm); /* Restore alarm */
5776 /* AT-Command-Set non-Generic modem */
5777 if (mdmcapas & CKD_AT && mymdmtyp != n_GENERIC &&
5778 dialsta != DIA_PART) {
5779 if (mdmwait > 255) /* If larger than maximum, */
5780 mdmwait = 255; /* make it maximum. */
5781 if (dialesc > 0 && /* Modem escape character is set */
5782 dialmhu > 0) { /* Hangup method is modem command */
5784 if (dialesc < 0 || dialesc > 127)
5788 dialesc ? x : mp->esc_char, mdmwait); /* safe */
5790 sprintf(lbuf,"ATS7=%d%c",mdmwait,13); /* safe */
5791 ttslow(lbuf,wr); /* Set it. */
5792 mdmstat = getok(5,1); /* Get response from modem */
5793 /* If it gets an error, go ahead anyway */
5794 debug(F101,"_dodial S7 mdmstat","",mdmstat);
5796 ttflui(); /* Clear out stuff from modem setup */
5797 inited = 1; /* Remember modem is initialized */
5800 if ((int)strlen(dcmd) + (int)strlen(xnum) > LBUFL)
5801 ckstrncpy(lbuf,"NUMBER TOO LONG!",LBUFL);
5803 sprintf(lbuf, dcmd, xnum); /* safe (prechecked) */
5804 debug(F110,"dialing",lbuf,0);
5805 /* Send the dialing string */
5806 ttslow(lbuf,dialpace > -1 ? wr : mp->dial_rate);
5808 fail_code = F_MODEM; /* New default failure code changes */
5809 dial_what = DW_DIAL; /* and our state, too. */
5810 if (dialdpy) { /* If showing progress */
5811 p = ck_time(); /* get current time; */
5812 if (*p) printf(" Dialing: %s...\n",p);
5818 alarm(waitct); /* This much time allowed. */
5819 debug(F101,"_dodial waitct","",waitct);
5824 case n_RACAL: /* Acknowledge dialing string */
5830 waitfor("\012\012"); /* Ignore the first two strings */
5835 #endif /* OLDMODEMS */
5836 #endif /* MINIDIAL */
5839 /* Check for connection */
5841 mdmstat = 0; /* No status yet */
5842 lbuf[0] = NUL; /* Default reason for failure */
5843 debug(F101,"dial awaiting response, mymdmtyp","",mymdmtyp);
5848 while (mdmstat == 0) { /* Till we get a result or time out */
5850 if ((mdmcapas & CKD_AT) && nonverbal) { /* AT command set */
5851 gethrn(); /* In digit result mode */
5852 if (partial && dialsta == DIA_ERR) {
5854 If we get an error here, the phone is still
5855 off hook so we have to hang it up.
5858 dialsta = DIA_ERR; /* (because dialhup() changes it) */
5862 } else if (mymdmtyp == n_UNKNOWN) { /* Unknown modem type */
5864 mdmstat = D_FAILED; /* Assume failure. */
5868 if (x > LBUFL) x = LBUFL;
5869 x = ttxin(x,(CHAR *)lbuf);
5870 if ((x > 0) && dialdpy) conol(lbuf);
5874 #endif /* TN_COMPORT */
5875 && x < 0) { /* Connection dropped */
5878 ckThreadEnd(threadinfo);
5880 dialsta = DIA_IO; /* Call it an I/O error */
5882 if (rbuf) free(rbuf); rbuf = NULL;
5883 if (fbuf) free(fbuf); fbuf = NULL;
5884 #endif /* DYNAMIC */
5887 x = ttgmdm(); /* Try to read modem signals */
5888 if (x < 0) break; /* Can't, fail. */
5889 if (x & BM_DCD) { /* Got signals OK. Carrier present? */
5890 mdmstat = CONNECTED; /* Yes, done. */
5892 } /* No, keep waiting. */
5898 for (n = -1; n < LBUFL-1; ) { /* Accumulate modem response */
5900 c2 = (char) (xx = ddinc(0)); /* Read a character, blocking */
5901 if (xx < 1) /* Ignore NULs and errors */
5902 continue; /* (Timeout will handle errors) */
5903 else /* Real character, keep it */
5904 lbuf[++n] = (char) (c2 & 0177);
5905 dialoc(lbuf[n]); /* Maybe echo it */
5906 if (mdmcapas & CKD_V25) { /* V.25bis dialing... */
5908 This assumes that V.25bis indications are all at least 3 characters long
5909 and are terminated by either CRLF or LFCR.
5911 if (mymdmtyp == n_CCITT) {
5912 if (n < 3) continue;
5913 if ((lbuf[n] == CR) && (lbuf[n-1] == LF)) break;
5914 if ((lbuf[n] == LF) && (lbuf[n-1] == CR)) break;
5917 else if (mymdmtyp == n_DIGITEL) {
5918 if (((lbuf[n] == CR) && (lbuf[n-1] == LF)) ||
5919 ((lbuf[n] == LF) && (lbuf[n-1] == CR)))
5924 #endif /* MINIDIAL */
5925 } else { /* All others, break on CR or LF */
5926 if ( lbuf[n] == CR || lbuf[n] == LF ) break;
5929 lbuf[++n] = '\0'; /* Terminate response from modem */
5930 debug(F111,"_dodial modem response",lbuf,n);
5932 ckstrncpy(modemmsg,lbuf,LBUFL); /* Call result message */
5935 int x; /* Strip junk from end */
5936 x = (int)strlen(modemmsg) - 1;
5938 if (modemmsg[x] < (char) 33)
5946 if (mdmcapas & CKD_AT) { /* Hayes AT command set */
5947 gethrw(); /* in word result mode */
5948 if (partial && dialsta == DIA_ERR) {
5950 dialsta = DIA_ERR; /* (because dialhup() changes it) */
5953 } else if (mdmcapas & CKD_V25) { /* CCITT command set */
5954 if (didweget(lbuf,"VAL")) { /* Dial command confirmation */
5956 if (mymdmtyp == n_CCITT)
5957 #endif /* MINIDIAL */
5958 continue; /* Go back and read more */
5960 /* Digitel doesn't give an explicit connect confirmation message */
5963 for (n = -1; n < LBUFL-1; ) {
5964 lbuf[++n] = c2 = (char) (ddinc(0) & 0177);
5966 if (((lbuf[n] == CR) && (lbuf[n-1] == LF)) ||
5967 ((lbuf[n] == LF) && (lbuf[n-1] == CR)))
5970 mdmstat = CONNECTED; /* Assume we're connected */
5971 if (dialdpy && carrier != CAR_OFF) {
5973 if (istncomport()) {
5975 for (i = 0; i < 5; i++) {
5976 debug(F100,"TN Com Port DCD wait...","",0);
5977 if ((n = ttgmdm()) >= 0) {
5982 (CHAR *)"_dodial waiting for DCD",1);
5986 #endif /* TN_COMPORT */
5987 sleep(1); /* Wait a second */
5988 n = ttgmdm(); /* Try to read modem signals */
5989 if ((n > -1) && ((n & BM_DCD) == 0))
5990 printf("WARNING - no carrier\n");
5993 #endif /* MINIDIAL */
5995 /* Standard V.25bis stuff */
5997 } else if (didweget(lbuf,"CNX")) { /* Connected */
5998 mdmstat = CONNECTED;
5999 } else if (didweget(lbuf, "INV")) {
6000 mdmstat = D_FAILED; /* Command error */
6002 ckstrncpy(lbuf,"INV",LBUFL);
6004 } else if (didweget(lbuf,"CFI")) { /* Call Failure */
6006 if (didweget(lbuf,"AB")) { /* Interpret reason code */
6007 ckstrncpy(lbuf,"AB: Timed out",LBUFL);
6009 } else if (didweget(lbuf,"CB")) {
6010 ckstrncpy(lbuf,"CB: Local DCE Busy",LBUFL);
6012 } else if (didweget(lbuf,"ET")) {
6013 ckstrncpy(lbuf,"ET: Busy",LBUFL);
6015 } else if (didweget(lbuf, "NS")) {
6016 ckstrncpy(lbuf,"NS: Number not stored",LBUFL);
6018 } else if (didweget(lbuf,"NT")) {
6019 ckstrncpy(lbuf,"NT: No answer",LBUFL);
6021 } else if (didweget(lbuf,"RT")) {
6022 ckstrncpy(lbuf,"RT: Ring tone",LBUFL);
6024 } else if (didweget(lbuf,"PV")) {
6025 ckstrncpy(lbuf,"PV: Parameter value error",LBUFL);
6027 } else if (didweget(lbuf,"PS")) {
6028 ckstrncpy(lbuf,"PS: Parameter syntax error",LBUFL);
6030 } else if (didweget(lbuf,"MS")) {
6031 ckstrncpy(lbuf,"MS: Message syntax error",LBUFL);
6033 } else if (didweget(lbuf,"CU")) {
6034 ckstrncpy(lbuf,"CU: Command unknown",LBUFL);
6036 } else if (didweget(lbuf,"FC")) {
6037 ckstrncpy(lbuf,"FC: Forbidden call",LBUFL);
6041 } else if (didweget(lbuf,"INC")) { /* Incoming Call */
6042 ckstrncpy(lbuf,"INC: Incoming call",LBUFL);
6045 } else if (didweget(lbuf,"DLC")) { /* Delayed Call */
6046 ckstrncpy(lbuf,"DLC: Delayed call",LBUFL);
6049 } else /* Response was probably an echo. */
6051 if (mymdmtyp == n_CCITT)
6052 #endif /* MINIDIAL */
6055 else /* Digitel: If no error, connect. */
6056 mdmstat = CONNECTED;
6057 #endif /* MINIDIAL */
6060 } else if (n) { /* Non-Hayes-compatibles... */
6064 /* Careful - "Connected" / "Not Connected" */
6065 if (didweget(lbuf,"Busy")) {
6068 } else if (didweget(lbuf,"Not connected") ||
6069 didweget(lbuf,"Not Connected")) {
6072 } else if (didweget(lbuf,"No dial tone") ||
6073 didweget(lbuf,"No Dial Tone")) {
6076 } else if (didweget(lbuf,"No answer") ||
6077 didweget(lbuf,"No Answer")) {
6080 } else if (didweget(lbuf,"Answered") ||
6081 didweget(lbuf,"Connected")) {
6082 mdmstat = CONNECTED;
6088 if (didweget(lbuf,"ANSWERED")) {
6089 mdmstat = CONNECTED;
6091 } else if (didweget(lbuf,"BUSY")) {
6094 } else if (didweget(lbuf,"DISCONNECT")) {
6097 } else if (didweget(lbuf,"NO ANSWER")) {
6100 } else if (didweget(lbuf,"WRONG ADDRESS")) {
6107 if (didweget(lbuf,"ANSWERED")) {
6108 mdmstat = CONNECTED;
6109 } else if (didweget(lbuf,"BUSY")) {
6112 } else if (didweget(lbuf,"CHECK OPTIONS")) {
6115 } else if (didweget(lbuf,"DISCONNECTED")) {
6118 } else if (didweget(lbuf,"DENIED")) {
6124 /* Horrible hack lost in history. */
6125 else if (deblog && didweget(lbuf,"~~"))
6126 mdmstat = CONNECTED;
6127 #endif /* ATT6300 */
6133 if (didweget(lbuf,"\016A")) {
6134 mdmstat = CONNECTED;
6135 ttslow("\016U 1\015",200); /* Make transparent*/
6140 /* Because response lacks CR or NL . . . */
6141 c = (char) (ddinc(0) & 0177);
6143 debug(F000,"dial df03 got","",c);
6144 if ( c == 'A' ) mdmstat = CONNECTED;
6145 if ( c == 'B' ) mdmstat = D_FAILED;
6148 case n_DF100: /* DF100 has short response codes */
6149 if (strcmp(lbuf,"A") == 0) {
6150 mdmstat = CONNECTED; /* Attached */
6152 } else if (strcmp(lbuf,"N") == 0) {
6154 dialsta = DIA_NOAN; /* No answer or no dialtone */
6155 } else if (strcmp(lbuf,"E") == 0 || /* Error */
6156 strcmp(lbuf,"R") == 0) { /* "Ready" (?) */
6158 dialsta = DIA_ERR; /* Command error */
6160 /* otherwise fall thru... */
6163 if (didweget(lbuf,"Attached")) {
6164 mdmstat = CONNECTED;
6167 * The DF100 will respond with "Attached" even if DTR
6168 * and/or carrier are not present. Another reason to
6169 * (also) wait for carrier?
6171 } else if (didweget(lbuf,"Busy")) {
6174 } else if (didweget(lbuf,"Disconnected")) {
6177 } else if (didweget(lbuf,"Error")) {
6180 } else if (didweget(lbuf,"No answer")) {
6183 } else if (didweget(lbuf,"No dial tone")) {
6186 } else if (didweget(lbuf,"Speed:)")) {
6191 * It appears that the "Speed:..." response comes after an
6192 * "Attached" response, so this is never seen. HOWEVER,
6193 * it would be very handy to detect this and temporarily
6194 * reset the speed, since it's a nuisance otherwise.
6195 * If we wait for some more input from the modem, how do
6196 * we know if it's from the remote host or the modem?
6197 * Carrier reportedly doesn't get set until after the
6198 * "Speed:..." response (if any) is sent. Another reason
6199 * to (also) wait for carrier.
6204 if (didweget(lbuf,"ON LINE"))
6205 mdmstat = CONNECTED;
6206 else if (didweget(lbuf,"NO CONNECT"))
6211 if (didweget(lbuf,"OK")) {
6212 mdmstat = CONNECTED;
6213 } else if (didweget(lbuf,"BUSY")) {
6216 } else if (didweget(lbuf,"NO RING")) {
6223 if (didweget(lbuf,"ON LINE"))
6224 mdmstat = CONNECTED;
6225 else if (didweget(lbuf,"FAILED CALL"))
6228 #endif /* OLDMODEMS */
6231 if (didweget(lbuf,"CALLING"))
6233 else if (didweget(lbuf,"COMPLETE"))
6234 mdmstat = CONNECTED;
6235 else if (didweget(lbuf,"FAILED") ||
6236 didweget(lbuf,"ABANDONDED")) {
6239 } else if (didweget(lbuf,"NOT AVAILABLE") ||
6240 didweget(lbuf,"LACKS PERMISSION") ||
6241 didweget(lbuf,"NOT A DATALINE") ||
6242 didweget(lbuf,"INVALID DATA LINE NUMBER") ||
6243 didweget(lbuf,"INVALID GROUP NAME")) {
6246 } else if (didweget(lbuf,"BUSY")) {
6249 } else if (didweget(lbuf,"DOES NOT ANSWER")) {
6257 if (didweget(lbuf,"ONLINE!") ||
6258 didweget(lbuf,"Online!")) {
6259 mdmstat = CONNECTED;
6260 } else if (didweget(lbuf,"BUSY") ||
6261 didweget(lbuf,"Busy")) {
6264 } else if (didweget(lbuf,"DEAD PHONE")) {
6271 if (didweget(lbuf,"INITIATING"))
6272 mdmstat = CONNECTED;
6273 else if (didweget(lbuf,"BUSY")) {
6276 } else if (didweget(lbuf,"CALL FAILED")) {
6281 #endif /* OLDMODEMS */
6284 /* "RINGBACK" means phone line ringing, continue */
6285 if (didweget(lbuf,"NO CONNECT")) {
6288 } else if (didweget(lbuf,"BUSY")) {
6291 } else if (didweget(lbuf,"NO DIALTONE")) {
6294 } else if (didweget(lbuf,"COMMAND ERROR")) {
6297 } else if (didweget(lbuf,"IN USE")) {
6300 } else if (didweget(lbuf,"CONNECT")) {
6301 mdmstat = CONNECTED;
6302 /* trailing speed ignored */
6306 #endif /* MINIDIAL */
6309 "PROGRAM ERROR - No response handler for modem type %d\n",
6315 } /* while (mdmstat == 0) */
6317 debug(F101,"_dodial alarm off","",x);
6319 if (mdmstat == D_FAILED) { /* Failure detected by modem */
6322 ckThreadEnd(threadinfo);
6325 } else if (mdmstat == D_PARTIAL ) { /* Partial dial command OK */
6327 debug(F100,"dial partial","",0);
6328 } else { /* Call was completed */
6330 msleep(700); /* In case modem signals blink */
6331 debug(F100,"dial succeeded","",0);
6334 mymdmtyp != n_ROLM /* Rolm has weird modem signaling */
6337 #endif /* MINIDIAL */
6339 alarm(3); /* In case ttpkt() gets stuck... */
6340 ttpkt(speed,FLO_DIAX,parity); /* Cancel dialing state ioctl */
6344 In case CD went off in the interval between call completion and return
6347 if (carrier != CAR_OFF) {
6348 if ((x = ttgmdm()) >= 0) {
6350 if (istncomport() && !(x & BM_DCD)) {
6352 for (i = 0; i < 5; i++) {
6354 tnc_wait((CHAR *)"_dodial waiting for DCD",1);
6355 if ((x = ttgmdm()) >= 0) {
6361 #endif /* TN_COMPORT */
6363 printf("WARNING: Carrier seems to have dropped...\n");
6367 dreset(); /* Reset alarms and signals. */
6368 if (!quiet && !backgrd) {
6369 if (dialdpy && (p = ck_time())) { /* If DIAL DISPLAY ON, */
6370 printf(" %sall complete: %s.\n", /* include timestamp. */
6371 (mdmstat == D_PARTIAL) ?
6375 } else if (modemmsg[0]) {
6376 printf (" %sall complete: \"%s\".\n",
6377 (mdmstat == D_PARTIAL) ? "Partial c" : "C",
6381 printf (" %sall complete.\n",
6382 (mdmstat == D_PARTIAL) ?
6390 #endif /* CKLOGDIAL */
6393 if (rbuf) free(rbuf); rbuf = NULL;
6394 if (fbuf) free(fbuf); fbuf = NULL;
6395 #endif /* DYNAMIC */
6396 dialsta = (mdmstat == D_PARTIAL) ? DIA_PART : DIA_OK;
6398 ckThreadEnd(threadinfo);
6405 faildial(void * threadinfo)
6406 #else /* Not CK_ANSIC */
6407 faildial(threadinfo) VOID * threadinfo;
6408 #endif /* CK_ANSIC */
6410 debug(F100,"longjmp returns to dial routine","",0);
6411 dialfail(fail_code);
6416 nbr = number to dial (string)
6428 ckdial(nbr) char *nbr;
6430 ckdial(nbr, x1, x2, fc, redial) char *nbr; int x1, x2, fc, redial;
6431 #endif /* OLD_DIAL */
6434 char errmsg[ERMSGL], *erp; /* For error messages */
6440 int term_io_sav = term_io;
6443 char *mmsg = "Sorry, DIAL memory buffer can't be allocated\n";
6445 A DIAL command implies a SET MODEM TYPE command and therefore enables
6446 hanging up by modem commands rather than dropping DTR.
6448 mdmset = 1; /* See mdmhup() */
6451 if (fc == 3) { /* Partial dial requested */
6452 partial = 1; /* Set flag */
6453 fc = 0; /* Treat like regular dialing */
6455 func_code = fc; /* Make global to this module */
6458 debug(F111,"ckdial entry partial",ckitoa(fc),partial);
6459 debug(F111,"ckdial entry number",nbr,redial);
6461 if (fc == 1) { /* ANSWER command? */
6462 /* Reset caller ID strings */
6463 if (callid_date) makestr(&callid_date,NULL);
6464 if (callid_time) makestr(&callid_time,NULL);
6465 if (callid_name) makestr(&callid_name,NULL);
6466 if (callid_nmbr) makestr(&callid_nmbr,NULL);
6467 if (callid_mesg) makestr(&callid_mesg,NULL);
6471 if (tttapi && tapipass) {
6472 if (modemp[n_TAPI] = cktapiGetModemInf()) {
6476 modemp[n_TAPI] = &GENERIC;
6479 #endif /* CK_TAPI */
6481 if (mymdmtyp < 0) { /* Whoa, network dialing... */
6486 printf("Invalid modem type %d - internal error.\n",mymdmtyp);
6490 dial_what = DW_NOTHING; /* Doing nothing at first. */
6493 /* These are ONLY for the purpose of interpreting numeric result codes. */
6499 mymdmtyp == n_SUPRA || mymdmtyp == n_SUPRASON;
6500 #endif /* MINIDIAL */
6507 mymdmtyp == n_MOTOROLA || mymdmtyp == n_MONTANA;
6508 #endif /* MINIDIAL */
6515 mymdmtyp == n_RWV32 || mymdmtyp == n_RWV32B ||
6516 mymdmtyp == n_RWV34 || mymdmtyp == n_RWV90 ||
6517 mymdmtyp == n_BOCA || mymdmtyp == n_TELEPATH ||
6518 mymdmtyp == n_CARDINAL || mymdmtyp == n_BESTDATA ||
6519 mymdmtyp == n_CONEXANT || mymdmtyp == n_PCTEL
6520 #endif /* MINIDIAL */
6527 mymdmtyp == n_H_ULTRA || mymdmtyp == n_H_ACCURA || n_PPI
6528 #endif /* MINIDIAL */
6535 mymdmtyp == n_SUPRA || mymdmtyp == n_SUPRAX || n_SUPRASON
6536 #endif /* MINIDIAL */
6539 mp = modemp[mymdmtyp]; /* Set pointer to modem info */
6541 printf("Sorry, handler for this modem type not yet filled in.\n");
6545 debug(F110,"dial number",telnbr,0);
6547 debug(F110,"dial prefix",(dialnpr ? dialnpr : ""), 0);
6548 #endif /* COMMENT */
6552 debug(F101,"DIAL lbuf malloc ok","",LBUFL+1);
6554 if (!rbuf) { /* This one might already have been allocated by getok() */
6555 if (!(rbuf = malloc(RBUFL+1))) { /* Allocate input line buffer */
6560 debug(F101,"DIAL rbuf malloc ok","",RBUFL+1);
6562 if (!(fbuf = malloc(FULLNUML+1))) { /* Allocate input line buffer */
6565 if (rbuf) free(rbuf); rbuf = NULL;
6568 debug(F101,"DIAL fbuf malloc ok","",FULLNUML+1);
6569 #endif /* DYNAMIC */
6571 /* NOTE: mdmtyp, not mymdmtyp */
6573 if (ttopen(ttname,&local,mdmtyp,0) < 0) { /* Open, no carrier wait */
6575 if ((int)strlen(ttname) < (ERMSGL - 18)) /* safe, checked */
6576 sprintf(erp,"Sorry, can't open %s",ttname);
6578 sprintf(erp,"Sorry, can't open device");
6582 if (rbuf) free(rbuf); rbuf = NULL;
6583 if (fbuf) free(fbuf); fbuf = NULL;
6584 #endif /* DYNAMIC */
6590 #endif /* CK_TAPI */
6592 /* Condition console terminal and communication line */
6594 /* Place line into "clocal" dialing state, */
6595 /* important mainly for System V UNIX. */
6597 if (ttpkt(speed,FLO_DIAL,parity) < 0) {
6598 ttclos(0); /* If ttpkt fails do all this... */
6599 if (ttopen(ttname,&local,mymdmtyp,0) < 0) {
6601 if ((int)strlen(ttname) < (ERMSGL - 18)) /* safe, checked */
6602 sprintf(erp,"Sorry, can't reopen %s",ttname);
6604 sprintf(erp,"Sorry, can't reopen device");
6608 if (rbuf) free(rbuf); rbuf = NULL;
6609 if (fbuf) free(fbuf); fbuf = NULL;
6610 #endif /* DYNAMIC */
6612 } /* And try again. */
6613 if ((ttpkt(speed,FLO_DIAL,parity) < 0)
6615 && (strcmp(ttname,"/dev/null"))
6618 && (strcmp(ttname,"/nil"))
6623 #endif /* CK_TAPI */
6625 printf("Sorry, Can't condition communication line\n");
6626 printf("Try 'set line %s' again\n",ttname);
6629 if (rbuf) free(rbuf); rbuf = NULL;
6630 if (fbuf) free(fbuf); fbuf = NULL;
6631 #endif /* DYNAMIC */
6637 #endif /* CK_TAPI */
6639 /* Modem's escape sequence... */
6641 if (dialesc < 0 || dialesc > 127)
6644 c = (char) (dialesc ? dialesc : mp->esc_char);
6645 mdmcapas = dialcapas ? dialcapas : mp->capas;
6647 xx_ok = mp->ok_fn; /* Pointer to response reader */
6649 if (mdmcapas & CKD_AT) { /* Hayes compatible */
6654 /* In case this modem type is user-defined */
6655 if (!xx_ok) xx_ok = getok;
6656 } else { /* Other */
6659 /* In case user-defined */
6660 if (mdmcapas & CKD_V25) if (!xx_ok) xx_ok = getok;
6663 /* Partial dialing */
6665 if (mdmcapas & CKD_AT
6667 || mymdmtyp == n_MICROCOM
6668 #endif /* MINIDIAL */
6671 x = (int) strlen(telnbr);
6673 if (telnbr[x-1] == ';') {
6675 debug(F110,"ckdial sets partial=1:",telnbr,0);
6676 } else if (partial) {
6677 ckmakmsg(fbuf,FULLNUML,telnbr,";",NULL,NULL); /* add one */
6684 debug(F101,"ckdial dialtmo","",dialtmo); /* Timeout */
6686 if (fc == 1) { /* ANSWER */
6687 waitct = (dialatmo > -1) ? dialatmo : 0;
6689 if (dialtmo < 1) { /* Automatic computation. */
6691 if (tttapi && !tapipass) {
6692 waitct = 1 * (int)strlen(telnbr) ; /* Worst case dial time */
6693 waitct += 60; /* dialtone + completion wait times */
6694 for (s = telnbr; *s; s++) { /* add in pause characters time */
6696 waitct += 2; /* unless it was changed in the modem */
6697 } else if (*s == 'W' ||
6706 #endif /* CK_TAPI */
6707 waitct = 1 * (int)strlen(telnbr) ;
6708 /* dialtone + completion wait times */
6709 waitct += mp->dial_time;
6710 for (s = telnbr; *s; s++) {
6711 for (p = mp->pause_chars; *p; p++)
6713 waitct += mp->pause_time;
6719 #endif /* CK_TAPI */
6721 waitct = dialtmo; /* User-specified timeout */
6723 debug(F101,"ckdial waitct A","",waitct);
6727 waitct is our alarm() timer.
6728 mdmwait is how long we tell the modem to wait for carrier.
6729 We set mdmwait to be 5 seconds less than waitct, to increase the
6730 chance that we get a response from the modem before timing out.
6732 if (waitct <= 0) { /* 0 or negative means wait forever */
6734 waitct = 254; /* These were backwards in 7.0.196 */
6737 waitct = 0; /* Fixed in 7.0.198. */
6739 #endif /* COMMENT */
6741 if (dialtmo < 1) { /* Automatic computation. */
6743 /* Addtl wait slop can be defined at compile time */
6745 #endif /* XWAITCT */
6746 if (waitct < 60 + mdmwaitd)
6747 waitct = 60 + mdmwaitd;
6749 if (mdmcapas & CKD_AT) { /* AT command-set modems */
6750 mdmwait = waitct; /* S7 timeout = what user asked for */
6751 waitct += mdmwaitd; /* Kermit timeout a bit later */
6752 } else { /* Non-AT */
6753 mdmwait = waitct; /* no difference */
6756 debug(F101,"ckdial waitct B","",waitct);
6757 if (fc == 1) { /* ANSWER */
6760 This is wrong. mdmwait is the value given to S7 in Hayeslike modems.
6761 When in autoanswer mode, this is the amount of time the modem waits for
6762 carrier once ringing starts. Whereas waitct is the timeout given to the
6763 ANSWER command, which is an entirely different thing. Since the default
6764 ANSWER timeout is 0 (meaning "wait forever"), the following statement sets
6765 S7 to 0, which, on some modems (like the USR Sportster) makes it hang up
6766 and report NO CARRIER the instant the phone rings.
6771 mdmwait = 60; /* Always wait 60 seconds. */
6772 #endif /* COMMENT */
6775 if (!quiet && !backgrd) { /* Print information messages. */
6781 printf(" Waiting for phone call...\n");
6783 printf(" %srying: %s...\n", x1 > 0 ? "Ret" : "T", telnbr);
6784 if (x1 == 0 && x2 == 0 && dialsta != DIA_PART) {
6786 printf(" Via modem server: %s, modem: %s\n",
6787 ttname, gmdmtyp() );
6790 if (tttapi && !tapipass)
6791 printf(" Device: %s, modem: %s", ttname, "TAPI" );
6793 #endif /* CK_TAPI */
6794 printf(" Device: %s, modem: %s",
6795 ttname, gmdmtyp() );
6797 printf(", speed: %ld\n", speed);
6799 printf(", speed: (unknown)\n");
6801 spdmax = dialmax > 0L ? dialmax : mp->max_speed;
6804 if (hints && !quiet &&
6805 !network && spdmax > 0L && speed > spdmax
6807 && (!tttapi || tapipass)
6808 #endif /* CK_TAPI */
6810 printf("\n*************************\n");
6812 "Interface speed %ld might be too high for this modem type.\n",
6816 "If dialing fails, SET SPEED to %ld or less and try again.\n",
6819 printf("(Use SET HINTS OFF to suppress future hints.)\n");
6820 printf("*************************\n");
6823 #endif /* NOHINTS */
6824 printf(" %s timeout: ", fc == 0 ? "Dial" : "Answer");
6826 printf("%d seconds\n",mdmwait);
6828 printf(" (none)\n");
6831 " Type Command-. to cancel.\n"
6834 " To cancel: type your interrupt character (normally Ctrl-C).\n"
6836 " To cancel: type Ctrl-C (hold down Ctrl, press C).\n"
6842 debug(F111,"ckdial",ttname,(int) (speed / 10L));
6843 debug(F101,"ckdial timeout","",waitct);
6848 /* Set timer and interrupt handlers. */
6849 savint = signal( SIGINT, dialint ) ; /* And terminal interrupt handler. */
6850 cc_alrm_execute(ckjaddr(sjbuf), 0, dialtime, _dodial, faildial);
6852 signal(SIGINT, savint);
6854 if (dialsta == DIA_OK) /* Dialing is completed */
6855 DialerSend(OPT_KERMIT_CONNECT, 0);
6856 term_io = term_io_sav;
6858 if (dialsta == DIA_PART || dialsta == DIA_OK) {
6859 /* This is needed, e.g., for Telnet modem servers */
6860 if (reliable != SET_OFF || !setreliable) {
6861 reliable = SET_OFF; /* Transport is not reliable */
6862 debug(F101,"ckdial reliable","",reliable);
6864 return(1); /* Dial attempt succeeded */
6866 return(0); /* Dial attempt failed */
6871 getok() - wait up to n seconds for OK (0) or ERROR (4) response from modem.
6872 Use with Hayeslike or CCITT modems for reading the reply to a nondialing
6875 Second argument says whether to be strict about numeric result codes, i.e.
6876 to require they be preceded by CR or else be the first character in the
6877 response, e.g. to prevent the ATH0<CR> echo from looking like a valid
6878 response. Strict == 0 is needed for ATI on Telebit, which can return the
6879 model number concatenated with the numeric response code, e.g. "9620"
6880 ("962" is the model number, "0" is the response code). getok() Returns:
6884 -1 on modem command, i/o, or other error.
6886 static ckjmpbuf okbuf;
6890 oktimo(int foo) /* Alarm handler for getok(). */
6892 oktimo(foo) int foo; /* Alarm handler for getok(). */
6893 #endif /* CK_ANSIC */
6898 /* signal(SIGALRM,SIG_IGN); */
6899 debug(F100,"oktimo() SIGALRM caught -- SIG_IGN set","",0) ;
6902 #ifdef OSK /* OS-9, see comment in dialtime(). */
6906 if ( foo == SIGALRM )
6912 cklongjmp(ckjaddr(okbuf),1);
6921 static int okstatus, okn, okstrict;
6925 dook(void * threadinfo)
6926 #else /* CK_ANSIC */
6927 dook(threadinfo) VOID * threadinfo ;
6928 #endif /* CK_ANSIC */
6937 extern int inserver;
6940 signal(SIGINT,oktimo);
6941 if (threadinfo) { /* Thread local storage... */
6942 TlsSetValue(TlsIndex,threadinfo);
6952 #endif /* CK_LOGIN */
6954 if (mdmcapas & CKD_V25) { /* CCITT, easy... */
6957 debug(F111,"Modem_Response(V25)","VAL",okstatus);
6959 ckThreadEnd(threadinfo);
6963 } else if (mymdmtyp == n_MICROCOM) { /* Microcom in SX mode, also easy */
6964 waitfor(MICROCOM.wake_prompt); /* (I think...) */
6965 debug(F111,"Modem_Response(Microcom)",MICROCOM.wake_prompt,okstatus);
6968 ckThreadEnd(threadinfo);
6971 #endif /* MINIDIAL */
6972 } else { /* Hayes & friends, start here... */
6973 okstatus = 0; /* No status yet. */
6974 for (x = 0; x < RBUFL; x++) /* Initialize response buffer */
6975 rbuf[x] = SP; /* to all spaces */
6976 rbuf[RBUFL] = NUL; /* and terminate with NUL. */
6977 while (okstatus == 0) { /* While no status... */
6978 x = ddinc(okn); /* Read a character */
6979 if (x < 0) { /* I/O error */
6982 ckThreadEnd(threadinfo);
6988 debug(F101,"getok ddinc","",x); /* Got a character. */
6989 #endif /* COMMENT */
6990 c = (char) (x & 0x7f); /* Get low order 7 bits */
6991 if (!c) /* Don't deposit NULs */
6992 continue; /* or else didweget() won't work */
6993 if (dialdpy) conoc((char)c); /* Echo it if requested */
6994 for (i = 0; i < RBUFL-1; i++) /* Rotate buffer */
6995 rbuf[i] = rbuf[i+1];
6996 rbuf[RBUFL-1] = c; /* Deposit character at end */
6999 debug(F000,"getok:",rbuf,(int) c); /* Log it */
7000 #endif /* COMMENT */
7001 switch (c) { /* Interpret it. */
7002 case CR: /* Got a carriage return. */
7003 switch(rbuf[RBUFL-2]) { /* Look at character before it. */
7004 case '0': /* 0 = OK numeric response */
7006 rbuf[RBUFL-3] == CR || rbuf[RBUFL-3] == SP) {
7008 okstatus = 1; /* Good response */
7010 debug(F111,"Modem_Response(Hayes)","0",okstatus);
7012 case '4': /* 4 = ERROR numeric response */
7014 /* Or Telebit model number 964! */
7015 if (mymdmtyp == n_TELEBIT &&
7016 isdigit(rbuf[RBUFL-3]) &&
7017 isdigit(rbuf[RBUFL-4]))
7020 #endif /* MINIDIAL */
7022 rbuf[RBUFL-3] == CR || rbuf[RBUFL-3] == SP) {
7024 okstatus = -1; /* Bad command */
7026 debug(F111,"Modem_Response(Hayes)","4",okstatus);
7029 if (dialdpy && nonverbal) /* If numeric results, */
7030 conoc(LF); /* echo a linefeed too. */
7032 case LF: /* Got a linefeed. */
7034 Note use of explicit octal codes in the string for
7035 CR and LF. We want real CR and LF here, not whatever
7036 the compiler happens to replace \r and \n with...
7038 if (!strcmp(rbuf+RBUFL-4,"OK\015\012")) { /* Good response */
7040 debug(F111,"Modem_Response(Hayes)","OK",okstatus);
7042 if (!strcmp(rbuf+RBUFL-3,"OK\012")) { /* Good response */
7044 debug(F111,"Modem_Response(Hayes)","OK",okstatus);
7045 } else if (!strcmp(rbuf+RBUFL-7,"ERROR\015\012")) { /* Error */
7047 debug(F111,"Modem_Response(Hayes)","ERROR",okstatus);
7048 } else if (!strcmp(rbuf+RBUFL-6,"ERROR\012")) { /* Error */
7050 debug(F111,"Modem_Response(Hayes)","ERROR",okstatus);
7053 /* Check whether modem echoes its commands... */
7054 case 't': /* Got little t */
7055 if (!strcmp(rbuf+RBUFL-3,"\015at") || /* See if it's "at" */
7056 !strcmp(rbuf+RBUFL-3," at"))
7058 /* debug(F111,"MDMECHO-t",rbuf+RBUFL-2,mdmecho); */
7060 case 'T': /* Got Big T */
7061 if (!strcmp(rbuf+RBUFL-3,"\015AT") || /* See if it's "AT" */
7062 !strcmp(rbuf+RBUFL-3," AT"))
7064 /* debug(F111,"MDMECHO-T",rbuf+RBUFL-3,mdmecho); */
7066 default: /* Other characters, accumulate. */
7072 debug(F101,"getok","",okstatus); /* <-- It's a lie (why?) */
7074 ckThreadEnd(threadinfo);
7081 failok(void * threadinfo)
7082 #else /* CK_ANSIC */
7083 failok(threadinfo) VOID * threadinfo;
7084 #endif /* CK_ANSIC */
7086 debug(F100,"longjmp returned to getok()","",0);
7087 debug(F100,"getok timeout","",0);
7092 getok(n, strict) int n, strict; {
7093 debug(F101,"getok entry n","",n);
7100 if (!(rbuf = malloc(RBUFL+1))) { /* Allocate input line buffer */
7104 debug(F101,"GETOK rbuf malloc ok","",RBUFL+1);
7106 #endif /* DYNAMIC */
7108 mdmecho = 0; /* Assume no echoing of commands */
7110 debug(F100,"about to alrm_execute dook()","",0);
7111 alrm_execute( ckjaddr(okbuf), n, oktimo, dook, failok ) ;
7112 debug(F100,"returning from alrm_execute dook()","",0);
7114 ttflui(); /* Flush input buffer */
7115 return(okstatus); /* Return status */
7118 /* G E T H R N -- Get Hayes Result Numeric */
7125 Hayes numeric result codes (Hayes 1200 and higher):
7127 1 = CONNECT at 300 bps (or 1200 bps on Hayes 1200 with basic code set)
7130 4 = ERROR (in command line)
7131 5 = CONNECT 1200 (extended code set)
7132 Hayes 2400 and higher:
7138 Reportedly, the codes for Hayes V.32 modems are:
7139 1x = CONNECT <suffix>
7140 5x = CONNECT 1200 <suffix>
7141 9x = CONNECT 2400 <suffix>
7142 11x = CONNECT 4800 <suffix>
7143 12x = CONNECT 9600 <suffix>
7147 RC = RELIABLE COMPRESSED
7149 LC = LAPM COMPRESSED
7150 And for Telebits, all the above, except no suffix in numeric mode, plus:
7157 20 = CONNECT 300/REL (= MNP)
7158 22 = CONNECT 1200/REL (= MNP)
7159 23 = CONNECT 2400/REL (= MNP)
7160 46 = CONNECT 7512 (i.e. 75/1200)
7161 47 = CONNECT 1275 (i.e. 1200/75)
7164 50 = CONNECT FAST (not on T1600/3000)
7168 61 = CONNECT FAST/KERM (Kermit spoof)
7169 70 = CONNECT FAST/COMP (PEP + compression)
7170 71 = CONNECT FAST/KERM/COMP (PEP + compression + Kermit spoof)
7172 And for others, lots of special cases below...
7175 char nbuf[NBUFL+1]; /* Response buffer */
7176 int i = 0, j = 0; /* Buffer pointers */
7178 debug(F101,"RESPONSE mdmecho","",mdmecho);
7179 if (mdmecho) { /* Sponge up dialing string echo. */
7181 c = (char) (ddinc(0) & 0x7f);
7182 debug(F000,"SPONGE","",c);
7187 while (mdmstat == 0) { /* Read response */
7188 for (i = 0; i < NBUFL; i++) /* Clear the buffer */
7190 i = 0; /* Reset the buffer pointer. */
7191 c = (char) (ddinc(0) & 0177); /* Get first digit of response. */
7192 /* using an untimed, blocking read. */
7193 debug(F000,"RESPONSE-A","",c);
7194 dialoc(c); /* Echo it if requested. */
7195 if (!isdigit(c)) /* If not a digit, keep looking. */
7197 nbuf[i++] = c; /* Got first digit, save it. */
7198 while (c != CR && i < 8) { /* Read chars up to CR */
7199 x = ddinc(0) & 0177; /* Get a character. */
7200 c = (char) x; /* Got it OK. */
7201 debug(F000,"RESPONSE-C","",c);
7202 if (c != CR) /* If it's not a carriage return, */
7203 nbuf[i++] = c; /* save it. */
7204 dialoc(c); /* Echo it. */
7206 nbuf[i] = '\0'; /* Done, terminate the buffer. */
7207 debug(F110,"dial hayesnv lbuf",lbuf,0);
7208 debug(F111,"dial hayesnv got",nbuf,i);
7210 Separate any non-numeric suffix from the numeric
7211 result code with a null.
7213 for (j = i-1; (j > -1) && !isdigit(nbuf[j]); j--)
7214 nbuf[j+1] = nbuf[j];
7217 debug(F110,"dial hayesnv numeric",nbuf,0);
7218 debug(F111,"dial hayesnv suffix ",nbuf+j,j);
7219 /* Probably phone number echoing. */
7220 if ((int)strlen(nbuf) > 3)
7223 /* Now read and interpret the results... */
7225 i = atoi(nbuf); /* Convert to integer */
7228 mdmstat = D_PARTIAL; /* OK response */
7230 case 1: /* CONNECT */
7231 mdmstat = CONNECTED; /* Could be any speed */
7235 printf("\r\n Local phone is ringing!\r\n");
7239 case 3: /* NO CARRIER */
7240 if (dialdpy) printf("\r\n No Carrier.\r\n");
7246 printf("\r\n Modem Command Error.\r\n");
7250 case 5: /* CONNECT 1200 */
7251 spdchg(1200L); /* Change speed if necessary. */
7252 mdmstat = CONNECTED;
7254 case 6: /* NO DIALTONE */
7256 if (mymdmtyp == n_MICROLINK && atoi(diallcc) == 49 && dialdpy)
7257 printf("\r\n Dial Locked.\r\n"); /* Germany */
7259 #endif /* MINIDIAL */
7261 printf("\r\n No Dialtone.\r\n");
7266 if (dialdpy) printf("\r\n Busy.\r\n");
7270 case 8: /* NO ANSWER */
7272 if (mymdmtyp == n_MICROLINK && atoi(diallcc) == 41 && dialdpy)
7273 printf("\r\n Dial Locked.\r\n"); /* Switzerland */
7275 #endif /* MINIDIAL */
7277 printf("\r\n No Answer.\r\n");
7284 if (mymdmtyp == n_XJACK || mymdmtyp == n_SUPRAX) {
7288 #endif /* MINIDIAL */
7289 case 10: /* CONNECT 2400 */
7290 spdchg(2400L); /* Change speed if necessary. */
7291 mdmstat = CONNECTED;
7296 /* Starting here, we get different meanings from different manufacturers */
7299 if (mymdmtyp == n_USR) {
7300 if (dialdpy) printf(" Ringing...\r\n");
7302 spdchg(4800L); /* CONNECT 4800 */
7303 mdmstat = CONNECTED;
7307 if (mymdmtyp == n_USR) {
7309 printf("\r\n Answered by voice.\r\n");
7312 } else if (mymdmtyp == n_KEEPINTOUCH) {
7314 mdmstat = CONNECTED;
7317 mdmstat = CONNECTED;
7321 if (mymdmtyp == n_ATT1900 || mymdmtyp == n_ATT1910) {
7322 if (dialdpy) printf(" Wait...\r\n");
7324 } else if (mymdmtyp == n_USR || mymdmtyp == n_USRX2)
7326 else if (is_rockwell || is_supra ||
7327 mymdmtyp == n_ZOLTRIX || mymdmtyp == n_XJACK)
7329 else if (mymdmtyp != n_MICROLINK)
7331 mdmstat = CONNECTED;
7334 if (is_rockwell || is_supra || mymdmtyp == n_XJACK)
7336 else if (mymdmtyp == n_DATAPORT || mymdmtyp == n_MICROLINK)
7338 else if (mymdmtyp == n_KEEPINTOUCH)
7340 else if (mymdmtyp != n_USR && mymdmtyp != n_ZOLTRIX)
7342 mdmstat = CONNECTED;
7345 if (is_rockwell || is_supra ||
7346 mymdmtyp == n_ZOLTRIX || mymdmtyp == n_XJACK)
7348 else if (mymdmtyp == n_USR)
7350 else if (mymdmtyp == n_ZYXEL || mymdmtyp == n_INTEL)
7352 else if (mymdmtyp == n_DATAPORT)
7356 mdmstat = CONNECTED;
7359 if (is_rockwell || is_supra ||
7360 mymdmtyp == n_ZOLTRIX || mymdmtyp == n_XJACK)
7362 else if (mymdmtyp == n_USR)
7364 else if (mymdmtyp == n_DATAPORT)
7366 else if (mymdmtyp != n_ZYXEL && mymdmtyp != n_INTEL) /* 12000 */
7368 mdmstat = CONNECTED;
7371 if (mymdmtyp != n_DATAPORT || mymdmtyp == n_XJACK) /* 16800 */
7373 else if (mymdmtyp == n_ZYXEL || mymdmtyp == n_INTEL)
7375 else if (mymdmtyp == n_KEEPINTOUCH)
7377 else if (mymdmtyp == n_USR)
7379 mdmstat = CONNECTED;
7382 if (is_rockwell || is_supra ||
7383 mymdmtyp == n_ZOLTRIX || mymdmtyp == n_XJACK ||
7384 mymdmtyp == n_MHZATT || mymdmtyp == n_LUCENT)
7386 else if (mymdmtyp == n_INTEL)
7388 else if (mymdmtyp == n_USR || mymdmtyp == n_USRX2)
7390 mdmstat = CONNECTED;
7393 if (mymdmtyp == n_DATAPORT)
7395 else if (mymdmtyp == n_ZYXEL || mymdmtyp == n_INTEL)
7399 mdmstat = CONNECTED;
7402 if (mymdmtyp == n_USR || mymdmtyp == n_USRX2)
7404 else if (mymdmtyp == n_DATAPORT)
7406 else if (mymdmtyp == n_ZYXEL || mymdmtyp == n_INTEL)
7410 mdmstat = CONNECTED;
7413 if (mymdmtyp == n_DATAPORT)
7415 mdmstat = CONNECTED;
7418 if (is_rockwell || is_supra || mymdmtyp == n_XJACK)
7420 else if (mymdmtyp == n_DATAPORT)
7422 else if (mymdmtyp == n_KEEPINTOUCH)
7424 else if (!is_hayeshispd)
7426 mdmstat = CONNECTED;
7429 if (is_hayeshispd || is_supra ||
7430 mymdmtyp == n_MULTI || mymdmtyp == n_XJACK)
7432 else if (mymdmtyp != n_DATAPORT && !is_rockwell) /* 12000 */
7434 mdmstat = CONNECTED;
7437 if (is_rockwell || is_supra || mymdmtyp == n_XJACK) {
7439 dialsta = DIA_DELA; /* Delayed */
7441 } else if (is_hayeshispd || mymdmtyp == n_LUCENT)
7443 else if (mymdmtyp == n_DATAPORT)
7445 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7447 mdmstat = CONNECTED;
7450 if (mymdmtyp == n_USR || mymdmtyp == n_USRX2)
7452 else if (mymdmtyp == n_LUCENT)
7454 else if (is_motorola)
7456 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7458 mdmstat = CONNECTED;
7461 if (mymdmtyp == n_DATAPORT)
7463 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7465 mdmstat = CONNECTED;
7468 if (mymdmtyp == n_DATAPORT)
7470 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7472 else if (mymdmtyp == n_MHZATT)
7474 mdmstat = CONNECTED;
7477 if (mymdmtyp == n_DATAPORT)
7479 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7481 else if (mymdmtyp == n_MHZATT || mymdmtyp == n_LUCENT)
7483 mdmstat = CONNECTED;
7488 else if (mymdmtyp == n_DATAPORT)
7490 mdmstat = CONNECTED;
7493 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7495 mdmstat = CONNECTED;
7496 } /* fall thru on purpose... */
7498 if (mymdmtyp == n_UCOM_AT || mymdmtyp == n_MICROLINK) {
7500 mdmstat = CONNECTED;
7501 } else if (is_motorola) {
7503 mdmstat = CONNECTED;
7507 if (is_rockwell || is_supra || mymdmtyp == n_XJACK) {
7509 dialsta = DIA_BLCK; /* Blacklisted */
7510 } else if (mymdmtyp == n_UCOM_AT || mymdmtyp == n_MICROLINK) {
7512 mdmstat = CONNECTED;
7513 } else if (mymdmtyp == n_KEEPINTOUCH) {
7515 mdmstat = CONNECTED;
7516 } else if (mymdmtyp == n_INTEL) {
7518 mdmstat = CONNECTED;
7521 case 33: /* FAX connection */
7522 if (is_rockwell || is_supra ||
7523 mymdmtyp == n_ZOLTRIX || mymdmtyp == n_XJACK) {
7526 } else if (mymdmtyp == n_UCOM_AT ||
7528 mymdmtyp == n_MICROLINK
7531 mdmstat = CONNECTED;
7532 } else if (mymdmtyp == n_MHZATT) {
7534 mdmstat = CONNECTED;
7538 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7540 mdmstat = CONNECTED;
7541 } else if (mymdmtyp == n_MICROLINK) {
7543 mdmstat = CONNECTED;
7549 dialsta = CONNECTED;
7550 } else if (is_motorola) {
7552 mdmstat = CONNECTED;
7553 } else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7555 mdmstat = CONNECTED;
7556 } else if (mymdmtyp == n_MICROLINK) {
7558 mdmstat = CONNECTED;
7559 } else if (mymdmtyp == n_ZOLTRIX || mymdmtyp == n_XJACK) /* DATA */
7560 mdmstat = CONNECTED;
7563 if (mymdmtyp == n_UCOM_AT) {
7565 mdmstat = CONNECTED;
7566 } else if (is_motorola) {
7568 mdmstat = CONNECTED;
7569 } else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7571 mdmstat = CONNECTED;
7575 if (mymdmtyp == n_UCOM_AT) {
7577 mdmstat = CONNECTED;
7578 } else if (is_motorola) {
7580 mdmstat = CONNECTED;
7581 } else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7583 mdmstat = CONNECTED;
7589 mdmstat = CONNECTED;
7590 } else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7592 mdmstat = CONNECTED;
7593 } /* fall thru on purpose... */
7595 if (mymdmtyp == n_UCOM_AT) {
7597 mdmstat = CONNECTED;
7598 } else if (is_motorola) {
7600 mdmstat = CONNECTED;
7601 } else if (mymdmtyp == n_MICROLINK) {
7603 mdmstat = CONNECTED;
7607 if (mymdmtyp == n_UCOM_AT) {
7610 } else if (is_motorola || mymdmtyp == n_INTEL ||
7611 mymdmtyp == n_KEEPINTOUCH) {
7613 mdmstat = CONNECTED;
7619 mdmstat = CONNECTED;
7623 if (mymdmtyp == n_KEEPINTOUCH) {
7625 mdmstat = CONNECTED;
7626 } else if (is_motorola) {
7628 mdmstat = CONNECTED;
7629 } /* fall thru on purpose... */
7631 if (mymdmtyp == n_UCOM_AT) {
7633 mdmstat = CONNECTED;
7634 } else if (mymdmtyp == n_USRX2)
7635 mdmstat = CONNECTED; /* 168000 */
7640 dialsta = CONNECTED;
7641 } else if (is_motorola) {
7643 mdmstat = CONNECTED;
7644 } else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7646 mdmstat = CONNECTED;
7652 mdmstat = CONNECTED;
7653 } else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7655 mdmstat = CONNECTED;
7658 mdmstat = CONNECTED;
7664 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7667 spdchg(8880L); /* 75/1200 split speed */
7668 mdmstat = CONNECTED;
7673 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7676 printf("CONNECT 1200/75 - Not supported by C-Kermit\r\n");
7677 mdmstat = CONNECTED;
7682 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7686 mdmstat = CONNECTED;
7691 mdmstat = CONNECTED;
7693 case 50: /* CONNECT FAST */
7696 else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH)
7698 mdmstat = CONNECTED;
7701 if (mymdmtyp == n_UCOM_AT) {
7706 case 52: /* RRING */
7707 if (mymdmtyp == n_TELEBIT)
7708 if (dialdpy) printf(" Ringing...\r\n");
7710 case 53: /* DIALING */
7711 if (mymdmtyp == n_TELEBIT)
7712 if (dialdpy) printf(" Dialing...\r\n");
7717 mdmstat = CONNECTED;
7718 } else if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7720 mdmstat = CONNECTED;
7721 } else if (mymdmtyp == n_TELEBIT) {
7722 if (dialdpy) printf("\r\n No Prompttone.\r\n");
7728 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7730 mdmstat = CONNECTED;
7734 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7736 mdmstat = CONNECTED;
7740 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7742 mdmstat = CONNECTED;
7746 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7748 mdmstat = CONNECTED;
7752 if (mymdmtyp == n_INTEL) /* 12000 */
7753 mdmstat = CONNECTED;
7756 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7758 mdmstat = CONNECTED;
7762 if (mymdmtyp == n_INTEL) {
7764 mdmstat = CONNECTED;
7765 } else if (is_supra) {
7767 mdmstat = CONNECTED;
7771 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7773 mdmstat = CONNECTED;
7777 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7779 mdmstat = CONNECTED;
7783 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7785 mdmstat = CONNECTED;
7789 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7791 mdmstat = CONNECTED;
7795 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) /* 12000 */
7796 mdmstat = CONNECTED;
7799 if (mymdmtyp == n_INTEL || mymdmtyp == n_KEEPINTOUCH) {
7801 mdmstat = CONNECTED;
7805 if (mymdmtyp == n_UCOM_AT) {
7807 mdmstat = CONNECTED;
7809 } /* else fall thru */
7810 if (mymdmtyp == n_TELEBIT) /* Early models only */
7811 mdmstat = CONNECTED;
7814 if (mymdmtyp == n_USR || mymdmtyp == n_USRX2)
7816 mdmstat = CONNECTED;
7818 case 91: /* 21600 */
7819 case 99: /* 24000 */
7820 case 103: /* 26400 */
7821 if (mymdmtyp == n_USRX2)
7822 mdmstat = CONNECTED;
7825 if (mymdmtyp == n_USR || mymdmtyp == n_USRX2) {
7827 mdmstat = CONNECTED;
7830 case 151: /* 312000 */
7831 case 155: /* 336000 */
7832 if (mymdmtyp == n_USRX2)
7833 mdmstat = CONNECTED;
7836 #endif /* MINIDIAL */
7839 if (mymdmtyp == n_USR || mymdmtyp == n_USRX2 ||
7840 is_hayeshispd || is_rockwell)
7841 #endif /* MINIDIAL */
7842 if (i > 12) /* There are hundreds of them... */
7843 mdmstat = CONNECTED;
7847 if (mdmstat == CONNECTED && nbuf[j] != '\0') {
7850 if (nbuf[j] == 'R') printf(" RELIABLE");
7851 if (nbuf[j] == 'L') printf(" LAPM");
7852 if (nbuf[j+1] == 'C') printf(" COMPRESSED");
7855 ckstrncpy(lbuf,nbuf,LBUFL); /* (for messages...) */
7859 static VOID /* Get Hayes Result in Word mode */
7864 if (mdmspd && !network) {
7866 while (*s != '\0' && *s != 'C') s++;
7867 cptr = (*s == 'C') ? s : NULL;
7869 if ((cptr != NULL) && !strncmp(cptr,"CONNECT ",8)) {
7870 if ((int)strlen(cptr) < 9) /* Just CONNECT, */
7871 conspd = 300L; /* use 300 bps */
7872 else if (isdigit(*(cptr+8))) /* not CONNECT FAST */
7873 conspd = atol(cptr + 8); /* CONNECT nnnn */
7874 if (conspd != speed) {
7875 if ((conspd / 10L) > 0) {
7876 if (ttsspd((int) (conspd / 10L)) < 0) {
7877 printf(" Can't change speed to %ld\r\n",
7881 mdmstat = CONNECTED;
7882 if ( !quiet && !backgrd )
7883 printf(" Speed changed to %ld\r\n",
7887 } /* Expanded to handle any conceivable speed */
7891 if (mymdmtyp == n_TELEBIT) {
7892 if (didweget(lbuf,"CONNECT FAST/KERM")) {
7893 mdmstat = CONNECTED;
7894 if (dialdpy) printf("FAST/KERM ");
7898 #endif /* MINIDIAL */
7899 if (didweget(lbuf,"RRING") ||
7900 didweget(lbuf,"RINGING") ||
7901 didweget(lbuf,"DIALING")) {
7903 } else if (didweget(lbuf,"CONNECT")) {
7904 mdmstat = CONNECTED;
7905 } else if (didweget(lbuf,"OK")) {
7907 mdmstat = D_PARTIAL;
7912 } else if (didweget(lbuf,"NO CARRIER")) {
7915 } else if (didweget(lbuf,"NO DIALTONE")) {
7918 } else if (didweget(lbuf,"NO DIAL TONE")) {
7921 } else if (didweget(lbuf,"BUSY")) {
7924 } else if (didweget(lbuf,"NO ANSWER")) {
7927 } else if (didweget(lbuf,"VOICE")) {
7930 } else if (didweget(lbuf,"VCON")) {
7933 } else if (didweget(lbuf,"NO PROMPT TONE")) {
7936 } else if (didweget(lbuf,"REMOTE ACCESS FAILED")) {
7939 } else if (didweget(lbuf,"FAX")) {
7942 } else if (didweget(lbuf,"WAIT - CONNECTING") ||
7943 didweget(lbuf,"WAIT-CONNECTING")) { /* AT&T STU-III 19xx */
7945 } else if (didweget(lbuf,"DELAYED")) {
7948 } else if (didweget(lbuf,"BLACKLISTED")) {
7951 } else if (didweget(lbuf,"COMPRESSION")) {
7953 } else if (didweget(lbuf,"PROTOCOL")) {
7955 } else if (didweget(lbuf,"DIAL LOCKED")) { /* Germany, Austria, Schweiz */
7958 } else if ( didweget(lbuf,"RING") ||
7959 didweget(lbuf,"RING1") || /* Distinctive Ring 1 */
7960 didweget(lbuf,"RING2") || /* Distinctive Ring 2 */
7961 didweget(lbuf,"RING3") ) {
7962 mdmstat = (func_code == 0) ? D_FAILED : 0;
7964 } else if (didweget(lbuf,"ERROR")) {
7967 } else if (didweget(lbuf,"CARRIER")) { /* Boca / Rockwell family */
7970 #endif /* COMMENT */
7973 /* Does CARRIER ever mean the same as CONNECT? */
7975 mdmstat = CONNECTED;
7976 #endif /* COMMENT */
7977 } else if (didweget(lbuf,"DATA")) { /* Boca / Rockwell family */
7978 /* This message is sent when the modem is in FAX mode */
7979 /* So setting this to CONNECTED may not be appropriate */
7980 /* We must send ATO\015 to the modem in response */
7981 /* Then we will get a CONNECTED message */
7982 mdmstat = CONNECTED;
7983 } else if (didweget(lbuf,"DIGITAL LINE")) {
7986 } else if (didweget(lbuf,"DATE")) { /* Caller ID Date */
7987 debug(F110,"CALLID DATE",lbuf,0);
7988 /* Format is "DATE = MMDD" */
7989 makestr(&callid_date,lbuf);
7990 } else if (didweget(lbuf,"TIME")) { /* Caller ID Time */
7991 /* Format is "TIME = HHMM" */
7992 debug(F110,"CALLID TIME",lbuf,0);
7993 makestr(&callid_time,lbuf);
7994 } else if (didweget(lbuf,"NAME")) { /* Caller ID Name */
7995 /* Format is "NAME = <listing name>" */
7996 debug(F110,"CALLID NAME",lbuf,0);
7997 makestr(&callid_name,lbuf);
7998 } else if (didweget(lbuf,"NMBR")) { /* Caller ID Number */
7999 /* Format is "NMBR = <number>, 'P' or 'O'" */
8000 /* 'P' means Privacy Requested */
8001 /* 'O' means Out of Service or Not available */
8002 debug(F110,"CALLID NMBR",lbuf,0);
8003 makestr(&callid_nmbr,lbuf);
8004 } else if (didweget(lbuf,"MESG")) { /* Caller ID Unrecognized Message */
8005 /* Format is "MESG = <tag><length><data><checksum>" */
8006 debug(F110,"CALLID MESG",lbuf,0);
8007 makestr(&callid_mesg,lbuf);
8011 /* Maybe hang up the phone, depending on various SET DIAL parameters. */
8016 if (dialhng && dialsta != DIA_PART) { /* DIAL HANGUP ON? */
8017 x = mdmhup(); /* Try modem-specific method first */
8018 debug(F101,"dialhup mdmhup","",x);
8019 if (x > 0) { /* If it worked, */
8022 printf(" Modem hangup OK\r\n"); /* fine. */
8023 } else if (network /* If we're telnetted to */
8025 && !istncomport() /* (without RFC 2217) */
8026 #endif /* TN_COMPORT */
8029 if (dialdpy) /* a modem server, just print a msg */
8030 printf(" WARNING - modem hangup failed\r\n"); /* don't hangup! */
8032 } else { /* Otherwise */
8033 x = tthang(); /* Tell the OS to turn off DTR. */
8034 if (x > 0) { /* Yes, tell results from tthang() */
8036 if (dialdpy) printf(" Hangup OK\r\n");
8037 } else if (x == 0) {
8038 if (dialdpy) printf(" Hangup skipped\r\n");
8041 if (dialdpy) perror(" Hangup error");
8045 } else if (dialdpy) printf(" Hangup skipped\r\n"); /* DIAL HANGUP OFF */
8052 Sends escape sequence to modem, then sends its hangup command. Returns:
8053 0: If modem type is 0 (direct serial connection),
8054 or if modem type is < 0 (network connection),
8055 or if no action taken because DIAL MODEM-HANGUP is OFF)
8056 or because no hangup string for current modem type,
8057 or C-Kermit is in remote mode,
8058 or if action taken but there was no positive response from modem;
8059 1: Success: modem is in command state and acknowledged the hangup command;
8060 -1: On modem command error.
8072 debug(F101,"mdmhup dialmhu","",dialmhu); /* MODEM-HANGUP METHOD */
8073 debug(F101,"mdmhup local","",local);
8075 if (dialmhu == 0 || local == 0) /* If DIAL MODEM-HANGUP is OFF, */
8076 return(0); /* or not in local mode, fail. */
8078 debug(F101,"mdmhup dialsta","",dialsta);
8079 debug(F101,"mdmhup mdmset","",mdmset);
8081 if (dialsta != DIA_OK && !mdmset) /* It's not a dialed connection */
8085 if (tttapi && !tapipass) /* Don't hangup if using TAPI */
8087 #endif /* CK_TAPI */
8090 /* No, we still need this for modems that ignore DTR */
8091 if (mymdmtyp == n_GENERIC && !network)
8093 #endif /* COMMENT */
8095 debug(F101,"mdmhup dialesc","",dialesc);
8097 return(0); /* No modem escape-character, fail. */
8103 debug(F101,"mdmhup ttchk","",x);
8104 if (x < 0) /* There appears to be no connection */
8110 In OS/2, if CARRIER is OFF, and there is indeed no carrier signal, any
8111 attempt to do i/o at this point can hang the program. This might be true
8112 for other operating systems too.
8114 if (!network /* Not a network connection */
8117 #endif /* TN_COMPORT */
8119 m = ttgmdm(); /* Get modem signals */
8120 if ((m > -1) && (m & BM_DCD == 0)) /* Check for carrier */
8121 return(0); /* No carrier, skip the rest */
8125 debug(F111,"mdmhup network",ttname,network);
8126 debug(F101,"mdmhup mymdmtyp","",mymdmtyp);
8127 debug(F101,"mdmhup mdmtyp","",mdmtyp);
8128 /* In case of HANGUP before DIAL */
8129 if (network && mdmtyp < 1) /* SET HOST but no subsequent */
8130 return(0); /* SET MODEM TYPE... */
8131 if (mymdmtyp == 0 && mdmtyp > 0)
8133 if (mymdmtyp < 1) /* Not using a modem */
8135 if (mymdmtyp > 0) /* An actual modem... */
8136 mp = modemp[mymdmtyp];
8137 if (!mp) { /* Get pointer to its MDMINF struct */
8138 debug(F100,"mdmhup no MDMINF","",0);
8141 mdmcapas = dialcapas ? dialcapas : mp->capas;
8142 xx_ok = mp->ok_fn; /* Pointer to response reader */
8144 s = dialhcmd ? dialhcmd : mp->hup_str; /* Get hangup command */
8146 debug(F110,"mdmhup hup_str",s,0);
8147 if (!*s) return(0); /* If none, fail. */
8149 if (ttpkt(speed,FLO_DIAL,parity) < 0) /* Condition line for dialing */
8152 xparity = parity; /* Set PARITY to NONE temporarily */
8155 /* In case they gave a SET MODEM ESCAPE command recently... */
8157 if (dialesc < 0 || dialesc > 127)
8160 c = (char) (dialesc ? dialesc : mp->esc_char);
8162 if (mdmcapas & CKD_AT) { /* Hayes compatible */
8167 } else { /* Other */
8171 debug(F110,"mdmhup escbuf",escbuf,0);
8172 if (escbuf[0]) { /* Have escape sequence? */
8173 debug(F101,"mdmhup esc_time",0,mp->esc_time);
8174 if (mp->esc_time) /* If we have a guard time */
8175 msleep(mp->esc_time); /* Pause for guard time */
8176 debug(F100,"mdmhup pause 1 OK","",0);
8178 #ifdef NETCONN /* Send modem's escape sequence */
8179 if (network) { /* Must catch errors here. */
8180 if (ttol((CHAR *)escbuf,(int)strlen((char *)escbuf)) < 0) {
8184 debug(F110,"mdmhup ttslow net ok",escbuf,0);
8186 #endif /* NETCONN */
8187 ttslow((char *)escbuf,wr); /* Send escape sequence */
8188 debug(F110,"mdmhup ttslow ok",escbuf,0);
8191 #endif /* NETCONN */
8193 if (mp->esc_time) /* Pause for guard time again */
8194 msleep(mp->esc_time);
8196 msleep(500); /* Wait half a sec for echoes. */
8197 debug(F100,"mdmhup pause 1 OK","",0);
8199 ttflui(); /* Flush response or echo, if any */
8200 debug(F100,"mdmhup ttflui OK","",0);
8201 #endif /* COMMENT */
8203 ttslow(s,wr); /* Now Send hangup string */
8204 debug(F110,"mdmhup ttslow ok",s,0);
8206 This is not exactly right, but it works.
8208 the modem says OK when it gets the escape sequence,
8209 and it says NO CARRIER when it gets the hangup command.
8211 the modem does NOT say OK (or anything else) when it gets the esc sequence,
8212 but it DOES say OK (and not NO CARRIER) when it gets the hangup command.
8213 So the following function should read the OK in both cases.
8214 Of course, this is somewhat Hayes-specific...
8216 if (xx_ok) { /* Look for OK response */
8217 debug(F100,"mdmhup calling response function","",0);
8218 x = (*xx_ok)(3,1); /* Give it 3 seconds, be strict. */
8219 debug(F101,"mdmhup hangup response","",x);
8220 msleep(500); /* Wait half a sec */
8221 ttflui(); /* Get rid of NO CARRIER, if any */
8222 } else { /* No OK function, */
8223 x = 1; /* so assume it worked */
8224 debug(F101,"mdmhup no ok_fn","",x);
8226 parity = xparity; /* Restore prevailing parity */
8227 return(x); /* Return OK function's return code. */
8229 #else /* MDMHUP not defined. */
8231 debug(F100,"mdmhup MDMHUP not defined","",0);
8232 return(0); /* Always fail. */
8240 int mdmtyp = 0; /* Default modem type */
8242 int /* To allow NODIAL versions to */
8243 mdmhup() { /* call mdmhup(), so calls to */
8244 return(0); /* mdmhup() need not be within */
8245 } /* #ifndef NODIAL conditionals */
8248 int mdmtyp = 0; /* Default modem type */
8249 #endif /* NOLOCAL */